/* ========== Reset & Base ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #000000;
    --bg-elevated: #0d0d0d;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --border: #1f1f1f;
    --border-light: #2a2a2a;
    --text: #e0e0e0;
    --text-muted: #888888;
    --text-secondary: #aaaaaa;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* ========== Navigation ========== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.25em; font-weight: 700; color: #fff; letter-spacing: 1px;
}
.nav-logo-icon {
    width: 36px; height: 36px; background: var(--accent);
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    font-size: 1.1em;
}
.nav-links { display: flex; gap: 4px; list-style: none; margin-left: auto; }
.nav-links a {
    color: var(--text-muted); padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 0.925em; transition: all var(--transition);
}
.nav-links a:hover { color: #fff; background: var(--bg-card); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5em; cursor: pointer; padding: 4px 8px; }

/* ========== Hero ========== */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 120px 24px 80px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 50%);
    animation: heroPulse 8s ease-in-out infinite;
}
@keyframes heroPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero h1 { font-size: clamp(2.2em, 5vw, 3.8em); font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 20px; letter-spacing: -1px; }
.hero h1 span { background: linear-gradient(135deg, #3b82f6, #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.15em; color: var(--text-muted); margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: var(--radius); font-size: 1em; font-weight: 600; border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 0 20px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 0 30px var(--accent-glow); }
.btn-outline { background: transparent; color: #fff; border: 1px solid var(--border-light); }
.btn-outline:hover { background: var(--bg-card); border-color: var(--accent); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: 0.875em; }

/* ========== Sections ========== */
.section { padding: 100px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-label { display: inline-block; padding: 6px 16px; background: var(--accent-glow); color: var(--accent); border-radius: 100px; font-size: 0.85em; font-weight: 600; margin-bottom: 16px; }
.section-header h2 { font-size: clamp(1.8em, 3vw, 2.6em); color: #fff; margin-bottom: 12px; font-weight: 700; }
.section-header p { color: var(--text-muted); font-size: 1.05em; max-width: 560px; margin: 0 auto; }

/* ========== Features Grid ========== */
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px 28px;
    transition: all var(--transition);
}
.feature-card:hover { background: var(--bg-card-hover); border-color: var(--border-light); transform: translateY(-4px); }
.feature-icon { font-size: 2em; margin-bottom: 16px; display: block; }
.feature-card h3 { color: #fff; font-size: 1.15em; margin-bottom: 10px; font-weight: 600; }
.feature-card p { color: var(--text-muted); font-size: 0.925em; line-height: 1.7; }

/* ========== Screenshot Slider ========== */
.screenshots-section { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.slider-container { position: relative; max-width: 1000px; margin: 0 auto; }
.slider-viewport { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card); }
.slider-track { display: flex; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.slider-slide { flex: 0 0 100%; padding: 20px; }
.slider-slide img { width: 100%; border-radius: var(--radius); }
.slider-slide .slide-caption { text-align: center; color: var(--text-muted); font-size: 0.925em; margin-top: 12px; }
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; background: rgba(0,0,0,0.7); border: 1px solid var(--border-light);
    border-radius: 50%; color: #fff; font-size: 1.3em; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); z-index: 10;
}
.slider-btn:hover { background: var(--accent); border-color: var(--accent); }
.slider-btn-prev { left: -16px; }
.slider-btn-next { right: -16px; }
.slider-dots { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.slider-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--border-light);
    cursor: pointer; transition: all var(--transition);
}
.slider-dot.active { background: var(--accent); width: 24px; border-radius: 4px; }
.slider-placeholder {
    padding: 80px 24px; text-align: center; color: var(--text-muted);
}
.slider-placeholder .ph-icon { font-size: 3em; margin-bottom: 12px; display: block; }

/* ========== Advantages ========== */
.advantages-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.advantage-item {
    display: flex; gap: 16px; padding: 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); transition: all var(--transition);
}
.advantage-item:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.advantage-icon { font-size: 1.6em; flex-shrink: 0; width: 44px; height: 44px; background: var(--accent-glow); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.advantage-text h3 { color: #fff; font-size: 1.05em; margin-bottom: 6px; font-weight: 600; }
.advantage-text p { color: var(--text-muted); font-size: 0.9em; line-height: 1.6; }

/* ========== Download ========== */
.download-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.download-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 36px 28px; text-align: center;
    transition: all var(--transition);
}
.download-card:hover { background: var(--bg-card-hover); border-color: var(--accent); transform: translateY(-4px); }
.download-card .platform-icon { font-size: 3em; margin-bottom: 16px; display: block; }
.download-card h3 { color: #fff; font-size: 1.2em; margin-bottom: 6px; }
.download-card .version { color: var(--text-muted); font-size: 0.875em; margin-bottom: 20px; }
.download-card .filename { color: var(--text-secondary); font-size: 0.85em; margin-bottom: 16px; font-family: monospace; text-align: center; overflow-wrap: anywhere; word-break: break-all; }

/* ========== Contact ========== */
.contact-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px; max-width: 900px; margin: 0 auto;
}
.contact-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 24px; text-align: center;
    transition: all var(--transition);
}
.contact-item:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.contact-icon { font-size: 1.8em; margin-bottom: 12px; display: block; }
.contact-item h3 { color: #fff; font-size: 1em; margin-bottom: 8px; }
.contact-item p { color: var(--text-muted); font-size: 0.925em; word-break: break-all; }
.contact-item img { max-width: 150px; border-radius: var(--radius-sm); margin: 0 auto; }

/* ========== Footer ========== */
.footer {
    border-top: 1px solid var(--border); padding: 40px 24px;
    text-align: center;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer p { color: var(--text-muted); font-size: 0.875em; }

/* ========== Page Header ========== */
.page-header {
    padding: 120px 24px 60px; text-align: center;
}
.page-header h1 { font-size: 2.4em; color: #fff; font-weight: 700; }

/* ========== Admin Styles ========== */
.admin-container { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 250px; background: var(--bg-elevated); border-right: 1px solid var(--border);
    padding: 24px 0; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto;
}
.admin-sidebar .sidebar-logo { padding: 0 24px 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.admin-sidebar .sidebar-logo a { color: #fff; font-size: 1.15em; font-weight: 700; }
.admin-sidebar nav a {
    display: flex; align-items: center; gap: 10px; padding: 12px 24px;
    color: var(--text-muted); font-size: 0.925em; transition: all var(--transition);
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { color: #fff; background: var(--bg-card); }
.admin-main { flex: 1; margin-left: 250px; padding: 32px 40px; background: var(--bg); }
.admin-main h2 { color: #fff; font-size: 1.5em; margin-bottom: 24px; font-weight: 700; }
.admin-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.admin-card h3 { color: #fff; font-size: 1.1em; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; color: var(--text-secondary); font-size: 0.875em; margin-bottom: 6px; font-weight: 500; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: #fff; font-size: 0.925em; outline: none; transition: border-color var(--transition);
    font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); }
.form-group select { appearance: none; cursor: pointer; }
.form-group small { color: var(--text-muted); font-size: 0.8em; display: block; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn-sm { padding: 8px 18px; font-size: 0.875em; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #000; }
.btn-success:hover { background: #16a34a; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.925em; }
.alert-success { background: #0f2714; border: 1px solid #1a5a1a; color: #4ade80; }
.alert-error { background: #270f0f; border: 1px solid #5a1a1a; color: #f87171; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table td { font-size: 0.925em; }
.admin-table tr:hover td { background: var(--bg-card-hover); }
.admin-table .actions { display: flex; gap: 8px; }
.admin-table img.preview-img { max-width: 60px; max-height: 40px; border-radius: 4px; }

.admin-empty {
    text-align: center; padding: 60px 24px; color: var(--text-muted);
}

/* ========== Language Tabs（产品图片多语言素材） ========== */
.lang-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.lang-tab-sep { color: #ffffff; font-size: 0.9em; user-select: none; }
.lang-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-card);
    color: var(--text-muted); text-decoration: none; font-size: 0.9em;
    transition: var(--transition);
}
.lang-tab:hover { color: var(--text); border-color: var(--border-light); }
.lang-tab.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.lang-tab-count { font-size: 0.78em; line-height: 1; padding: 3px 7px; border-radius: 10px; background: var(--bg-card-hover); color: var(--text-muted); }
.lang-tab.active .lang-tab-count { background: rgba(255,255,255,0.22); color: #fff; }
.lang-tab-hint { font-size: 0.75em; opacity: 0.8; }
.lang-map-note { color: var(--text-muted); font-size: 0.925em; margin-bottom: 12px; }
.lang-map-note b { color: var(--text); }

/* ========== Login Page ========== */
.login-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.login-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 400px;
}
.login-box h1 { color: #fff; text-align: center; margin-bottom: 8px; font-size: 1.5em; }
.login-box .login-sub { text-align: center; color: var(--text-muted); margin-bottom: 32px; font-size: 0.9em; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(0,0,0,0.95); border-bottom: 1px solid var(--border); flex-direction: column; padding: 12px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .hero { padding: 100px 20px 60px; }
    .section { padding: 60px 16px; }
    .section-header { margin-bottom: 40px; }
    .form-row { grid-template-columns: 1fr; }
    .slider-btn-prev { left: 4px; }
    .slider-btn-next { right: 4px; }

    .admin-sidebar { width: 200px; }
    .admin-main { margin-left: 200px; padding: 24px 20px; }
}

@media (max-width: 640px) {
    .admin-sidebar { position: relative; width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 16px; }
    .admin-sidebar nav { display: flex; gap: 4px; flex-wrap: wrap; }
    .admin-sidebar nav a { padding: 8px 12px; font-size: 0.85em; }
    .admin-main { margin-left: 0; padding: 20px 16px; }
    .hero-btns { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; }
}

/* Video play overlay */
.slider-slide { position: relative; }
.video-play-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 56px; height: 56px; background: rgba(0,0,0,0.6); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; cursor: pointer; pointer-events: auto;
    transition: background 0.2s;
}
.video-play-overlay:hover { background: rgba(0,0,0,0.85); }
/* ========== Language Switcher ========== */
.nav-lang {
    background: var(--bg-card); color: #fff; border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 6px 10px; font-size: 0.85em;
    cursor: pointer; outline: none; font-family: inherit; flex-shrink: 0; margin-left: 8px;
}
.nav-lang:hover { border-color: var(--accent); }
.nav-lang option { background: var(--bg-card); color: #fff; }
@media (max-width: 768px) {
    .nav-lang { margin-left: auto; }
}

/* ========== Resources Table ========== */
.resource-table-wrap { width: 100%; max-width: 100%; margin: 0 auto; overflow-x: auto; }
.resource-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); }
.resource-table th, .resource-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 0.95em; }
.resource-table th:last-child, .resource-table td:last-child { border-right: none; }
.resource-table th { color: var(--text-secondary); font-size: 0.85em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg-elevated); }
.resource-table tr:last-child td { border-bottom: none; }
.resource-table tr:hover td { background: var(--bg-card-hover); }
/* 列宽分配：文件名最宽，大小/时间窄列，下载固定居中 */
.resource-table th:nth-child(1), .resource-table td:nth-child(1) { width: 50%; }
.resource-table th:nth-child(2), .resource-table td:nth-child(2) { width: 15%; white-space: nowrap; }
.resource-table th:nth-child(3), .resource-table td:nth-child(3) { width: 20%; white-space: nowrap; }
.resource-table th:nth-child(4), .resource-table td:nth-child(4) { width: 15%; text-align: center; }
.resource-table .res-name { color: #fff; font-weight: 600; }
.resource-table td a.btn { padding: 7px 22px; font-size: 0.85em; font-weight: 600; }


/* ========== Resources Table: Mobile Card Layout ========== */
@media (max-width: 640px) {
    .resource-table-wrap { max-width: 100%; }
    .resource-table thead { display: none; }
    .resource-table, .resource-table tbody, .resource-table tr, .resource-table td { display: block; width: 100%; }
    /* 重置桌面列宽比例，避免文件名字段只占一半宽度 */
    .resource-table th:nth-child(1), .resource-table td:nth-child(1),
    .resource-table th:nth-child(2), .resource-table td:nth-child(2),
    .resource-table th:nth-child(3), .resource-table td:nth-child(3),
    .resource-table th:nth-child(4), .resource-table td:nth-child(4) { width: 100%; max-width: 100%; }
    .resource-table tr {
        padding: 14px 16px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 12px;
    }
    .resource-table tr:hover td { background: transparent; }
    .resource-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none !important;
        padding: 6px 0;
        text-align: right;
        font-size: 0.9em;
    }
    .resource-table { border: 1px solid var(--border); }
    .resource-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.8em;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
    }
    .resource-table td:nth-child(1) {
        display: block;
        justify-content: flex-start;
        font-size: 1em;
        max-width: 100%;
        word-break: break-all;
        white-space: normal;
    }
    .resource-table td:nth-child(1)::before { display: none; }
    .resource-table td:nth-child(4) { justify-content: flex-start; }
    .resource-table td:nth-child(4)::before { display: none; }
    .resource-table td a.btn { width: auto; justify-content: center; white-space: nowrap; }
}

/* ========== Footer ICP ========== */
.footer-icp { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 10px; font-size: 0.875em; color: var(--text-muted); }
.footer-icp a, .footer-icp a:visited { color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.footer-icp a:hover { color: var(--accent); }

.footer-icp .icp-item { display: inline-flex; align-items: center; gap: 5px; }
.footer-icp .icp-badge { display: inline-flex; align-items: center; opacity: 0.9; }
.footer-icp a:hover .icp-badge { color: var(--accent); }

/* ========== Resources Pagination ========== */
.res-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.res-page-btn { padding: 7px 18px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.88em; text-decoration: none; transition: all var(--transition); }
.res-page-btn:hover { border-color: var(--accent); color: #fff; }
.res-page-btn.disabled { opacity: 0.4; pointer-events: none; }
.res-page-info { color: var(--text-muted); font-size: 0.9em; }

/* ========== Resources Search ========== */
.res-search { display: flex; align-items: stretch; justify-content: center; gap: 10px; margin: 0 auto 18px; width: 100%; max-width: 100%; }
.res-search input[type="text"] { flex: 1; min-width: 0; height: 38px; padding: 0 14px; box-sizing: border-box; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: #fff; font-size: 0.95em; outline: none; transition: border-color var(--transition); }
.res-search input[type="text"]:focus { border-color: var(--accent); }
.res-search button.btn { height: 38px; padding: 0 20px; box-sizing: border-box; display: inline-flex; align-items: center; }
.res-search .res-search-clear { color: var(--text-muted); font-size: 0.88em; text-decoration: none; white-space: nowrap; }
.res-search .res-search-clear:hover { color: var(--accent); }
.res-result-info { text-align: center; color: var(--text-muted); font-size: 0.9em; margin: 0 0 14px; }
@media (max-width: 640px) {
    .res-search { flex-wrap: wrap; }
    .res-search input[type="text"] { flex: 1 1 100%; }
}

/* ========== Download card arch tag ========== */
.arch-tag { display: inline-block; padding: 2px 8px; border: 1px solid var(--border-light); border-radius: 4px; color: var(--text-secondary); font-size: 0.72em; vertical-align: middle; margin-left: 2px; letter-spacing: 0.02em; }
