/* ==========================================
   ARCADE SHARED STYLES
   ========================================== */

html:has(.standalone-arcade),
body:has(.standalone-arcade),
.standalone-arcade {
    background-color: darkblue;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.arcade-game-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.tetris-container {
    background-color: transparent;
    display: flex;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #00F;
    outline: none;
    flex: 1;
    position: relative;
}

.tetris-board {
    display: block;
    margin: 0 auto;
    background-color: rgba(0,0,0,.5);
    border: 2px solid #F00;
    box-sizing: border-box;
}

.preview-container {
    margin-top: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.preview-board {
    background-color: rgba(0,0,0,.5);
    border: 2px solid #444;
    aspect-ratio: 1 / 1;
    width: fit-content;
    height: fit-content;
    display: block;
    margin: 0 auto;
}

.stats-container {
    float: left;
    position: absolute;
    display: flex;
    flex-direction: column;
    left: 10px;
    top: 80px;
    text-align: center;
    font-size: 3rem;
    font-family: monospace;
    font-weight: bold;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, 1px 1px 0 black, 1px 1px 0 black, 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em black;
    color: lightgrey;
}

.tetris-container .controls {
    position: absolute;
    float: left;
    top: 10px;
    left: 10px;
}

.game-over-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border: 2px solid #ff0000;
    border-radius: 10px;
    z-index: 1000;
}

.game-over-message button {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

.breakout-container {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    align-items: center;
    justify-content: center;
    outline: none;
    position: relative;
}

.game-field {
    background-color: rgba(0,0,0,.75);
    border: 2px solid white;
    width: min(60vw, 600px);
    aspect-ratio: 2 / 3;
    max-height: 80vh;
}

.breakout-stats {
    position: absolute;
    float: left;
    top: 50px;
    left: 10px;
    display: flex;
    flex-direction: column;
    width: fit-content;
    text-align: left;
    font-size: 1vw;
    font-family: monospace;
    font-weight: bold;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, 1px 1px 0 black, 1px 1px 0 black, 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em black;
    color: lightgrey;
}

#bg {
    z-index: -1;
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
}

.tetris-svg {
    width: fit-content;
    height: fit-content;
    overflow: hidden;
}

.invalid-cell {
    background-color: red;
    color: darkred;
    border: 5px solid red;
}

.sudoku-cell {
    background-color: rebeccapurple;
    color: aqua;
}

@media screen and (max-width: 992px) {
    .stats-container {
        float: none;
        position: static;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        margin-top: 10px;
        text-align: center;
        font-size: 1rem;
        font-family: monospace;
        font-weight: bold;
        text-shadow: none;
        color: lightgrey;
    }

    .tetris-container .controls {
        position: static;
        float: none;
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 10px;
        margin-bottom: 10px;
        gap: 10px;
    }

    .breakout-stats {
        position: static;
        float: none;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 10px;
        text-shadow: none;
    }
}


/* ==========================================
   ARCADE HUB (Home.razor.css) & LAYOUT FIXES
   ========================================== */
.white {
    color: white;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, 1px 1px 0 black, 1px 1px 0 black, 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em black;
    text-align: center;
}

.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin-top: 2rem;
    justify-content: center;
}

.game-tile {
    background: rgba(10, 10, 30, 0.85);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.game-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-tile:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: rgba(0, 200, 255, 0.6);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 150, 255, 0.4);
    background: rgba(20, 20, 50, 0.95);
}

.game-tile:hover::before {
    opacity: 1;
}

.game-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.game-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 6px rgba(0,0,0,0.6));
    transition: transform 0.3s ease;
}

.game-tile:hover .game-icon svg {
    transform: scale(1.1) rotate(2deg);
}

.game-title {
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px black;
    margin: 0;
    text-align: center;
    font-family: 'Press Start 2P', monospace, sans-serif;
    letter-spacing: 1px;
    z-index: 1;
}


