:root {
    --bg-root: #0C0C0E;
    --bg-surface: #141417;
    --bg-card: #141417;
    --bg-card-hover: #1C1C21;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);

    --text-primary: #F5F5F6;
    --text-secondary: #A1A1AA;
    --text-tertiary: #71717A;

    --brand-accent: #E85D04;
    --brand-hover: #DC2F02;
    --brand-glow: rgba(232, 93, 4, 0.3);

    --font-heading: 'Outfit', 'Noto Sans TC', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

.light-theme {
    --bg-root: #F8F8F9;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F4F4F5;

    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-highlight: rgba(0, 0, 0, 0.12);

    --text-primary: #09090B;
    --text-secondary: #52525B;
    --text-tertiary: #A1A1AA;

    --brand-accent: #E85D04;
    --brand-hover: #DC2F02;
    --brand-glow: rgba(232, 93, 4, 0.2);
}

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

body {
    font-family: var(--font-heading);
    background-color: var(--bg-root);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.mono {
    font-family: var(--font-mono);
}

.text-accent {
    background: linear-gradient(135deg, #FF8C42 0%, #E85D04 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--brand-accent);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-size: 40px 40px;
    background-image: linear-gradient(to right, var(--border-subtle) 1px, transparent 1px), linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 20%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 80%);
    z-index: -2;
    pointer-events: none;
}

/* Navigation */
.navbar {
    padding: 20px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background 300ms ease;
}

.light-theme .navbar {
    background: rgba(255, 255, 255, 0.75);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--text-secondary);
    font-weight: 400;
}

.logo-icon {
    color: var(--brand-accent);
    display: flex;
}

.logo-icon i {
    width: 28px;
    height: 28px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 150ms ease;
    padding: 6px 12px;
    border-radius: 100px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
}

.btn-back:hover {
    color: var(--text-primary);
    background: rgba(128, 128, 128, 0.12);
    border-color: var(--border-highlight);
    transform: translateX(-2px);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.lang-switch-pill {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 6px;
    position: relative;
    user-select: none;
}

.lang-opt {
    position: relative;
    z-index: 2;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.5px;
}

.lang-slider {
    position: absolute;
    top: 6px;
    left: 0;
    height: calc(100% - 12px);
    background: var(--border-highlight);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-radius: 100px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.lang-opt.active {
    color: var(--text-primary);
}

.lang-opt:hover:not(.active) {
    color: var(--text-secondary);
}

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

.server-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.badge-tag {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-subtle);
    letter-spacing: 1px;
}

/* Chinese Font Specific Tweaks */
body.lang-zh .hero-title {
    font-weight: 700;
    letter-spacing: 0px;
}

body.lang-zh .server-name {
    letter-spacing: 0px;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 140px 24px;
    text-align: center;
}

.hero-glow {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 450px;
    background: radial-gradient(ellipse at center, rgba(232, 93, 4, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

.badge-premium {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(232, 93, 4, 0.3);
    background: rgba(232, 93, 4, 0.1);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-accent);
    margin-bottom: 32px;
    box-shadow: 0 0 16px rgba(232, 93, 4, 0.15);
}

.hero-title {
    font-size: 72px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

.hero-actions {
    margin-top: 40px;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 0 24px;
    height: 44px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--brand-accent);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.2);
}

.btn-primary:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(232, 93, 4, 0.3);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
}

/* Global Metrics */
.metrics-section {
    padding: 40px 48px 80px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.metric-card {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.metric-value {
    font-size: 64px;
    font-weight: 600;
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 12px;
    letter-spacing: -2px;
}

.metric-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* Fleet Section */
.fleet-section {
    padding: 80px 48px 120px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -1.5px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 20px;
    font-weight: 300;
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.server-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.server-card.flagship {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(232, 93, 4, 0.05) 100%);
    border-color: rgba(232, 93, 4, 0.25);
}

.light-theme .server-card.flagship {
    background: linear-gradient(135deg, #fff 0%, rgba(232, 93, 4, 0.04) 100%);
}

.server-card.flagship:hover {
    border-color: rgba(232, 93, 4, 0.5);
    box-shadow: 0 20px 48px rgba(232, 93, 4, 0.1);
}

.flagship .card-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(224, 93, 40, 0.2) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.server-region {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.server-region i {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

.server-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.gpu-badge {
    background: rgba(224, 93, 40, 0.15);
    color: var(--brand-accent);
    border: 1px solid rgba(224, 93, 40, 0.3);
}

.storage-badge {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-highlight);
}

.server-badge i {
    width: 16px;
    height: 16px;
}

.server-name {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -1px;
}



.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 32px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-value {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -1px;
}

.spec-value .unit {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 4px;
    letter-spacing: 0;
}

.spec-label {
    color: var(--text-tertiary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 64px 24px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-content .logo {
    font-size: 20px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .fleet-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .server-card.flagship {
        grid-column: span 2;
    }

    .metrics-grid {
        gap: 16px;
    }

    .metric-value {
        font-size: 48px;
    }

    .hero-title {
        font-size: 56px;
    }

    .specs-grid {
        gap: 16px;
    }

    .spec-value {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 16px 24px;
    }

    .fleet-grid {
        grid-template-columns: 1fr;
    }

    .server-card.flagship {
        grid-column: span 1;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 40px;
        margin-bottom: 16px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-glow {
        width: 100%;
        height: 400px;
        filter: blur(60px);
    }

    .hero {
        padding: 120px 24px 60px;
        min-height: auto;
    }

    .specs-grid {
        grid-template-columns: 1fr;
        border-top: none;
        padding-top: 0;
        gap: 20px;
    }



    .metrics-section {
        padding: 20px 24px 60px;
    }

    .metric-card {
        padding: 32px 20px;
    }

    .fleet-section {
        padding: 40px 24px 80px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .server-card {
        padding: 32px;
        border-radius: 20px;
    }

    .server-name {
        font-size: 28px;
    }

    .spec-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 12px 16px;
    }

    .logo {
        font-size: 18px;
        gap: 6px;
    }

    .logo span {
        display: none;
    }

    .logo-icon i {
        width: 20px;
        height: 20px;
    }

    .lang-switch-pill {
        padding: 2px;
    }

    .lang-opt {
        padding: 4px 10px;
        font-size: 11px;
    }

    .lang-slider {
        top: 2px;
        height: calc(100% - 4px);
    }

    .hero-title {
        font-size: 32px;
    }

    .badge-premium {
        font-size: 11px;
        padding: 4px 10px;
        letter-spacing: 2px;
    }
}