/* ========================================
   游戏大厅专属样式 - 浅云小站
   风格：像素赛博朋克 · 蓝金配色 · 大字体
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.5);
    --cyan: #00d4ff;
    --cyan-glow: rgba(0, 212, 255, 0.4);
    --blue-dark: #0a0e1a;
    --panel-bg: #111622;
    --border-color: #1e2840;
    --font-pixel: 'Press Start 2P', 'Courier New', monospace;
}

body {
    background-color: var(--blue-dark);
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    color: #c8d6e5;
    min-height: 100vh;
}

/* 扫描线 */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* 导航栏 */
.top-menu {
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}
.top-menu.scrolled {
    background-color: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.top-menu .img-dark { opacity: 0.7; }
.top-menu.scrolled .img-dark { opacity: 1; }
.top-menu .img-light { display: none; }
.top-menu.scrolled ~ .sidebar { background-color: rgba(10, 14, 26, 0.98); }

/* 居中容器 */
.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 标题 */
.arcade-header {
    text-align: center;
    padding: 60px 0 20px;
}
.arcade-title {
    font-family: var(--font-pixel);
    font-size: 2rem;
    color: var(--gold);
    text-shadow:
        0 0 10px var(--gold-glow),
        0 0 30px var(--gold-glow),
        0 0 60px rgba(255, 215, 0, 0.25);
    letter-spacing: 0.1em;
    display: inline-block;
    animation: titleGlow 2.5s ease-in-out infinite;
    margin-bottom: 14px;
}
@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 10px var(--gold-glow), 0 0 30px var(--gold-glow), 0 0 60px rgba(255, 215, 0, 0.25);
    }
    50% {
        text-shadow: 0 0 20px var(--gold-glow), 0 0 50px var(--gold-glow), 0 0 80px rgba(255, 215, 0, 0.4);
    }
}
.arcade-subtitle {
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    color: #b8e6ff;
    letter-spacing: 0.05em;
    animation: cursorBlink 1.2s step-end infinite;
}
@keyframes cursorBlink {
    50% { opacity: 0; }
}

/* 主布局 */
.game-screen-section {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin: 24px 0 40px;
}

/* 屏幕 */
.game-monitor {
    flex: 0 0 65%;
    min-width: 0;
}
.game-monitor__bezel {
    background: var(--panel-bg);
    border: 3px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 20px 12px;
    box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px rgba(0, 212, 255, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.4);
    position: relative;
}
.game-monitor__brand {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: var(--cyan);
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.15em;
}
.game-monitor__power {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    position: absolute;
    top: 18px;
    right: 28px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.game-monitor__power.on {
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold-glow);
}
.game-monitor__screen {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 450px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 2px solid #1a1a2e;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}
.game-screen__frame {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    background: #000;
}
.game-screen__frame.active { display: block; }
.game-screen__placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 1;
}
.placeholder__glitch {
    font-family: var(--font-pixel);
    font-size: 1rem;
    color: #334;
    animation: glitchText 2.5s infinite;
    margin-bottom: 14px;
}
@keyframes glitchText {
    0%, 90%, 100% { transform: none; opacity: 0.5; }
    92% { transform: translateX(-2px); opacity: 1; color: var(--cyan); }
    94% { transform: translateX(2px); opacity: 0.8; }
    96% { transform: none; opacity: 0.5; }
}
.placeholder__hint {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: #556;
    animation: cursorBlink 1.8s step-end infinite;
    text-align: center;
    line-height: 1.6;
}
.placeholder__noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
}
.game-monitor__label {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    color: #556;
    text-align: center;
    margin-top: 10px;
    letter-spacing: 0.2em;
}
.game-controls-hint {
    text-align: center;
    margin-top: 12px;
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: #778;
}
.key-hint {
    display: inline-block;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 3px 8px;
    color: var(--cyan);
    font-family: var(--font-pixel);
    font-size: 0.55rem;
}

/* 卡带列表 */
.game-cartridges {
    flex: 0 0 32%;
    min-width: 240px;
}
.section-heading {
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    color: var(--cyan);
    text-align: center;
    margin-bottom: 18px;
    text-shadow: 0 0 8px var(--cyan-glow);
    letter-spacing: 0.1em;
}
.cartridges-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}
.cartridges-grid::-webkit-scrollbar { width: 4px; }
.cartridges-grid::-webkit-scrollbar-track { background: transparent; }
.cartridges-grid::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.cartridges-grid::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

.cartridge {
    background: var(--panel-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}
.cartridge:hover,
.cartridge:focus-visible {
    border-color: var(--cyan);
    box-shadow: 0 0 16px var(--cyan-glow), inset 0 0 18px rgba(0, 212, 255, 0.04);
    transform: translateX(4px);
    outline: none;
}
.cartridge:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.cartridge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 45%;
    background: #060a14;
    border-radius: 0 3px 3px 0;
}
.cartridge.active {
    border-color: var(--gold);
    box-shadow: 0 0 18px var(--gold-glow), inset 0 0 18px rgba(255, 215, 0, 0.05);
    background: #1a1e2a;
}
.cartridge.active::after {
    content: '▶';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.55rem;
    color: var(--gold);
    animation: cursorBlink 1s step-end infinite;
}
.cartridge.coming-soon {
    opacity: 0.4;
    cursor: default;
}
.cartridge.coming-soon:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: none;
}
.cartridge__icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}
.cartridge__info { flex: 1; min-width: 0; }
.cartridge__name {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: #e0e0e0;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}
.cartridge__tag {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    color: var(--gold);
}
.cartridge__tag.available { color: var(--gold); }

/* 页脚 */
.site-footer {
    text-align: center;
    padding: 28px;
    color: rgba(200, 214, 229, 0.3);
    font-size: 0.9rem;
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 500;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: var(--cyan);
    width: 50px;
    height: 50px;
    border-radius: 6px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: inherit;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover,
.back-to-top:focus-visible {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 15px var(--cyan-glow);
    outline: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .page-wrapper { padding: 0 14px; }
    .arcade-title { font-size: 1.3rem; }
    .game-screen-section { flex-direction: column; gap: 16px; }
    .game-monitor { flex: 1 1 auto; width: 100%; }
    .game-cartridges { flex: 1 1 auto; width: 100%; min-width: 0; }
    .cartridges-grid { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; gap: 12px; padding-bottom: 8px; }
    .cartridge { flex-direction: column; min-width: 100px; padding: 16px 12px; gap: 8px; text-align: center; }
    .cartridge::before { left: 50%; top: 0; transform: translateX(-50%); width: 50%; height: 5px; border-radius: 0 0 3px 3px; }
    .cartridge:hover { transform: translateY(-3px); }
    .cartridge.active::after { right: auto; top: 6px; left: 50%; transform: translateX(-50%); }
    .cartridge__icon { font-size: 1.6rem; }
    .cartridge__name { font-size: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .arcade-title { animation: none; }
    .arcade-subtitle,
    .placeholder__hint,
    .cartridge.active::after { animation: none; }
}