:root {
    --bg: #0b0c10;
    --bg-alt: #111318;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f0f1f5;
    --text-muted: #9aa0a8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --success: #22c55e;
    --warning: #f59e0b;
    --radius: 14px;
    --max-width: 1120px;
    --header-height: 68px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: min(92%, var(--max-width));
    margin: 0 auto;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(11, 12, 16, 0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
}

.logo-text {
    font-size: 16px;
}

.main-nav {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.main-nav a {
    transition: color 0.2s;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 60px) 0 80px;
    position: relative;
    overflow: hidden;
    background: #050508;
}

.hero-prism {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(currentColor 1px, transparent 1px),
        linear-gradient(90deg, currentColor 1px, transparent 1px);
    background-size: 48px 48px;
    color: rgba(255, 255, 255, 0.004);
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

@keyframes heroBg {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(4%, 3%) scale(1.05); }
    100% { transform: translate(-3%, -2%) scale(1); }
}

/* Floating background orbs */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

body::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
    top: -100px;
    left: -100px;
    animation: floatOrb 20s ease-in-out infinite;
}

body::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06), transparent 70%);
    bottom: -80px;
    right: -80px;
    animation: floatOrb 25s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(60px, 40px) scale(1.1); }
    66%      { transform: translate(-30px, 80px) scale(0.9); }
}

/* Floating dots */
.bg-dot {
    position: fixed;
    width: 3px;
    height: 3px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatDot {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.15; }
    25%      { transform: translateY(-20px) scale(1.4); opacity: 0.3; }
    50%      { transform: translateY(10px) scale(0.8); opacity: 0.2; }
    75%      { transform: translateY(-10px) scale(1.2); opacity: 0.25; }
}

.hero-label {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
    padding: 4px 16px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(4px);
    animation: heroUp 0.6s ease-out both;
}

.hero-title {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f0f1f5 0%, #9aa0a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroUp 0.6s ease-out 0.15s both;
}

.hero-subtitle {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-muted);
    margin-bottom: 38px;
    font-weight: 400;
    animation: heroUp 0.6s ease-out 0.3s both;
}

@keyframes heroUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    animation: scrollPulse 2.5s ease-in-out infinite;
}

.scroll-hint::before {
    content: "";
    width: 1px;
    height: 24px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroUp 0.6s ease-out 0.45s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.btn-primary:hover {
    background: #5290ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.btn-ghost {
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Overview section */
.overview-section {
    padding: 80px 0 60px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.overview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.overview-card:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.1);
}

.overview-card-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
    margin-bottom: 12px;
}

.overview-card-icon svg {
    width: 100%;
    height: 100%;
}

.overview-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.overview-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Section divider */
.alt-divider {
    position: relative;
}

.alt-divider::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15), transparent);
}

.section-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.12);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section.alt {
    background: var(--bg-alt);
}

.section-header {
    max-width: 640px;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 17px;
}

/* Product */
.product-grid {
    display: grid;
    gap: 48px;
    align-items: center;
}

.product-grid.two-col {
    grid-template-columns: 1.1fr 0.9fr;
}

.product-grid.reverse {
    direction: rtl;
}

.product-grid.reverse > * {
    direction: ltr;
}

.product-visual {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.35),
        0 0 0 0.5px rgba(59, 130, 246, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: box-shadow 0.3s;
}

.product-visual:hover {
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.35),
        0 0 0 0.5px rgba(59, 130, 246, 0.12);
}

.product-visual img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.product-info p {
    color: var(--text-muted);
    margin-bottom: 22px;
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.feature-list.compact {
    gap: 8px;
}

.feature-list li {
    position: relative;
    padding-left: 22px;
    color: var(--text-muted);
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.product-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-available .status-dot {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-wip .status-dot {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

/* Construction */
.construction-card {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 32px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.construction-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    color: var(--warning);
    animation: hammer 2s ease-in-out infinite;
    transform-origin: bottom center;
}

.construction-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes hammer {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(12deg); }
}

.construction-text {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.construction-sub {
    color: var(--text-muted);
    font-size: 15px;
}

/* Open source temporary downloads */
.open-dl-list {
    max-width: 420px;
    margin: 24px auto 0;
}

/* Downloads */
.download-list {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.download-item:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    transform: translateX(4px);
}

.download-name {
    font-weight: 500;
}

.download-arrow {
    color: var(--text-muted);
    transition: color 0.2s;
}

.download-item:hover .download-arrow {
    color: var(--accent);
}

.download-note {
    font-size: 13px;
    color: var(--text-muted);
}

/* Download menu (dropdown) */
.download-menu {
    display: grid;
    gap: 10px;
}

.download-item.sub {
    padding: 12px 16px 12px 28px;
    font-size: 13px;
}

.download-group {
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--surface);
}

.download-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.download-group-toggle:hover {
    background: var(--surface-hover);
}

.group-arrow {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.25s;
}

.download-group-toggle[aria-expanded="true"] .group-arrow {
    transform: rotate(180deg);
}

.download-group-items {
    display: grid;
    gap: 4px;
    padding: 0 8px 0 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.download-group-toggle[aria-expanded="true"] + .download-group-items {
    max-height: 200px;
    padding: 0 8px 8px 8px;
}

.download-group-items .download-item.sub {
    border: none;
    background: rgba(255, 255, 255, 0.03);
}

.download-group-items .download-item.sub:hover {
    background: var(--surface-hover);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.contact-card,
.link-card,
.download-item,
.construction-card {
    border: 1px solid var(--border);
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.contact-card:hover,
.link-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.08);
}

.contact-card {
    padding: 24px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    text-align: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.contact-icon {
    width: 22px;
    height: 22px;
    margin: 0 auto 8px;
    display: block;
    color: var(--accent);
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 13px;
    word-break: break-all;
}

/* Language switcher */
.lang-switch {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2px;
    margin-left: 20px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
}

.lang-btn:hover:not(.active) {
    color: var(--text);
    background: var(--surface-hover);
}

/* Friend Links */
.links-group {
    margin-bottom: 48px;
}

.links-group:last-child {
    margin-bottom: 0;
}

.links-group-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.link-card:hover {
    background: var(--surface-hover);
}

.link-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
    margin-bottom: 8px;
}

.link-icon svg {
    width: 100%;
    height: 100%;
}

.link-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.link-url {
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-all;
}

/* Footer */
.site-footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 860px) {
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(11, 12, 16, 0.96);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        padding: 12px 0;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav a {
        padding: 12px 24px;
        border-bottom: 1px solid var(--border);
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .nav-toggle {
        display: flex;
    }

    .overview-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .lang-switch {
        margin-left: auto;
        margin-right: 12px;
    }

    .product-grid.two-col {
        grid-template-columns: 1fr;
    }

    .product-grid.reverse {
        direction: ltr;
    }

    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

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

    .section {
        padding: 72px 0;
    }
}
