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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.btn-primary {
    background: linear-gradient(135deg, #FF3B30 0%, #FFFFFF 100%);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #D6302A 0%, #E8E8E8 100%);
    transform: scale(1.02);
}

.btn-purple {
    background: #5856D6;
    color: #ffffff;
}

.btn-purple:hover {
    background: #4846b8;
    transform: scale(1.02);
}

.btn-pink {
    background: #ec4899;
    border: none;
}

.btn-pink:hover {
    background: #db2777;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 24px 32px;
    font-size: 18px;
}

.btn-purple-text-gradient {
    background: linear-gradient(135deg, #5856D6 0%, #AF52DE 100%);
    color: #ffffff !important;
}

.btn-purple-text-gradient:hover {
    background: linear-gradient(135deg, #4846b8 0%, #9b4bce 100%);
}

.btn-danger {
    background: #dc2626;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* ===== 主内容 ===== */
.main-content {
    padding-top: 96px;
    padding-bottom: 48px;
}

/* ===== Hero 区域 ===== */
.hero {
    text-align: center;
    padding: 80px 0;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #C7C7CC 0%, #636366 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 22px;
    color: #8e8e93;
    margin-bottom: 48px;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 48px auto;
}

.stat-card {
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 32px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-value {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stat-value.purple {
    background: linear-gradient(135deg, #FF3B30 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value.pink {
    background: linear-gradient(135deg, #34C759 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value.blue {
    background: linear-gradient(135deg, #FF9500 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #8e8e93;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.cta-section {
    margin-top: 48px;
}

/* ===== 特色功能 ===== */
.features {
    margin-bottom: 64px;
}

.section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-desc {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 8px;
}

.section-note {
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    font-size: 14px;
}

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

.feature-card {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 28px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.12);
}

.feature-title {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.feature-title.purple {
    background: linear-gradient(135deg, #FF3B30 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-title.pink {
    background: linear-gradient(135deg, #34C759 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-title.blue {
    background: linear-gradient(135deg, #FF9500 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-desc {
    color: #8e8e93;
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* ===== 游戏库 ===== */
.games-section {
    margin-bottom: 64px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 880px;
    margin: 0 auto;
}

.game-card {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 28px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.game-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #8E8E93 0%, #48484A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-name-en {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-bottom: 12px;
    font-style: italic;
}

.game-status {
    margin-top: auto;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-supported {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-developing {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.status-discontinued {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-unknown {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

/* ===== 视频/下载区域 ===== */
.videos-section,
.downloads-section {
    margin-bottom: 64px;
}

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

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 980px;
    margin: 0 auto;
}

.video-card,
.download-card {
    background:
        linear-gradient(180deg, rgba(60, 60, 65, 0.12) 0%, rgba(28, 28, 30, 0.04) 100%),
        rgba(40, 40, 40, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(80, 80, 85, 0.15);
    transition: all 0.3s ease;
}

.video-card:hover,
.download-card:hover {
    border-color: rgba(180, 180, 180, 0.25);
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 50px rgba(150, 150, 150, 0.04);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-desc {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

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

.badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
}

.badge-pink {
    background: rgba(236, 114, 153, 0.2);
    color: #f472b6;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 80px 0;
}

.empty-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    margin-bottom: 24px;
}

/* ===== 页脚 ===== */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-text {
    font-size: 14px;
    margin: 8px 0;
}

.copyright {
    margin-top: 16px;
    font-size: 12px;
}

/* ===== 后台管理页面 ===== */
.admin-page {
    padding: 32px;
    min-height: 100vh;
    background: #111827;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-header h1 {
    font-size: 32px;
    font-weight: bold;
}

.admin-username {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(147, 51, 234, 0.2);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 6px;
    color: #c084fc;
    font-size: 14px;
    font-weight: 500;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

.admin-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: bold;
}

.table-container {
    background: #1f2937;
    border-radius: 12px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    background: #374151;
    font-weight: 600;
}

.text-truncate {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-badge.active {
    background: #16a34a;
    color: white;
}

.status-badge.active:hover {
    background: #15803d;
}

.status-badge.inactive {
    background: #dc2626;
    color: white;
}

.status-badge.inactive:hover {
    background: #b91c1c;
}

.actions {
    display: flex;
    gap: 8px;
}

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1f2937;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: white;
}

.form-group {
    padding: 16px 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: #374151;
    color: white;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9333ea;
}

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

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .features-grid,
    .videos-grid,
    .downloads-grid,
    .stats {
        grid-template-columns: 1fr;
    }

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

    .admin-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .table-container {
        overflow-x: auto;
    }
}

/* ===== 视频播放模态框 ===== */
.video-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.video-modal-content {
    background: #1f2937;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

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

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(31, 41, 55, 0.95);
}

.video-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.video-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

.video-modal-body {
    padding: 0;
    background: #000;
}

.video-modal-body video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
}

/* 响应式 - 视频播放器 */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .video-modal-header {
        padding: 15px;
    }

    .video-modal-header h3 {
        font-size: 16px;
    }

    .video-modal-close {
        width: 32px;
        height: 32px;
    }

    .video-modal-body video {
        max-height: 60vh;
    }
}
