/* Apple-Style Design System */

/* CSS Variables */
:root {
    /* Colors - Apple Style */
    --apple-white: #ffffff;
    --apple-black: #1d1d1f;
    --apple-gray-light: #f5f5f7;
    --apple-gray: #86868b;
    --apple-gray-dark: #424245;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-green: #30d158;

    /* Typography */
    --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --font-chinese: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-apple), var(--font-chinese);
    font-size: 17px;
    line-height: 1.47059;
    color: var(--apple-black);
    background: var(--apple-white);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 56px;
    line-height: 1.07143;
    font-weight: 700;
}

h2 {
    font-size: 48px;
    line-height: 1.08349;
}

h3 {
    font-size: 40px;
    line-height: 1.1;
}

h4 {
    font-size: 32px;
    line-height: 1.125;
}

h5 {
    font-size: 24px;
    line-height: 1.16667;
}

h6 {
    font-size: 21px;
    line-height: 1.19048;
}

p {
    font-size: 17px;
    line-height: 1.47059;
    color: var(--apple-gray-dark);
}

/* Navigation Bar - Apple Style */
.apple-nav {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: 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);
}

.apple-nav-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.apple-nav-logo {
    font-size: 21px;
    font-weight: 600;
    color: var(--apple-black);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.apple-nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.apple-nav-link {
    font-size: 14px;
    color: var(--apple-black);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.apple-nav-link:hover {
    opacity: 0.6;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: var(--apple-gray-light);
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lang-switcher:hover {
    background: #e8e8ed;
}

.lang-switcher span {
    font-size: 12px;
    font-weight: 500;
    color: var(--apple-gray-dark);
}

/* Buttons - Apple Style */
.apple-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 980px;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    outline: none;
}

.apple-btn-primary {
    background: var(--apple-blue);
    color: var(--apple-white);
}

.apple-btn-primary:hover {
    background: var(--apple-blue-hover);
}

.apple-btn-secondary {
    background: transparent;
    color: var(--apple-blue);
    border: 1px solid var(--apple-blue);
}

.apple-btn-secondary:hover {
    background: var(--apple-blue);
    color: var(--apple-white);
}

/* Cards */
.apple-card {
    background: var(--apple-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.apple-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Container */
.apple-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
}

.apple-container-wide {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 22px;
}

/* Section Spacing */
.apple-section {
    padding: var(--spacing-xl) 0;
}

/* Hero Section */
.apple-hero {
    text-align: center;
    padding: 80px 22px;
    background: var(--apple-gray-light);
}

.apple-hero h1 {
    margin-bottom: 16px;
}

.apple-hero p {
    font-size: 21px;
    color: var(--apple-gray-dark);
    margin-bottom: 32px;
}

/* Grid System */
.apple-grid {
    display: grid;
    gap: var(--spacing-md);
}

.apple-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.apple-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.apple-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Form Elements */
.apple-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    border: 1px solid #d2d2d7;
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast);
    font-family: inherit;
}

.apple-input:focus {
    outline: none;
    border-color: var(--apple-blue);
}

.apple-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--apple-gray-dark);
    margin-bottom: 8px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 1068px) {
    h1 {
        font-size: 48px;
    }

    h2 {
        font-size: 40px;
    }

    h3 {
        font-size: 32px;
    }

    .apple-grid-3,
    .apple-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 734px) {
    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 32px;
    }

    h3 {
        font-size: 28px;
    }

    .apple-nav-content {
        padding: 0 16px;
    }

    .apple-nav-links {
        gap: 16px;
    }

    .apple-grid-2,
    .apple-grid-3,
    .apple-grid-4 {
        grid-template-columns: 1fr;
    }

    .apple-hero {
        padding: 48px 16px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}