/* ==========================================================================
   EduKorea Main Stylesheet - Design System & Base Layout
   Mobile-First, Modern Glassmorphism & High-Contrast Typography
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  /* Color Palette - Light Mode */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-card: rgba(255, 255, 255, 0.7);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  /* Brand Accents */
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-bg: #eff6ff;

  --secondary-color: #0ea5e9;
  --indigo-accent: #6366f1;
  --pink-accent: #e11d48;
  --emerald-accent: #059669;
  --amber-accent: #d97706;

  /* Gender Colors */
  --color-boy: #2563eb;
  --color-boy-bg: #eff6ff;
  --color-girl: #e11d48;
  --color-girl-bg: #fff1f2;
  --color-coed: #059669;
  --color-coed-bg: #ecfdf5;

  /* Borders & Shadows */
  --border-color: #e2e8f0;
  --border-focus: #93c5fd;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);

  /* Geometry & Animations */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --header-height: 64px;
  --bottom-nav-height: 64px;
  --max-content-width: 1240px;
}

/* Dark Mode Theme Overrides */
[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-tertiary: #1e293b;
  --bg-glass: rgba(19, 27, 46, 0.85);
  --bg-glass-card: rgba(30, 41, 59, 0.7);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;

  --primary-color: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --primary-bg: rgba(37, 99, 235, 0.15);

  --color-boy-bg: rgba(37, 99, 235, 0.18);
  --color-girl-bg: rgba(225, 29, 72, 0.18);
  --color-coed-bg: rgba(5, 150, 105, 0.18);

  --border-color: #334155;
  --border-focus: #60a5fa;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.3);
}

/* ==========================================================================
   CSS Reset & Base Rules
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Base Links & Buttons */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-dark);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* ==========================================================================
   Layout Containers & Grid
   ========================================================================== */

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 16px;
}

.tab-view-container {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-view-container.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Utilities */
.hide-on-mobile {
  display: none !important;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
  .hide-on-mobile {
    display: inline-flex !important;
  }
  .hide-on-desktop {
    display: none !important;
  }
  .main-container {
    padding: 24px;
  }
}