.home-container {
    padding-top: 100px !important;
    padding-bottom: 3rem !important;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.arcade-game-wrapper {
    padding-top: 96px;
    padding-bottom: 2.5rem;
    height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

.arcade-back-bar {
    max-width: 1200px;
    margin: 0 auto 1rem auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.arcade-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: #f8fafc;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.arcade-back-btn:hover {
    border-color: #00e5ff;
    color: #00e5ff;
    transform: translateX(-2px);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

/* ==========================================
   SCOPED GAME STYLES (Home.Impesoft.Client.Oqtane.styles.css)
   ========================================== */
/* /Arcade/Games/BlockBlast.razor.rz.scp.css */
.game-container-blockblast {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    touch-action: none;
    padding-top: 20px;
    padding-bottom: 20px;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: white;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 450px;
    margin-bottom: 15px;
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #00f5d4, #00bbf9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 10px rgba(0, 187, 249, 0.3);
}

.score-container {
    display: flex;
    gap: 12px;
}

.score-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.score-label {
    font-size: 0.75rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.score-value {
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    color: #ffffff;
}

.score-value.high-score {
    color: #ffd700;
}

.streak-badge {
    background: linear-gradient(135deg, #ff4800, #ff8800);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(255, 100, 0, 0.5);
    animation: pulseStreak-b-krpi5lv1zt 1.2s infinite alternate ease-in-out;
}

@keyframes pulseStreak-b-krpi5lv1zt {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 100, 0, 0.5); }
    100% { transform: scale(1.08); box-shadow: 0 6px 25px rgba(255, 136, 0, 0.8); }
}

.game-board-wrapper {
    position: relative;
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    margin-bottom: 25px;
}

.floating-popup {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 500;
    text-align: center;
    animation: floatUp-b-krpi5lv1zt 1.2s ease-out forwards;
}

.floating-main {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 4px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.floating-sub {
    font-size: 1.5rem;
    font-weight: 800;
    color: #00f5d4;
    text-shadow: 0 0 10px rgba(0, 245, 212, 0.8);
}

@keyframes floatUp-b-krpi5lv1zt {
    0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    80% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(0.9); }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(var(--grid-size), 40px);
    grid-template-rows: repeat(var(--grid-size), 40px);
    gap: 4px;
}

.grid-cell {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.grid-cell:not(.preview-valid):not(.preview-invalid):hover {
    background: rgba(255, 255, 255, 0.12);
}

.block-fill {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    box-shadow: inset 0 2px 8px rgba(255,255,255,0.4), 0 2px 8px rgba(0,0,0,0.5);
    animation: popIn-b-krpi5lv1zt 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn-b-krpi5lv1zt {
    0% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.preview-valid {
    opacity: 1;
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.25) !important;
}

.preview-invalid {
    background: rgba(255, 50, 50, 0.35) !important;
}

/* Colors for shapes */
.shape-blue { background: linear-gradient(135deg, #0077b6, #00b4d8); }
.shape-red { background: linear-gradient(135deg, #d90429, #ef233c); }
.shape-green { background: linear-gradient(135deg, #2b9348, #55a630); }
.shape-yellow { background: linear-gradient(135deg, #fca311, #ffb703); }
.shape-purple { background: linear-gradient(135deg, #9d4edd, #c77dff); }
.shape-cyan { background: linear-gradient(135deg, #00bbf9, #00f5d4); }
.shape-orange { background: linear-gradient(135deg, #f77f00, #fcbf49); }
.shape-pink { background: linear-gradient(135deg, #ff006e, #ff8fab); }
.shape-teal { background: linear-gradient(135deg, #0081a7, #00afb9); }
.shape-lime { background: linear-gradient(135deg, #aacc00, #d4d700); }

.shape-tray {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 5px;
}

.tray-shape {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 95px;
    min-height: 95px;
}

.tray-shape:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.tray-shape.selected {
    border-color: #00f5d4;
    background: rgba(0, 245, 212, 0.12);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.4);
    transform: scale(1.06) translateY(-4px);
}

.shape-preview {
    display: grid;
    grid-template-columns: repeat(var(--shape-cols), 24px);
    grid-template-rows: repeat(var(--shape-rows), 24px);
    gap: 3px;
}

.shape-block {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    box-shadow: inset 0 1px 4px rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.3);
}

.shape-block-empty {
    width: 24px;
    height: 24px;
}

.game-over-overlay, .game-message {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 16px;
}

.final-score {
    font-size: 1.4rem;
    color: #00f5d4;
    margin-bottom: 20px;
    font-weight: 700;
}

.title-text {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #00f5d4, #00bbf9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-start, .retry-button {
    background: linear-gradient(135deg, #00f5d4, #00bbf9);
    color: #111;
    border: none;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 187, 249, 0.4);
}

.btn-start:hover, .retry-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 187, 249, 0.6);
}

.nav-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    margin: 0 5px;
    transition: background 0.2s;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.controls {
    display: flex;
    position: absolute;
    top: -5px;
    right: 0;
    width: 100%;
    justify-content: end;
    padding: 10px;
    margin-top: 0;
    box-sizing: border-box;
    z-index: 100;
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(var(--grid-size), 35px);
        grid-template-rows: repeat(var(--grid-size), 35px);
    }
    .shape-tray {
        gap: 10px;
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    .tray-shape {
        min-width: 0;
        min-height: 70px;
        flex: 1;
        padding: 6px;
    }
    .shape-block, .shape-block-empty {
        width: 16px;
        height: 16px;
    }
    .shape-preview {
        grid-template-columns: repeat(var(--shape-cols), 16px);
        grid-template-rows: repeat(var(--shape-rows), 16px);
        gap: 2px;
    }
}

.blockblast-drag-clone {
    opacity: 0.9;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.blockblast-drag-clone .shape-preview {
    grid-template-columns: repeat(var(--shape-cols), 40px) !important;
    grid-template-rows: repeat(var(--shape-rows), 40px) !important;
    gap: 4px !important;
}

.blockblast-drag-clone .shape-block,
.blockblast-drag-clone .shape-block-empty {
    width: 40px !important;
    height: 40px !important;
}

@media (max-width: 600px) {
    .blockblast-drag-clone .shape-preview {
        grid-template-columns: repeat(var(--shape-cols), 35px) !important;
        grid-template-rows: repeat(var(--shape-rows), 35px) !important;
        gap: 4px !important;
    }
    .blockblast-drag-clone .shape-block,
    .blockblast-drag-clone .shape-block-empty {
        width: 35px !important;
        height: 35px !important;
    }
}
/* /Arcade/Games/BlockDude.razor.rz.scp.css */
.blockdude-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #222;
    min-height: 100vh;
    padding-top: 20px;
    outline: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 640px;
    margin-bottom: 20px;
    padding: 0 10px;
    box-sizing: border-box;
}

.game-header h2 {
    margin: 0;
    color: #4da6ff;
    text-shadow: 2px 2px 0 #000;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.controls span {
    font-weight: bold;
    font-size: 1.2rem;
}

button {
    background-color: #4da6ff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 0 #0066cc;
    transition: all 0.1s;
}

button:active {
    transform: translateY(4px);
    box-shadow: none;
}

.menu-btn {
    background-color: #ff4d4d;
    box-shadow: 0 4px 0 #cc0000;
}

.game-board {
    position: relative;
    background-color: #1a1a1a;
    border: 4px solid #444;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    overflow: hidden;
}

.wall {
    position: absolute;
    background-color: #8c8c8c;
    border: 2px solid #595959;
    box-sizing: border-box;
    /* Brick pattern */
    background-image: 
        linear-gradient(335deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%),
        linear-gradient(transparent 50%, rgba(0,0,0,0.1) 50%);
    background-size: 8px 8px;
}

.door {
    position: absolute;
    background-color: #4d2600;
    border: 2px solid #331a00;
    box-sizing: border-box;
    border-radius: 4px 4px 0 0;
}

.door::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    width: 6px;
    height: 6px;
    background-color: #ffd700;
    border-radius: 50%;
}

.block {
    position: absolute;
    background-color: #e6b800;
    border: 2px solid #b38f00;
    box-sizing: border-box;
    /* Wood crate pattern */
    background-image: 
        linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.1) 75%, rgba(0,0,0,0.1)), 
        linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.1) 75%, rgba(0,0,0,0.1));
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
}

.player {
    position: absolute;
    /* We don't style the container itself visually, just use it for positioning */
}

.player-sprite {
    width: 100%;
    height: 100%;
    background-color: #ff9999;
    border-radius: 4px;
    border: 2px solid #cc0000;
    box-sizing: border-box;
    position: relative;
}

.player-sprite::before {
    /* Eye */
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background-color: #000;
    border-radius: 50%;
}

.player-sprite::after {
    /* Headband */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: #4da6ff;
}

.player.facing-left .player-sprite::before {
    right: auto;
    left: 6px;
}

.player.carrying .player-sprite::before {
    top: 10px; /* Look up slightly when carrying? Or just leave it */
}

.carried-block {
    position: absolute;
    background-color: #e6b800;
    border: 2px solid #b38f00;
    box-sizing: border-box;
    left: 0;
    /* Same pattern as .block */
    background-image: 
        linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.1) 75%, rgba(0,0,0,0.1)), 
        linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.1) 75%, rgba(0,0,0,0.1));
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
}

.level-complete-overlay, .game-complete-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #4dff4d;
    z-index: 10;
}

.level-complete-overlay h3, .game-complete-overlay h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #000;
}

.game-complete-overlay p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.game-complete-overlay button, .level-complete-overlay button {
    font-size: 1.2rem;
    padding: 10px 20px;
    margin: 5px;
}
/* /Arcade/Games/BubbleShooter.razor.rz.scp.css */
#bg {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -100;
    object-fit: cover;
    filter: brightness(0.4);
}

.bubble-game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 90vh;
    padding: 1rem;
    font-family: 'Segoe UI', Roboto, sans-serif;
    outline: none;
}

.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.arcade-btn {
    background: rgba(30, 34, 70, 0.85);
    color: #fff;
    border: 2px solid #3a3d68;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.arcade-btn:hover {
    background: rgba(60, 68, 120, 0.95);
    border-color: #00ffff;
    transform: translateY(-2px);
}

.arcade-btn.primary {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border: none;
    color: #0d0e23;
}

.arcade-btn.danger {
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    border: none;
    color: #fff;
}

.arcade-btn.warning {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border: none;
    color: #111;
}

.arcade-btn.lg {
    padding: 12px 28px;
    font-size: 1.25rem;
    margin-top: 12px;
}

.bubble-stats {
    display: flex;
    gap: 16px;
    background: rgba(13, 14, 35, 0.85);
    border: 2px solid #3a3d68;
    border-radius: 12px;
    padding: 8px 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8f94cb;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
}

.stat-value.highlight {
    color: #ff3366;
}

.preview-box {
    justify-content: center;
}

.bubble-field-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 600 / 800;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.2);
    border-radius: 16px;
    overflow: hidden;
    cursor: crosshair;
}

.bubble-svg-field {
    width: 100%;
    height: 100%;
    display: block;
}

.overlay-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(13, 14, 35, 0.95);
    border: 3px solid #00f2fe;
    border-radius: 20px;
    padding: 32px 40px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 0 50px rgba(0, 242, 254, 0.4);
    backdrop-filter: blur(16px);
    width: 80%;
    max-width: 380px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.overlay-card h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.overlay-card.danger {
    border-color: #ff0844;
    box-shadow: 0 0 50px rgba(255, 8, 68, 0.4);
}

.overlay-card.danger h2 {
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.overlay-card.success {
    border-color: #00ff88;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.4);
}

.overlay-card.success h2 {
    background: linear-gradient(135deg, #00ff88 0%, #60efff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* /Arcade/Games/Chess.razor.rz.scp.css */
.chess-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.chess-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.arcade-title {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
    margin-bottom: 10px;
}

.status-panel {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 30px;
}

.turn-indicator.white-turn {
    color: #eee;
}

.turn-indicator.black-turn {
    color: #999;
}

.game-over {
    color: #ff3333;
    animation: blink-b-ldcks5jfyk 1s infinite;
}

.check-warning {
    color: #ffaa00;
}

.controls {
    margin-top: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    position: static;
    float: none;
    width: 100%;
    justify-content: center;
}

.arcade-btn {
    background-color: #222;
    color: white;
    border: 2px solid #555;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.arcade-btn:hover {
    background-color: #444;
}

.ai-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.board-wrapper {
    background-color: #444;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 80vmin;
    max-width: 600px;
    height: 80vmin;
    max-height: 600px;
    border: 2px solid #333;
}

.square {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.light-square {
    background-color: #f0d9b5;
}

.dark-square {
    background-color: #b58863;
}

.chess-piece {
    width: 80%;
    height: 80%;
    object-fit: contain;
    z-index: 10;
    filter: drop-shadow(0px 3px 2px rgba(0,0,0,0.4));
}

.selected {
    background-color: rgba(106, 156, 92, 0.8) !important;
}

.valid-move {
    /* Optional base styling for a valid move square */
}

.move-indicator {
    position: absolute;
    width: 30%;
    height: 30%;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    z-index: 5;
    pointer-events: none;
}

@keyframes blink-b-ldcks5jfyk {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
/* /Arcade/Games/Connect4.razor.rz.scp.css */
.game-container-connect4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-family: 'Press Start 2P', monospace; /* Assuming arcade font is available */
    outline: none;
    margin-top: 20px;
}

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

.title {
    font-size: 3em;
    margin: 0 0 10px 0;
    color: #ffcc00;
    text-shadow: 2px 2px 4px #000000;
}

.status-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.2em;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid #ffffff;
}

.turn-indicator {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid white;
}

.win {
    color: #00ff00;
    animation: blink-b-aqrkl7sd3m 1s infinite;
}

.draw {
    color: #ffaa00;
}

@keyframes blink-b-aqrkl7sd3m {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.game-board-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
}

.column-selectors {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.column-selector {
    width: 60px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    cursor: pointer;
}

.column-selector:hover .arrow-down {
    border-top: 20px solid #ffffff;
}

.arrow-down {
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
}

.connect4-board {
    background-color: #0055ff;
    padding: 10px;
    border-radius: 15px;
    border: 4px solid #0033aa;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.board-row {
    display: flex;
    gap: 10px;
}

.board-cell {
    width: 60px;
    height: 60px;
    background-color: #0044cc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.hole {
    width: 50px;
    height: 50px;
    background-color: #111; /* Dark background to look like a hole */
    border-radius: 50%;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

.piece {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: dropIn-b-aqrkl7sd3m 0.4s ease-in;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 2px 5px rgba(0,0,0,0.5);
}

@keyframes dropIn-b-aqrkl7sd3m {
    0% { transform: translateY(-400px); }
    60% { transform: translateY(20px); }
    80% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.player-1 {
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #cc0000);
}

.player-2 {
    background: radial-gradient(circle at 30% 30%, #ffff66, #ffcc00);
}

.controls {
    position: static;
    float: none;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .connect4-board {
        width: 100vw;
        padding: 5px;
        gap: 5px;
        box-sizing: border-box;
    }
    .board-row {
        gap: 5px;
    }
    .board-cell {
        width: calc((100vw - 40px) / 7);
        height: calc((100vw - 40px) / 7);
    }
    .hole {
        width: 83%;
        height: 83%;
    }
    .column-selectors {
        gap: 5px;
        width: 100vw;
        padding: 5px;
        box-sizing: border-box;
    }
    .column-selector {
        width: calc((100vw - 40px) / 7);
    }
}
/* /Arcade/Games/DonkeyKong.razor.rz.scp.css */
#bg {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    opacity: 0.25;
    object-fit: cover;
}

.top-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 12px;
    z-index: 10;
}

.arcade-btn {
    background: linear-gradient(135deg, #111122 0%, #222244 100%);
    color: #00ffff;
    border: 2px solid #00ffff;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.arcade-btn:hover {
    background: #00ffff;
    color: #111122;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

.game-container-dk {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    outline: none;
}

.dk-hud {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    background: rgba(10, 10, 20, 0.85);
    border: 2px solid #ff0055;
    border-radius: 8px 8px 0 0;
    padding: 8px 16px;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hud-label {
    font-size: 11px;
    color: #aaa;
    font-weight: bold;
    letter-spacing: 1px;
}

.hud-value {
    font-size: 18px;
    font-weight: 900;
    font-family: monospace;
}

.hud-value.yellow { color: #ffff00; }
.hud-value.cyan { color: #00ffff; }
.hud-value.red { color: #ff3366; }
.hud-value.white { color: #ffffff; }

.lives-container {
    display: flex;
    gap: 4px;
    font-size: 16px;
}

.svg-stage-container {
    position: relative;
    width: 100%;
    background: #000;
    border-left: 2px solid #ff0055;
    border-right: 2px solid #ff0055;
    border-bottom: 2px solid #ff0055;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 0, 85, 0.3);
    overflow: hidden;
}

.dk-svg {
    width: 100%;
    height: auto;
    display: block;
}

.overlay-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 15, 30, 0.95);
    border: 3px solid #ff0055;
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.8);
    border-radius: 12px;
    padding: 24px 36px;
    text-align: center;
    color: #fff;
    z-index: 20;
}

.overlay-modal h2 {
    font-size: 32px;
    margin-bottom: 12px;
    text-shadow: 0 0 10px #ff0055;
}

.game-win-modal h2 {
    color: #00ffcc;
    text-shadow: 0 0 10px #00ffcc;
}

.overlay-modal p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #ddd;
}

.modal-btn {
    background: #ff0055;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.6);
    transition: transform 0.15s ease;
}

.modal-btn:hover {
    transform: scale(1.05);
}

.controls-panel {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.desktop-instructions {
    display: flex;
    gap: 20px;
    color: #00ffff;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.mobile-dpad {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 10px;
}

.dpad-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dpad-middle {
    display: flex;
    gap: 20px;
}

.dpad-btn {
    width: 50px;
    height: 50px;
    background: rgba(30, 30, 60, 0.8);
    color: #fff;
    border: 2px solid #00ffff;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
}

.jump-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ff0055;
    color: #fff;
    border: 3px solid #ffffff;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.6);
    touch-action: manipulation;
}
/* /Arcade/Games/Eggerland.razor.rz.scp.css */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
    z-index: 10;
}

.controls button {
    background: rgba(13, 27, 42, 0.8);
    border: 2px solid #00f5d4;
    color: #ffffff;
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}

.controls button:hover:not(:disabled) {
    background: #00f5d4;
    color: #0d1b2a;
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.8);
    transform: translateY(-2px);
}

.controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #6c757d;
}

.level-select-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-weight: bold;
}

.level-select-container select {
    background: rgba(13, 27, 42, 0.8);
    border: 2px solid #70d6ff;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
}

.eggerland-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    outline: none;
    user-select: none;
    position: relative;
    padding-bottom: 20px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(13, 27, 42, 0.85);
    border: 2px solid #48cae4;
    border-radius: 12px;
    padding: 10px 20px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(72, 202, 228, 0.3);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.75rem;
    color: #90e0ef;
    letter-spacing: 1px;
}

.stat-val {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 5px #00f5d4;
}

.stage-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffb703;
    margin-bottom: 10px;
    text-shadow: 0 0 8px rgba(255, 183, 3, 0.8);
}

.eggerland-board {
    width: 100%;
    max-width: 440px;
    height: auto;
    background: #0d1b2a;
    border: 4px solid #48cae4;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0, 119, 182, 0.6);
}

.game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(13, 27, 42, 0.95);
    border: 3px solid #ff0055;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.8);
}

.game-message h2 {
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #ff0055;
}

.game-message p {
    color: #90e0ef;
    margin-bottom: 15px;
}

.game-message button {
    background: #ff0055;
    border: none;
    color: white;
    padding: 10px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.6);
}

/* Touch D-Pad styling */
.touch-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 440px;
    margin-top: 15px;
}

.dpad {
    display: grid;
    grid-template-columns: repeat(3, 48px);
    grid-template-rows: repeat(3, 48px);
    gap: 4px;
}

.dbtn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid #90e0ef;
    color: white;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
}

.dbtn.up { grid-column: 2; grid-row: 1; }
.dbtn.left { grid-column: 1; grid-row: 2; }
.dbtn.right { grid-column: 3; grid-row: 2; }
.dbtn.down { grid-column: 2; grid-row: 3; }

.action-btns {
    display: flex;
    align-items: center;
}

.action-btn.shoot {
    background: linear-gradient(135deg, #ffb703, #fb8500);
    border: 2px solid #ffffff;
    color: #000;
    font-weight: bold;
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 183, 3, 0.6);
    touch-action: manipulation;
}

.start-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(13, 27, 42, 0.95);
    border: 3px solid #00f5d4;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 30px rgba(0, 245, 212, 0.8);
    cursor: pointer;
    transition: transform 0.2s;
}
.start-overlay:hover {
    transform: translate(-50%, -50%) scale(1.05);
}
.start-overlay h1 {
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #00f5d4;
}
.start-overlay p {
    color: #90e0ef;
    margin: 0;
    font-weight: bold;
}
/* /Arcade/Games/FlappyBird.razor.rz.scp.css */
.flappybird-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #222;
    min-height: 100vh;
    padding-top: 20px;
    padding-bottom: 20px;
    outline: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    overflow-x: hidden;
}

.game-header {
    text-align: center;
    color: white;
    margin-bottom: 10px;
}

.game-header h2 {
    margin: 0 0 5px 0;
    color: #4CAF50;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.controls {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 5px;
}

.score-display {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.game-board {
    position: relative;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 100%);
    border: 4px solid #333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 800 / 600;
}

.game-over-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 100;
}

.game-over-overlay h2 {
    color: #FF5252;
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #000;
}

.game-over-overlay p {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Pipe Styling */
.pipe {
    position: absolute;
    background: linear-gradient(to right, #54C83B 0%, #74F256 20%, #54C83B 50%, #40A02B 100%);
    border: 2px solid #2B6916;
}

.pipe-top {
    border-top: none;
    border-radius: 0 0 3px 3px;
}

.pipe-bottom {
    border-bottom: none;
    border-radius: 3px 3px 0 0;
}

.pipe-cap {
    position: absolute;
    left: -5%;
    width: 110%;
    height: 24px;
    background: linear-gradient(to right, #54C83B 0%, #74F256 20%, #54C83B 50%, #40A02B 100%);
    border: 2px solid #2B6916;
    border-radius: 3px;
}

.pipe-cap-top {
    bottom: -2px;
}

.pipe-cap-bottom {
    top: -2px;
}

/* Bird Styling */
.bird {
    position: absolute;
    background-color: #F7D038;
    border-radius: 50%;
    border: 2px solid #333;
    transition: transform 0.1s linear;
    z-index: 50;
    box-shadow: inset -3px -3px 0 rgba(0,0,0,0.2);
}

.bird-eye {
    position: absolute;
    right: 16.6%;
    top: 16.6%;
    width: 26.6%;
    height: 26.6%;
    background-color: white;
    border-radius: 50%;
    border: 1px solid #333;
}

.bird-eye::after {
    content: '';
    position: absolute;
    right: 12.5%;
    top: 25%;
    width: 37.5%;
    height: 37.5%;
    background-color: black;
    border-radius: 50%;
}

.bird-wing {
    position: absolute;
    left: 6.6%;
    top: 40%;
    width: 40%;
    height: 26.6%;
    background-color: #FFF;
    border-radius: 50%;
    border: 1px solid #333;
    transform: rotate(-15deg);
}

.bird-beak {
    position: absolute;
    right: -26.6%;
    top: 40%;
    width: 40%;
    height: 26.6%;
    background-color: #F75538;
    border-radius: 50%;
    border: 1px solid #333;
}

/* Ground */
.ground-strip {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 15px;
    background: repeating-linear-gradient(
        45deg,
        #D2B48C,
        #D2B48C 10px,
        #C19A6B 10px,
        #C19A6B 20px
    );
    border-top: 3px solid #73BF2E;
    z-index: 60;
}
/* /Arcade/Games/Game2048.razor.rz.scp.css */
.game-container-2048 {
    display: flex;
    flex-direction: column;
    align-items: center;
    outline: none; /* remove focus outline */
    font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
    color: #776e65;
    margin-top: 20px;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    position: static;
    float: none;
    width: 100%;
}

button {
    background-color: #8f7a66;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #9f8b77;
}

.header {
    display: flex;
    justify-content: space-between;
    width: 400px;
    max-width: 90vw;
    margin-bottom: 20px;
}

.title {
    font-size: 4rem;
    font-weight: bold;
    margin: 0;
    color: white;
}

.score-container {
    display: flex;
    gap: 5px;
}

.score-box {
    background: #bbada0;
    padding: 5px 25px;
    border-radius: 3px;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.score-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #eee4da;
    text-transform: uppercase;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.game-board-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    max-width: 90vw;
    max-height: 90vw; /* Keep it square on mobile */
    background: #bbada0;
    border-radius: 6px;
    padding: 10px;
    touch-action: none; /* Prevent scrolling when swiping */
}

.grid-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 10px;
}

.grid-row {
    display: flex;
    flex: 1;
    gap: 10px;
}

.grid-cell {
    flex: 1;
    background: rgba(238, 228, 218, 0.35);
    border-radius: 3px;
    position: relative;
}

.tile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
    font-weight: bold;
    font-size: 2.5rem;
    z-index: 10;
    animation: appear-b-qbvk4t4i3j 200ms ease 100ms;
    animation-fill-mode: backwards;
}

.tile-inner {
    text-align: center;
}

/* Tile Colors */
.tile-2 { background: #eee4da; color: #776e65; }
.tile-4 { background: #ede0c8; color: #776e65; }
.tile-8 { background: #f2b179; color: #f9f6f2; }
.tile-16 { background: #f59563; color: #f9f6f2; }
.tile-32 { background: #f67c5f; color: #f9f6f2; }
.tile-64 { background: #f65e3b; color: #f9f6f2; }
.tile-128 { background: #edcf72; color: #f9f6f2; font-size: 2rem; box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.2381), inset 0 0 0 1px rgba(255, 255, 255, 0.14285); }
.tile-256 { background: #edcc61; color: #f9f6f2; font-size: 2rem; box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.31746), inset 0 0 0 1px rgba(255, 255, 255, 0.19047); }
.tile-512 { background: #edc850; color: #f9f6f2; font-size: 2rem; box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.39682), inset 0 0 0 1px rgba(255, 255, 255, 0.23809); }
.tile-1024 { background: #edc53f; color: #f9f6f2; font-size: 1.5rem; box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.47619), inset 0 0 0 1px rgba(255, 255, 255, 0.28571); }
.tile-2048 { background: #edc22e; color: #f9f6f2; font-size: 1.5rem; box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.55555), inset 0 0 0 1px rgba(255, 255, 255, 0.33333); }
.tile-super { background: #3c3a32; color: #f9f6f2; font-size: 1.5rem; }

/* Mobile Adjustments */
@media (max-width: 500px) {
    .title { font-size: 2rem; }
    .score-value { font-size: 1.2rem; }
    .tile { font-size: 1.5rem; }
    .tile-128, .tile-256, .tile-512 { font-size: 1.2rem; }
    .tile-1024, .tile-2048, .tile-super { font-size: 1rem; }
}

/* Animations */
@keyframes appear-b-qbvk4t4i3j {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

.game-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(238, 228, 218, 0.73);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    animation: fade-in-b-qbvk4t4i3j 800ms ease;
}

.game-message p {
    font-size: 4rem;
    font-weight: bold;
    color: #776e65;
    margin: 0 0 20px 0;
}

.game-won {
    background: rgba(237, 194, 46, 0.5);
}

.game-won p {
    color: #f9f6f2;
}

@keyframes fade-in-b-qbvk4t4i3j {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
/* /Arcade/Games/KingsValley.razor.rz.scp.css */
.kv-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1e0e04 0%, #080401 100%);
    padding: 20px;
    font-family: 'Press Start 2P', 'Segoe UI', monospace, sans-serif;
    color: #ffffff;
}

.kv-arcade-cabinet {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0f0702;
    border: 4px solid #c68a4c;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(198, 138, 76, 0.4), inset 0 0 15px rgba(0,0,0,0.8);
    padding: 16px;
    outline: none;
    max-width: 860px;
    width: 100%;
}

.kv-marquee {
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #3a1c04, #7a4f21, #3a1c04);
    padding: 8px 24px;
    border-radius: 8px;
    border: 2px solid #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
    width: 100%;
}

.marquee-title {
    font-size: 24px;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 2px;
    text-shadow: 0 0 8px #ff9900;
}

.marquee-sub {
    font-size: 11px;
    color: #00f5d4;
    letter-spacing: 1px;
    margin-top: 4px;
}

.kv-hud {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    background: #140a02;
    border: 2px solid #7a4f21;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hud-label {
    font-size: 9px;
    color: #a88a6d;
    margin-bottom: 2px;
}

.hud-value {
    font-size: 13px;
    font-weight: bold;
}

.hud-value.gold { color: #ffd700; }
.hud-value.white { color: #ffffff; }
.hud-value.cyan { color: #00f5d4; }
.hud-value.yellow { color: #ffff00; }
.hud-value.pink { color: #ff007f; }
.hud-value.red { color: #ff3366; }

.life-icon {
    font-size: 14px;
    margin-right: 2px;
}

.kv-screen {
    position: relative;
    border: 3px solid #7a4f21;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
    background: #000;
}

.kv-svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 800px;
}

.kv-controls-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 16px;
    padding: 12px 20px;
    background: #140a02;
    border-radius: 8px;
    border: 2px solid #7a4f21;
}

.dpad-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dpad-row {
    display: flex;
    gap: 20px;
    margin: 4px 0;
}

.dpad-btn {
    width: 44px;
    height: 44px;
    background: #3a1c04;
    border: 2px solid #c68a4c;
    border-radius: 6px;
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}

.dpad-btn:active {
    background: #7a4f21;
}

.action-box {
    display: flex;
    gap: 12px;
}

.act-btn {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 8px;
    border: 2px solid #ffffff;
    cursor: pointer;
    color: #ffffff;
    user-select: none;
    transition: transform 0.1s;
}

.act-btn:active {
    transform: scale(0.95);
}

.act-btn.jump {
    background: #00f5d4;
    color: #140a02;
    border-color: #00b39b;
}

.act-btn.dig {
    background: #c68a4c;
    color: #ffffff;
    border-color: #ffd700;
}

.act-btn.throw {
    background: #ff007f;
    color: #ffffff;
    border-color: #ff66b2;
}

.btn-group:hover rect {
    opacity: 0.9;
}
/* /Arcade/Games/Pacman.razor.rz.scp.css */
.pacman-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    outline: none; /* remove focus outline */
}

.pacman-board {
    background-color: black;
    border: 4px solid #1919A6;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(25, 25, 166, 0.5);
    touch-action: none; /* Prevent scrolling while playing on mobile */
    width: 100%;
    max-width: 90vw;
    height: auto;
    max-height: 75vh;
    aspect-ratio: 21 / 22;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: calc(75vh * (21/22)); /* max-height * aspect ratio */
    margin-bottom: 10px;
    color: white;
    font-family: 'Press Start 2P', monospace; /* Assuming this font is available or fallback to monospace */
    font-size: 1.2rem;
    text-shadow: 1px 1px 0px black;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

button {
    background-color: #222;
    color: white;
    border: 2px solid #555;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #444;
}

.game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid yellow;
}

.game-message h2 {
    margin-top: 0;
    color: yellow;
}

.blink {
    opacity: 0.5;
}

@media (max-width: 576px) {
    .pacman-board {
        max-width: 100vw;
        max-height: none;
        border: none;
        border-radius: 0;
    }
    .stats-container {
        max-width: 100vw;
        padding: 0 10px;
        box-sizing: border-box;
    }
    .pacman-container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
}
/* /Arcade/Games/Platformer.razor.rz.scp.css */
.game-container-platformer {
    display: flex;
    flex-direction: column;
    align-items: center;
    outline: none; /* remove focus outline */
    font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
    color: white;
    margin-top: 20px;
    width: 100%;
    touch-action: none; /* Prevent scrolling during swipe controls */
}

.controls {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
    position: static;
    float: none;
    width: 100%;
}

button {
    background-color: #8f7a66;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #9f8b77;
}

.header {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 10px;
}

.title {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
    color: white;
}

.svg-container {
    position: relative;
    width: 100%;
    max-width: 800px; /* Base width of the game */
    aspect-ratio: 800 / 600; /* Preserve aspect ratio */
    background-color: #222;
    border: 4px solid #444;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.overlay-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.game-over-text {
    color: red;
}

.game-won-text {
    color: gold;
}

.instructions {
    margin-top: 15px;
    font-size: 1.2rem;
    color: #ccc;
    text-align: center;
}
/* /Arcade/Games/SudokuGrid.razor.rz.scp.css */
.sudoku-grid {
    /*border-collapse: collapse;*/
    border: dashed 1px #000;
    margin: 1vw auto;
    width: fit-content;
    aspect-ratio: 1/1;
    background-color: #2c2f33; /* Subtle dark background */
}

    .sudoku-grid td {
        width: 3vw;
        aspect-ratio: 1 /1; /* Force a square aspect ratio */
        text-align: center;
        padding: 0;
    }

    .sudoku-grid input[type="text"] {
        border: 1px solid black; /* Grid border */
        width: 3vw;
        aspect-ratio: 1 /1; /* Force a square aspect ratio */
        font-size: 2vw;
        text-align: center;
        color: #fff; /* White text */
        font-weight: bold;
        box-sizing: border-box;
    }



button {
    margin: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

    button:hover {
        background-color: #555;
    }

.sudoku-solved {
    font-size: 3rem;
    background-color: #00Ff00;
    color: #fff;
    padding: 1vw;
    border-radius: 4px;
    margin: 20px;
    text-align: center;
    /* Text Shadow Property */
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, 1px 1px 0 black, 1px 1px 0 black, 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em black;
}

.sudoku-unsolved {
    font-size: 3rem;
    background-color: #CC0000;
    color: #fff;
    padding: 1vw;
    border-radius: 4px;
    margin: 20px;
    text-align: center;
    /* Text Shadow Property */
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, 1px 1px 0 black, 1px 1px 0 black, 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em black;
}

.invalid-cell {
    background-color: red;
    color: white;
    border: 5px solid red;
}

.green {
    background-color: green;
    background-color: #3c3f44; /* Darker input background */
}

.green:focus {
    background-color: #565a60; /* Slightly lighter for focus */
}


form-select {
    padding: .5rem 1rem;
    font-size: .75rem;
    background-color: #444;
    color: white;
    border: none;
    border-radius: .2rem;
    cursor: pointer;
}

    form-select:hover {
        background-color: #555;
    }

.controls {
    position: absolute;
    float: left;
    top: 10px;
    left: 10px;
}

@media (max-width: 992px) {
    .sudoku-grid {
        width: 100%;
        max-width: 100vw;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .sudoku-grid td {
        width: calc(100vw / 9 - 2px);
    }

    .sudoku-grid input[type="text"] {
        width: calc(100vw / 9 - 2px);
        font-size: 5vw;
    }

    .controls {
        position: static;
        float: none;
        display: flex;
        justify-content: center;
        margin-top: 10px;
        margin-bottom: 10px;
        width: 100%;
    }
}
/* /Arcade/Games/Tangram.razor.rz.scp.css */
.tangram-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 15px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #ffffff;
    user-select: none;
    transition: background 0.3s ease;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    min-height: 400px;
    color: #00e5ff;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 229, 255, 0.2);
    border-top-color: #00e5ff;
    border-radius: 50%;
    animation: spin-b-71f0dsplqy 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin-b-71f0dsplqy {
    to { transform: rotate(360deg); }
}

/* Theme Backgrounds */
.tangram-page.theme-neon {
    background: radial-gradient(circle at center, #1a1c2e 0%, #0d0f18 100%);
}

.tangram-page.theme-wood {
    background: radial-gradient(circle at center, #3a2518 0%, #1e120a 100%);
}

.tangram-page.theme-zen {
    background: radial-gradient(circle at center, #2d3748 0%, #1a202c 100%);
}

/* Top Header Bar */
.top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 10px 18px;
    margin-bottom: 12px;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.bar-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-arcade {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-arcade:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-arcade.active {
    background: #00bcd4;
    border-color: #00e5ff;
    color: #000;
    box-shadow: 0 0 12px rgba(0, 188, 212, 0.6);
}

.game-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #00e5ff, #e91e63);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* Category & Level Selector */
.selector-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.level-indicator {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd54f;
    min-width: 110px;
    text-anchor: middle;
    text-align: center;
}

/* Status Stats */
.stat-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mode Bar */
.mode-bar {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.mode-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* SVG Board Container */
.board-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.tangram-svg {
    width: 100%;
    height: auto;
    max-height: 750px;
    touch-action: none;
}

/* Polygon Styles & Themes */
.theme-neon .svg-piece {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25));
    transition: filter 0.2s ease, opacity 0.2s ease;
    cursor: grab;
}

.theme-neon .svg-piece:hover {
    filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.8));
}

.theme-neon .svg-piece.selected {
    stroke: #ffffff !important;
    stroke-width: 3px !important;
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.9));
}

.theme-wood .svg-piece {
    stroke: #3e2723;
    stroke-width: 2px;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.6));
}

.theme-zen .svg-piece {
    stroke: #1a202c;
    stroke-width: 1.5px;
    opacity: 0.9;
}

.target-silhouette {
    fill: #090b14;
    stroke: #090b14; /* Matches fill to seamlessly hide internal gaps */
    stroke-width: 1.5px;
}

.target-layer-silhouette {
    /* Casts a glowing outline around the entire merged shape group */
    filter: drop-shadow(0 0 3px #00e5ff) drop-shadow(0 0 10px rgba(0, 229, 255, 0.6));
}

.target-guided {
    fill: rgba(15, 23, 42, 0.7);
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2px;
    stroke-dasharray: 4 3;
}

/* Control Dock */
.control-dock {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 14px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 10;
    animation: popUp-b-71f0dsplqy 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popUp-b-71f0dsplqy {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.dock-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.dock-btn:hover {
    background: rgba(0, 188, 212, 0.4);
    transform: scale(1.1);
}

/* Sandbox Bar */
.sandbox-bar {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    max-width: 1100px;
    justify-content: center;
}

.sandbox-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    width: 260px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    background: linear-gradient(135deg, #1e293b11 0%, #0f172a11 100%);
    border: 2px solid #00e5ff;
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.3);
    animation: scaleIn-b-71f0dsplqy 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn-b-71f0dsplqy {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.stars-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 2.5rem;
}

.star {
    color: #475569;
    transition: color 0.3s ease;
}

.star.filled {
    color: #ffd54f;
    filter: drop-shadow(0 0 8px #ffd54f);
}

/* Keyboard Help Toast */
.help-toast {
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.kbd {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: monospace;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .help-toast {
        display: none !important;
    }
    
    .board-container {
        flex-direction: column;
        align-items: center;
    }
    
    .control-dock {
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 10px 0 20px 0;
        animation: none;
    }
    
    .dock-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
        background: rgba(255, 255, 255, 0.15);
    }
}
/* /Modules/Impesoft.Module.Arcade/Index.razor.rz.scp.css */
.white {
    color: white;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, 1px 1px 0 black, 1px 1px 0 black, 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em black;
    text-align: center;
}

.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin-top: 2rem;
    justify-content: center;
}

.game-tile {
    background: rgba(10, 10, 30, 0.85);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.game-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-tile:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: rgba(0, 200, 255, 0.6);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 150, 255, 0.4);
    background: rgba(20, 20, 50, 0.95);
}

.game-tile:hover::before {
    opacity: 1;
}

.game-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.game-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 6px rgba(0,0,0,0.6));
    transition: transform 0.3s ease;
}

.game-tile:hover .game-icon svg {
    transform: scale(1.1) rotate(2deg);
}

.game-title {
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px black;
    margin: 0;
    text-align: center;
    font-family: 'Press Start 2P', monospace, sans-serif;
    letter-spacing: 1px;
    z-index: 1;
}

/* Crypt Crawler 3D (Arcade/Games/CryptCrawler.razor), scoped under .cc-page */
.cc-page #bg {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    opacity: 0.25;
    object-fit: cover;
}

.cc-page .top-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 12px;
    z-index: 10;
}

.cc-page .arcade-btn {
    background: linear-gradient(135deg, #111122 0%, #222244 100%);
    color: #00ffff;
    border: 2px solid #00ffff;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.cc-page .arcade-btn:hover:not(:disabled) {
    background: #00ffff;
    color: #111122;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

.cc-page .arcade-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.cc-page .rc-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

.cc-page .rc-hud {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(20, 12, 6, 0.9);
    border: 2px solid #ff8800;
    border-radius: 8px 8px 0 0;
    padding: 8px 16px;
    box-shadow: 0 0 15px rgba(255, 136, 0, 0.35);
}

.cc-page .hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.cc-page .hud-item.health {
    flex: 1 1 140px;
    max-width: 200px;
}

.cc-page .hud-label {
    font-size: 11px;
    color: #aaa;
    font-weight: bold;
    letter-spacing: 1px;
}

.cc-page .hud-value {
    font-size: 18px;
    font-weight: 900;
    font-family: monospace;
}

.cc-page .hud-value.small { font-size: 13px; }
.cc-page .hud-value.yellow { color: #ffff00; }
.cc-page .hud-value.cyan { color: #00ffff; }
.cc-page .hud-value.red { color: #ff3366; }
.cc-page .hud-value.gold { color: #ffcc33; }
.cc-page .hud-value.white { color: #ffffff; }
.cc-page .hud-value.good { color: #44ff88; }
.cc-page .hud-value.warn { color: #ffcc00; }
.cc-page .hud-value.danger { color: #ff3344; }

.cc-page .health-bar {
    width: 100%;
    height: 10px;
    margin: 4px 0 2px;
    background: #2a1a10;
    border: 1px solid #553;
    border-radius: 3px;
    overflow: hidden;
}

.cc-page .health-fill {
    height: 100%;
    transition: width 0.2s ease;
}

.cc-page .health-fill.good { background: linear-gradient(90deg, #11aa55, #44ff88); }
.cc-page .health-fill.warn { background: linear-gradient(90deg, #aa7700, #ffcc00); }
.cc-page .health-fill.danger { background: linear-gradient(90deg, #880011, #ff3344); }

.cc-page .rc-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000;
    border: 2px solid #ff8800;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 136, 0, 0.3);
    overflow: hidden;
}

.cc-page #rc-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    cursor: crosshair;
    touch-action: none;
}

.cc-page .rc-toast {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffcc33;
    font-family: monospace;
    font-weight: bold;
    font-size: 15px;
    border-radius: 4px;
    pointer-events: none;
}

.cc-page .rc-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    overflow-y: auto;
    gap: 6px;
    padding: 16px;
    text-align: center;
    color: #fff;
    background: radial-gradient(ellipse at center, rgba(10, 5, 0, 0.55) 0%, rgba(0, 0, 0, 0.85) 100%);
}

.cc-page .rc-overlay h2 {
    margin: 0 0 6px;
    font-size: clamp(22px, 4vw, 34px);
    color: #ffaa33;
    text-shadow: 0 0 12px #ff6600;
}

.cc-page .rc-overlay.danger h2 {
    color: #ff3344;
    text-shadow: 0 0 12px #ff0022;
}

.cc-page .rc-overlay p {
    margin: 0 0 8px;
    max-width: 520px;
    color: #ddd;
}

.cc-page .rc-title {
    outline: none;
    margin: 0 0 8px;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: clamp(30px, 7vw, 64px);
    letter-spacing: 3px;
    color: #ffcc66;
    text-shadow: 0 0 6px #ff6600, 0 4px 0 #662200;
}

.cc-page .rc-title span {
    color: #ff4422;
}

.cc-page .rc-sub {
    font-size: 13px;
    color: #aaa !important;
}

.cc-page .rc-floor-name {
    font-style: italic;
    color: #ffcc66 !important;
}

.cc-page .rc-stats {
    margin: 4px 0 14px;
    font-family: monospace;
    font-size: 16px;
    border-collapse: collapse;
}

.cc-page .rc-stats td {
    padding: 2px 12px;
}

.cc-page .rc-stats td:first-child {
    color: #aaa;
    text-align: right;
}

.cc-page .rc-stats td:last-child {
    color: #fff;
    text-align: left;
}

.cc-page .modal-btn {
    background: #ff6600;
    color: #fff;
    border: none;
    padding: 10px 28px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 102, 0, 0.6);
    transition: transform 0.15s ease;
}

.cc-page .modal-btn:hover {
    transform: scale(1.05);
}

.cc-page .controls-panel {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cc-page .desktop-instructions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    color: #ffaa33;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 136, 0, 0.3);
}

.cc-page .rc-touch,
.cc-page .rc-touch-hint {
    display: none;
}

.cc-page .rc-touch {
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 480px;
    user-select: none;
    -webkit-user-select: none;
}

.cc-page .rc-touch-hint {
    margin: 0;
    color: #aaa;
    font-size: 12px;
}

.cc-page .rc-dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.cc-page .dpad-middle {
    display: flex;
    gap: 54px;
}

.cc-page .dpad-btn {
    width: 54px;
    height: 54px;
    background: rgba(40, 25, 10, 0.85);
    color: #fff;
    border: 2px solid #ff8800;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    touch-action: none;
}

.cc-page .rc-actions {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "use fire" "map fire";
    gap: 8px;
    align-items: center;
}

.cc-page .action-btn {
    color: #fff;
    font-weight: bold;
    border-radius: 10px;
    border: 2px solid #fff;
    cursor: pointer;
    touch-action: none;
}

.cc-page .action-btn.use { grid-area: use; width: 64px; height: 44px; background: #335577; }
.cc-page .action-btn.map { grid-area: map; width: 64px; height: 44px; background: #444; }

.cc-page .action-btn.fire {
    grid-area: fire;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #ff3300;
    box-shadow: 0 0 15px rgba(255, 51, 0, 0.6);
}

@media (pointer: coarse), (max-width: 700px) {
    .cc-page .rc-touch { display: flex; }
    .cc-page .rc-touch-hint { display: block; }
    .cc-page .desktop-instructions { display: none; }
}

@media (max-width: 600px) {
    .cc-page .hide-narrow { display: none; }
    .cc-page .rc-hud { padding: 6px 8px; }
    .cc-page .hud-value { font-size: 15px; }
}

/* Knightmare (Arcade/Games/Knightmare.razor), scoped under .km-page */
.km-page #bg {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    opacity: 0.25;
    object-fit: cover;
}

.km-page .top-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 12px;
    z-index: 10;
}

.km-page .arcade-btn {
    background: linear-gradient(135deg, #111122 0%, #222244 100%);
    color: #00ffff;
    border: 2px solid #00ffff;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.km-page .arcade-btn:hover:not(:disabled) {
    background: #00ffff;
    color: #111122;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

.km-page .arcade-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* The MSX screen is 4:3 at 256x192; keep it there. */
.km-page .km-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

.km-page .km-hud {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    background: #000;
    border: 3px solid #5455ed;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 6px 10px;
}

.km-page .hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.km-page .hud-label {
    font-size: 11px;
    color: #7d76fc;
    font-weight: bold;
    letter-spacing: 2px;
}

.km-page .hud-value {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 1px;
}

.km-page .hud-value.small { font-size: 13px; }
.km-page .hud-value.white { color: #fff; }
.km-page .hud-value.yellow { color: #e6ce80; }
.km-page .hud-value.cyan { color: #42ebf5; }
.km-page .hud-value.red { color: #fc5554; }

.km-page .km-progress {
    width: 100%;
    height: 4px;
    background: #222;
    border-left: 3px solid #5455ed;
    border-right: 3px solid #5455ed;
    box-sizing: border-box;
}

.km-page .km-progress div {
    height: 100%;
    background: linear-gradient(90deg, #21b03b, #5edc78);
}

.km-page .km-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    border: 3px solid #5455ed;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 24px rgba(84, 85, 237, 0.4);
    overflow: hidden;
}

.km-page #km-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.km-page .km-banner {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: rgba(0, 0, 0, 0.75);
    color: #e6ce80;
    font-size: clamp(16px, 3.5vw, 26px);
    font-weight: 900;
    letter-spacing: 3px;
    white-space: nowrap;
    pointer-events: none;
}

.km-page .km-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    overflow-y: auto;
    gap: 6px;
    padding: 14px;
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.78);
}

.km-page .km-overlay h2 {
    margin: 0 0 4px;
    font-size: clamp(22px, 4.5vw, 34px);
    color: #e6ce80;
    letter-spacing: 3px;
}

.km-page .km-overlay h2.red { color: #fc5554; }

.km-page .km-overlay p {
    margin: 0 0 6px;
    color: #ccc;
}

.km-page .km-title {
    outline: none;
    margin: 0;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: clamp(34px, 9vw, 72px);
    letter-spacing: 4px;
    color: #fc5554;
    text-shadow: 3px 3px 0 #5455ed, 6px 6px 0 #000;
}

.km-page .km-tribute {
    font-size: 12px;
    color: #7d76fc !important;
    letter-spacing: 1px;
}

.km-page .km-tips {
    margin: 4px 0;
    padding: 0;
    list-style: none;
    max-width: 520px;
    font-size: 13px;
    color: #ddd;
}

.km-page .km-tips li { margin: 3px 0; }

.km-page .q {
    display: inline-block;
    padding: 0 4px;
    background: #966e3c;
    color: #e6ce80;
    font-weight: bold;
}

.km-page .km-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 6px;
    max-width: 520px;
    margin: 4px 0 10px;
    font-size: 12px;
    color: #ccc;
}

.km-page .gem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    transform: rotate(45deg);
    font-size: 10px;
    font-weight: bold;
    color: #000;
}

.km-page .gem.blue { background: #7d76fc; }
.km-page .gem.red { background: #fc5554; }
.km-page .gem.yellow { background: #e6ce80; }
.km-page .gem.cyan { background: #42ebf5; }
.km-page .gem.green { background: #5edc78; }
.km-page .gem.magenta { background: #c95bba; }

.km-page .modal-btn {
    background: #5455ed;
    color: #fff;
    border: 2px solid #fff;
    padding: 9px 26px;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.km-page .modal-btn:hover {
    transform: scale(1.05);
}

.km-page .controls-panel {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.km-page .desktop-instructions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    color: #7d76fc;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(84, 85, 237, 0.5);
}

.km-page .km-touch {
    display: none;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 440px;
    user-select: none;
    -webkit-user-select: none;
}

.km-page .km-dpad {
    display: grid;
    grid-template-columns: repeat(3, 54px);
    grid-template-rows: repeat(3, 54px);
    grid-template-areas: ". up ." "left . right" ". down .";
    gap: 2px;
}

.km-page .dpad-btn {
    background: rgba(20, 20, 60, 0.85);
    color: #fff;
    border: 2px solid #5455ed;
    border-radius: 8px;
    font-size: 20px;
    touch-action: none;
}

.km-page .fire-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #d4524d;
    color: #fff;
    border: 3px solid #fff;
    font-weight: bold;
    font-size: 18px;
    touch-action: none;
}

@media (pointer: coarse), (max-width: 700px) {
    .km-page .km-touch { display: flex; }
    .km-page .desktop-instructions { display: none; }
}

@media (max-width: 560px) {
    .km-page .hide-narrow { display: none; }
    .km-page .hud-value { font-size: 14px; }
}

/* Arcade leaderboard (Arcade/Components/Leaderboard.razor) */
.leaderboard {
    width: min(320px, 100%);
    margin: 6px auto;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #eee;
    font-family: 'Courier New', monospace;
    text-align: left;
}

.leaderboard h3 {
    margin: 0 0 6px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffcc66;
    text-align: center;
}

.leaderboard .lb-submit-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.leaderboard .lb-submit-row input {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    background: #111;
    color: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    font: inherit;
}

.leaderboard .lb-submit-row button {
    margin: 0;
    padding: 5px 10px;
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 4px;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.leaderboard .lb-submit-row button:disabled {
    opacity: 0.5;
    cursor: default;
}

.leaderboard ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.leaderboard li {
    display: flex;
    gap: 8px;
    padding: 2px 4px;
    font-size: 14px;
}

.leaderboard li.lb-mine {
    background: rgba(255, 204, 102, 0.25);
    border-radius: 3px;
}

.leaderboard .lb-pos {
    width: 2ch;
    color: #999;
    text-align: right;
}

.leaderboard .lb-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard .lb-score {
    color: #ffcc66;
    font-weight: bold;
}

.leaderboard .lb-rank {
    margin: 0 0 6px;
    color: #66ff99;
    text-align: center;
}

.leaderboard .lb-muted,
.leaderboard .lb-error {
    margin: 4px 0;
    font-size: 13px;
    text-align: center;
}

.leaderboard .lb-muted { color: #aaa; }
.leaderboard .lb-error { color: #ff6666; }

/* Online lobby for Chess and Connect 4 (Arcade/Components/OnlineLobby.razor) */
.lobby {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(520px, 100%);
    margin: 10px auto;
    padding: 12px 14px;
    background: rgba(10, 10, 30, 0.85);
    border: 2px solid #00ffff;
    border-radius: 10px;
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.25);
    color: #eee;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
}

.lobby .lobby-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.lobby input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    background: #0b0b18;
    color: #fff;
    border: 1px solid #446;
    border-radius: 6px;
    font: inherit;
}

.lobby input.lobby-code {
    flex: 0 0 76px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    font-family: monospace;
    font-weight: bold;
}

.lobby button {
    margin: 0;
    padding: 7px 14px;
    background: #222244;
    color: #00ffff;
    border: 1px solid #00ffff;
    border-radius: 6px;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.lobby button.lobby-primary {
    background: #00b8c4;
    color: #001;
    border-color: #00ffff;
}

.lobby button.lobby-small {
    padding: 4px 10px;
    font-size: 13px;
}

.lobby button:disabled {
    opacity: 0.45;
    cursor: default;
}

.lobby .lobby-or {
    color: #888;
    font-size: 13px;
}

.lobby .lobby-room-row {
    justify-content: space-between;
}

.lobby .lobby-room-code {
    font-family: monospace;
    font-size: 20px;
    letter-spacing: 4px;
    color: #ffff66;
}

.lobby .lobby-players {
    display: grid;
    gap: 4px;
}

.lobby .lobby-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.lobby .lobby-player.lobby-on-turn {
    border-color: #ffff66;
    background: rgba(255, 255, 102, 0.08);
}

.lobby .lobby-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #fff;
}

/* Seat 0 moves first: white in chess, red in Connect 4. Pages can restyle through ::deep if needed. */
.lobby .lobby-swatch.lobby-seat-0 { background: linear-gradient(135deg, #fff, #ff4d4d); }
.lobby .lobby-swatch.lobby-seat-1 { background: linear-gradient(135deg, #333, #ffd700); }

.lobby .lobby-label {
    width: 64px;
    color: #9cf;
    font-size: 13px;
}

.lobby .lobby-name {
    flex: 1;
    font-weight: bold;
}

.lobby .lobby-away {
    color: #ffaa44;
    font-size: 12px;
}

.lobby .lobby-status {
    margin: 0;
    text-align: center;
    color: #fff;
}

.lobby .lobby-muted {
    margin: 0;
    color: #aaa;
    text-align: center;
}

.lobby .lobby-error {
    margin: 0;
    color: #ff6b6b;
    text-align: center;
}

/* Chess game-mode switch (Arcade/Games/Chess.razor) */
.chess-container .mode-switch {
    display: flex;
    border: 2px solid #00ffff;
    border-radius: 6px;
    overflow: hidden;
}

.chess-container .mode-switch button {
    margin: 0;
    padding: 8px 12px;
    background: #111122;
    color: #00ffff;
    border: none;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
}

.chess-container .mode-switch button + button {
    border-left: 1px solid #00ffff;
}

.chess-container .mode-switch button.active {
    background: #00ffff;
    color: #111122;
}

.chess-container .controls {
    flex-wrap: wrap;
}
