/* Apple.com风格完全重新设计 - CSS系统 */

/* ===== 基础重置和变量 ===== */
:root {
    /* Apple色彩系统 */
    --apple-black: #1d1d1f;
    --apple-gray: #86868b;
    --apple-light-gray: #f5f5f7;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-white: #ffffff;
    --apple-border: #d2d2d7;
    --apple-card-bg: #fbfbfd;
    --apple-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --apple-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 字体系统 */
    --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-text: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* 间距系统 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* 圆角系统 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    color: var(--apple-black);
    background-color: var(--apple-white);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Apple风格导航栏 ===== */
.apple-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0 var(--space-lg);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* 左上LOGO */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--apple-black);
    font-weight: 600;
    font-size: 1.2rem;
    transition: var(--apple-transition);
}

.nav-logo:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 1.5rem;
    margin-right: var(--space-sm);
}

/* 右上菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--apple-gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
    transition: var(--apple-transition);
}

.menu-toggle:hover {
    color: var(--apple-black);
}

/* 桌面导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-menu a {
    text-decoration: none;
    color: var(--apple-gray);
    font-size: 0.9rem;
    font-weight: 400;
    transition: var(--apple-transition);
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--apple-black);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--apple-blue);
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background-color: var(--apple-white);
    border-bottom: 1px solid var(--apple-border);
    padding: var(--space-lg);
    box-shadow: var(--apple-shadow);
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mobile-menu a {
    text-decoration: none;
    color: var(--apple-black);
    font-size: 1.1rem;
    font-weight: 500;
    padding: var(--space-sm) 0;
    display: block;
    transition: var(--apple-transition);
}

.mobile-menu a:hover {
    color: var(--apple-blue);
}

/* ===== 主要内容区域 ===== */
.main-content {
    padding-top: 52px;
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* 章节 */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--apple-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Apple风格按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--apple-transition);
    border: none;
    cursor: pointer;
    gap: var(--space-sm);
}

.btn-primary {
    background-color: var(--apple-blue);
    color: var(--apple-white);
}

.btn-primary:hover {
    background-color: var(--apple-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 113, 227, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--apple-blue);
    border: 1px solid var(--apple-blue);
}

.btn-secondary:hover {
    background-color: rgba(0, 113, 227, 0.1);
}

.btn-outline {
    background-color: transparent;
    color: var(--apple-black);
    border: 1px solid var(--apple-border);
}

.btn-outline:hover {
    background-color: var(--apple-light-gray);
}

/* ===== Apple风格卡片 ===== */
.card {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--apple-border);
    padding: var(--space-xl);
    transition: var(--apple-transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--apple-shadow);
}

.card-header {
    margin-bottom: var(--space-lg);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.card-subtitle {
    color: var(--apple-gray);
    font-size: 0.95rem;
}

.card-content {
    color: var(--apple-gray);
    line-height: 1.6;
}

/* ===== 网格系统 ===== */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== 表单样式 ===== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--apple-black);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--apple-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--apple-transition);
    background-color: var(--apple-light-gray);
}

.form-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    background-color: var(--apple-white);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
}

/* ===== 状态标签 ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    gap: var(--space-xs);
}

.status-live {
    background-color: #d4edda;
    color: #155724;
}

.status-coming {
    background-color: #fff3cd;
    color: #856404;
}

.status-dev {
    background-color: #cce5ff;
    color: #004085;
}

/* ===== Apple风格底部导航 ===== */
.apple-footer {
    background-color: var(--apple-light-gray);
    border-top: 1px solid var(--apple-border);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--apple-black);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    text-decoration: none;
    color: var(--apple-gray);
    font-size: 0.9rem;
    transition: var(--apple-transition);
}

.footer-links a:hover {
    color: var(--apple-blue);
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--apple-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.copyright {
    color: var(--apple-gray);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    color: var(--apple-gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--apple-transition);
}

.footer-legal a:hover {
    color: var(--apple-blue);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    /* 导航栏 */
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
    
    /* 网格系统 */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* 章节标题 */
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* 底部导航 */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 暗色模式 ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --apple-black: #f5f5f7;
        --apple-gray: #86868b;
        --apple-light-gray: #1d1d1f;
        --apple-white: #000000;
        --apple-border: #424245;
        --apple-card-bg: #2c2c2e;
    }
    
    .apple-navbar {
        background-color: rgba(0, 0, 0, 0.8);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .card {
        background: var(--apple-card-bg);
    }
    
    .form-input {
        background-color: var(--apple-light-gray);
        color: var(--apple-black);
    }
    
    .form-input:focus {
        background-color: var(--apple-card-bg);
    }
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide {
    animation: slideIn 0.6s ease-out;
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }