/* =========================================
   Mixed Demo - Base CSS Design System
   공통 변수, 리셋, 헤더, 다크/라이트 모드
   ========================================= */

/* --- CSS Custom Properties (Dark Mode Default) --- */
/* 브랜딩 단일 소스: --brand-*(branding partial 주입)를 fallback 기본값과 함께 상속한다. */
:root {
  --bg-primary: var(--brand-bg, #0a0a0f);
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2a;
  --text-primary: #f0f0f5;
  --text-secondary: #8a8a9a;
  --text-tertiary: #5a5a6a;
  --accent-primary: var(--brand-primary, #818cf8);
  --accent-secondary: var(--brand-accent, #38bdf8);
  --font-body: var(--brand-font, 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.1);
  --header-height: 70px;
  --content-max-width: 1200px;
  --section-gap: 80px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s ease;
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Light Mode Override --- */
[data-mode="light"] {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eaeaef;
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a6a;
  --text-tertiary: #8a8a9a;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-hover: rgba(0, 0, 0, 0.04);
  --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* --- Global Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
ul, ol { list-style: none; }

/* --- Mixed Header --- */
.mixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.mixed-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* Logo */
.mixed-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
.mixed-logo:hover { opacity: 0.8; }

.mixed-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

/* Back Button */
.mixed-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  margin-right: 16px;
}
.mixed-back-btn:hover {
  color: var(--text-primary);
  background: var(--glass-hover);
}
.mixed-back-btn svg {
  width: 16px;
  height: 16px;
}

/* Navigation */
.mixed-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mixed-nav-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}
.mixed-nav-tab:hover {
  color: var(--text-primary);
  background: var(--glass-hover);
}
.mixed-nav-tab.active {
  color: var(--accent-primary);
  background: rgba(129, 140, 248, 0.12);
}
.mixed-nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 1px;
}

/* Header Actions */
.mixed-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mixed-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
}
.mixed-action-btn:hover {
  color: var(--text-primary);
  background: var(--glass-hover);
  border-color: var(--text-tertiary);
}
.mixed-action-btn.active {
  color: var(--accent-primary);
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.3);
}
.mixed-action-btn svg {
  width: 16px;
  height: 16px;
}

/* Mode Toggle */
.mixed-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
}
.mixed-mode-toggle:hover {
  background: var(--glass-hover);
  border-color: var(--text-tertiary);
}
.mixed-mode-toggle svg {
  width: 18px;
  height: 18px;
}
/* 다크모드: 달 표시, 해 숨김 */
[data-mode="dark"] .mixed-mode-toggle .icon-sun { display: none; }
[data-mode="dark"] .mixed-mode-toggle .icon-moon { display: block; }
/* 라이트모드: 해 표시, 달 숨김 */
[data-mode="light"] .mixed-mode-toggle .icon-sun { display: block; }
[data-mode="light"] .mixed-mode-toggle .icon-moon { display: none; }

/* --- Main Content Area --- */
.mixed-main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  transition: all var(--transition-slow);
}

/* --- Placeholder (빈 데모 페이지용) --- */
.mixed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  text-align: center;
  gap: 20px;
  padding: 40px;
}

.mixed-placeholder-icon {
  font-size: 64px;
  line-height: 1;
  opacity: 0.6;
}

.mixed-placeholder-title {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mixed-placeholder-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

.mixed-placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-primary);
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 100px;
}

.mixed-placeholder-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.mixed-placeholder-tag {
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
}

/* --- Mobile View Simulation --- */
.mixed-main.view-mobile {
  max-width: 390px;
  margin-left: auto;
  margin-right: auto;
  border-left: 1px solid var(--glass-border);
  border-right: 1px solid var(--glass-border);
  min-height: calc(100vh - var(--header-height));
  position: relative;
}

/* --- Utility --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
