/* ========================================
   真我教练平台 - 设计系统
   Design System: 东方禅意 × 西方现代 × 国际专业
   ======================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
    /* Primary - 紫底色 (New Deep Purple Based Theme) */
    --color-primary-50: #f4ecfb;
    --color-primary-100: #e5d1f5;
    --color-primary-200: #d2aee8;
    --color-primary-300: #b882d6;
    --color-primary-400: #a05cc0;
    --color-primary-500: #863ca6; 
    --color-primary-600: #6b2f8a;
    --color-primary-700: #55246e;
    --color-primary-800: #401a54;
    --color-primary-900: #2c0f3d;

    /* Secondary - 金色点缀 */
    --color-secondary-50: #fcfaed;
    --color-secondary-100: #f6efce;
    --color-secondary-200: #eedda2;
    --color-secondary-300: #e5c46d;
    --color-secondary-400: #deaf43;
    --color-secondary-500: #d4a853;
    --color-secondary-600: #b88d3e;
    --color-secondary-700: #99712d;
    --color-secondary-800: #7d5a22;
    --color-secondary-900: #66481c;

    /* Neutral - Dark theme base (Purple shifted) */
    --color-neutral-0: #1a0f2e;    /* Deepest app background (black/purple) */
    --color-neutral-50: #25163d;   /* Cards background */
    --color-neutral-100: #331e50;  /* Borders or slightly lighter */
    --color-neutral-200: #422863;
    --color-neutral-300: #55347a;
    --color-neutral-400: #8860b0;
    --color-neutral-500: #ad8ace;  /* Muted text */
    --color-neutral-600: #ccb1e6;
    --color-neutral-700: #e6d4f5;  /* Secondary text */
    --color-neutral-800: #f5edfd;
    --color-neutral-900: #ffffff;  /* Primary text */
    --color-neutral-950: #ffffff;

    /* Functional */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Typography */
    --font-cn-title: "Noto Serif SC", "Source Han Serif CN", "Songti SC", serif;
    --font-cn-body: "Noto Sans SC", "Source Han Sans CN", "PingFang SC", sans-serif;
    --font-en-title: "Playfair Display", "Georgia", serif;
    --font-en-body: "Inter", "Helvetica Neue", system-ui, sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;
    --leading-loose: 2;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.5), 0 1px 2px -1px rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.6);
    --shadow-gold: 0 4px 14px 0 rgb(212 168 83 / 0.25);
    --shadow-card: 0 1px 3px rgb(0 0 0 / 0.2), 0 4px 12px rgb(0 0 0 / 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Z-index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-navbar: 300;
    --z-overlay: 400;
    --z-modal: 500;
    --z-toast: 600;

    /* Container */
    --container-max: 1280px;
    --container-padding: 2rem;

    /* Navbar */
    --navbar-height: 72px;
}

/* ========================================
   CSS Reset & Base
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-cn-body);
    background-color: var(--color-neutral-0);
    color: var(--color-neutral-900);
    line-height: var(--leading-normal);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

ul, ol {
    list-style: none;
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--space-24) 0;
}

.section--alt {
    background-color: var(--color-neutral-50);
}

.section--gold-light {
    background: linear-gradient(180deg, var(--color-neutral-0) 0%, var(--color-neutral-50) 100%);
}

.section--dark {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-900);
}

.section--blue-light {
    background: linear-gradient(180deg, var(--color-neutral-50) 0%, var(--color-neutral-0) 100%);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-16);
}

.section-header h2 {
    font-family: var(--font-cn-title);
    font-size: var(--text-4xl);
    font-weight: 600;
    color: var(--color-neutral-900);
    margin-bottom: var(--space-3);
    line-height: var(--leading-tight);
}

.section--dark .section-header h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-neutral-0);
}

.section-header .en-subtitle {
    font-family: var(--font-en-title);
    font-size: var(--text-lg);
    color: var(--color-primary-500);
    font-style: italic;
    letter-spacing: 0.02em;
}

.section-header p {
    color: var(--color-neutral-500);
    font-size: var(--text-lg);
    margin-top: var(--space-4);
    line-height: var(--leading-relaxed);
}

.section--dark .section-header p {
    color: var(--color-neutral-400);
}

/* ========================================
   Typography Utilities
   ======================================== */
.text-gold { color: var(--color-primary-500); }
.text-blue { color: var(--color-secondary-500); }
.text-muted { color: var(--color-neutral-500); }
.text-center { text-align: center; }

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-family: var(--font-cn-body);
    font-size: var(--text-sm);
    font-weight: 500;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    line-height: 1.5;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: var(--text-xs);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(212 168 83 / 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary-500);
    border-color: var(--color-primary-500);
}

.btn-secondary:hover {
    background: var(--color-primary-50);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-blue {
    background: linear-gradient(135deg, var(--color-secondary-500), var(--color-secondary-700));
    color: white;
    border-color: transparent;
}

.btn-blue:hover {
    background: linear-gradient(135deg, var(--color-secondary-400), var(--color-secondary-600));
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary-500);
    border-color: transparent;
    padding-left: 0;
}

.btn-ghost:hover {
    color: var(--color-primary-700);
}

.btn-ghost svg,
.btn-ghost .arrow {
    transition: transform var(--transition-base);
}

.btn-ghost:hover svg,
.btn-ghost:hover .arrow {
    transform: translateX(4px);
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: var(--color-neutral-0);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-200);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.card-body {
    padding: var(--space-8);
}

/* ========================================
   Tags / Badges
   ======================================== */
.tag {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.tag-gold {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
}

.tag-blue {
    background: var(--color-secondary-100);
    color: var(--color-secondary-700);
}

.tag-dark {
    background: var(--color-neutral-800);
    color: var(--color-neutral-100);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll-triggered animation classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 100ms; }
.stagger > *:nth-child(3) { transition-delay: 200ms; }
.stagger > *:nth-child(4) { transition-delay: 300ms; }
.stagger > *:nth-child(5) { transition-delay: 400ms; }
.stagger > *:nth-child(6) { transition-delay: 500ms; }

/* ========================================
   Divider / Decorative Elements
   ======================================== */
.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-300));
    border-radius: 2px;
    margin: var(--space-4) auto;
}

.divider--white {
    background: linear-gradient(90deg, white, rgba(255,255,255,0.3));
}

/* ========================================
   Responsive Utilities
   ======================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Responsive Breakpoints
   ======================================== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-header h2 {
        font-size: var(--text-3xl);
    }
    .section {
        padding: var(--space-16) 0;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1.25rem;
        --navbar-height: 64px;
    }
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .section-header h2 {
        font-size: var(--text-2xl);
    }
    .section {
        padding: var(--space-12) 0;
    }
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: var(--text-sm);
    }
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
