/* ========================================
   普标链 - 公共样式 (app.css)
   ======================================== */

/* ===== CSS 变量 ===== */
:root {
    /* 深色体系 */
    --dark-950: #020617;
    --dark-900: #0B1120;
    --dark-850: #0F172A;
    --dark-800: #1E293B;
    --dark-700: #334155;
    --dark-600: #475569;
    --dark-500: #64748B;
    --dark-400: #94A3B8;
    --dark-300: #CBD5E1;
    --dark-200: #E2E8F0;
    --dark-100: #F1F5F9;
    --dark-50: #F8FAFC;
    
    /* 品牌色 */
    --brand: #3B82F6;
    --brand-light: #60A5FA;
    --brand-dark: #2563EB;
    --brand-glow: rgba(59, 130, 246, 0.15);
    
    /* 功能色 */
    --success: #10B981;
    --success-bg: #D1FAE5;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    
    /* 中性色 */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* 字体 */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    
    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.2);
    
    /* 圆角 */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    
    /* 动效 */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* ===== 重置样式 ===== */
*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
}

body {
    font-family: var(--font-sans);
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===== 容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, 
        #0a0f1e 0%, 
        #111827 50%, 
        #0f172a 100%);
    /*border-bottom: 1px solid rgba(59, 130, 246, 0.15);*/
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s var(--ease);
}
.header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59,130,246,0.5) 25%, 
        rgba(139,92,246,0.5) 50%, 
        rgba(59,130,246,0.5) 75%, 
        transparent 100%);
}
.header.scrolled {
    background: linear-gradient(135deg, 
        #0a0f1e 0%, 
        #111827 50%, 
        #0f172a 100%);
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.4),
        0 0 40px rgba(59,130,246,0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-mark {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
}
.logo-mark svg { 
    width: 20px; 
    height: 20px; 
    stroke: white; 
    fill: none; 
    stroke-width: 2.5; 
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-text span {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-links a {
    color: rgba(226, 232, 240, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s var(--ease);
    position: relative;
}
.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(139,92,246,0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}
.nav-links a:hover {
    color: #ffffff;
}
.nav-links a:hover::before {
    opacity: 1;
}
.nav-links .nav-cta {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    margin-left: 0.5rem;
    box-shadow: 
        0 2px 8px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
}
.nav-links .nav-cta::before {
    display: none;
}
.nav-links .nav-cta:hover { 
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    box-shadow: 
        0 4px 16px rgba(59, 130, 246, 0.6),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--dark-300);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
}
.mobile-menu-btn:hover { 
    background: rgba(255,255,255,0.05); 
    color: var(--white); 
}
.mobile-menu-btn svg { 
    width: 22px; 
    height: 22px; 
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(180deg, #020617 0%, #0B1120 100%);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59,130,246,0.3) 50%, 
        transparent 100%);
}
.footer-text {
    font-size: 0.875rem;
    color: var(--dark-500);
}
.footer-text a {
    color: var(--dark-400);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}
.footer-text a:hover { 
    color: var(--brand-light); 
}

/* ===== 通用按钮 ===== */
.btn-primary {
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover { 
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
    transform: translateY(-1px); 
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}
.btn-primary:active { 
    transform: translateY(0); 
}

/* ===== 通用输入框 ===== */
.input, input[type="text"], input[type="email"], input[type="password"] {
    padding: 0.875rem 1.25rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    transition: all 0.2s var(--ease);
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
}
.input:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-glow);
}

/* ===== 通用卡片 ===== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .container { 
        padding: 0 1.5rem; 
    }
    
    .mobile-menu-btn { 
        display: block; 
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-900);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid rgba(255,255,255,0.05);
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    .nav-links.active { 
        display: flex; 
    }
    .nav-links a { 
        padding: 0.75rem 1rem; 
        width: 100%; 
    }
    .nav-links .nav-cta { 
        margin-left: 0; 
        text-align: center; 
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
