/* ============================================
   SoulDebt Portal — 现代科幻 AI 公司风格
   简约 · 高级 · 深色 · 渐变
   ============================================ */

/* ============ 基础 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 色彩系统 */
    --bg-base: #0a0a0f;
    --bg-elevated: #12121a;
    --bg-card: rgba(22, 22, 32, 0.6);
    --bg-card-hover: rgba(32, 32, 48, 0.8);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --accent: #6366f1;
    --accent-bright: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --gradient-1: #6366f1;
    --gradient-2: #a855f7;
    --gradient-3: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 48px;
    --space-2xl: 80px;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* 过渡 */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ 背景装饰 ============ */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--gradient-1);
    opacity: 0.15;
    top: -200px;
    left: -100px;
    animation: float 20s ease-in-out infinite;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: var(--gradient-2);
    opacity: 0.12;
    bottom: -100px;
    right: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -40px); }
}

/* ============ 导航 ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 10, 15, 0.7);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.logo-icon {
    color: var(--accent-bright);
    font-size: 20px;
    text-shadow: 0 0 20px var(--accent-glow);
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link-admin {
    border: 1px solid var(--border);
}

.nav-link-admin:hover {
    border-color: var(--accent);
    color: var(--accent-bright);
}

/* ============ Hero ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 32px 80px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 640px;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--accent-bright);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-bright);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-bright);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 8s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-arrow {
    transition: transform 0.3s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

/* ============ Hero 视觉装饰 ============ */
.hero-visual {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--gradient-1) 0%, transparent 70%);
    top: 50px;
    left: 50px;
    opacity: 0.6;
    animation: orb-float 15s ease-in-out infinite;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--gradient-2) 0%, transparent 70%);
    top: 150px;
    left: 150px;
    opacity: 0.5;
    animation: orb-float 20s ease-in-out infinite reverse;
}

.orb-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--gradient-3) 0%, transparent 70%);
    top: 200px;
    left: 80px;
    opacity: 0.4;
    animation: orb-float 18s ease-in-out infinite;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ============ 游戏列表区 ============ */
.games-section {
    padding: 120px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-label {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--accent-bright);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 17px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ============ 游戏卡片 ============ */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: card-in 0.6s forwards;
}

@keyframes card-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.game-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    position: relative;
    overflow: hidden;
}

.game-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    opacity: 0.3;
}

.game-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.status-playing {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-developing {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-coming {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-bright);
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.game-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.game-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.game-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.game-tag {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.game-version {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
}

.game-play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-bright);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.game-card:hover .game-play {
    gap: 10px;
}

.game-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============ 加载状态 ============ */
.games-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 0;
    color: var(--text-tertiary);
}

.loader {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent-bright);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ 关于区 ============ */
.about-section {
    padding: 120px 32px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.8;
    margin: 24px 0 48px;
}

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

.stat {
    padding: 32px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 13px;
    margin-top: 4px;
    letter-spacing: 0.05em;
}

/* ============ 页脚 ============ */
.footer {
    padding: 32px;
    border-top: 1px solid var(--border);
    background: rgba(10, 10, 15, 0.5);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-text {
    color: var(--text-tertiary);
    font-size: 13px;
}

/* ============ 页脚备案号 ============ */
.footer-icp {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.footer-icp-link {
    color: var(--text-tertiary);
    font-size: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.footer-icp-link:hover {
    color: var(--accent-bright);
    text-decoration: underline;
}

.footer-icp-sep {
    color: var(--text-tertiary);
    font-size: 12px;
    opacity: 0.5;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .nav-container {
        padding: 12px 20px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }

    .hero {
        padding: 100px 20px 60px;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-visual {
        display: none;
    }

    .hero-title {
        font-size: clamp(32px, 8vw, 48px);
    }

    .games-section,
    .about-section {
        padding: 80px 20px;
    }

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

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

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
