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

:root {
    --arcade-bg: #0a0a0a;
    --arcade-dark: #000000;
    --arcade-red: #ff0040;
    --arcade-blue: #00d4ff;
    --arcade-green: #00ff41;
    --arcade-yellow: #ffeb3b;
    --arcade-purple: #b400ff;
    --arcade-pink: #ff00ff;
    --screen-glow: #00ff41;
    --neon-glow: rgba(0, 255, 65, 0.8);
}

body {
    font-family: 'Press Start 2P', monospace;
    background: var(--arcade-dark);
    color: var(--arcade-green);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.08) 0px,
            rgba(0, 0, 0, 0.08) 1px,
            transparent 1px,
            transparent 2px
        );
    pointer-events: none;
    z-index: 1000;
    animation: scanlineMove 0.1s linear infinite;
    transition: opacity 0.5s ease;
}

/* Hide scanlines over game area when playing */
.scanlines.hide-over-game {
    opacity: 0;
}

@keyframes scanlineMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Arcade Container */
.arcade-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* Arcade Header */
.arcade-header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    position: relative;
    transition: all 0.5s ease;
}

.arcade-header.compact {
    margin-bottom: 10px;
    transform: scale(0.8);
}

.arcade-title h1 {
    font-size: 48px;
    color: var(--arcade-green);
    text-shadow: 
        0 0 10px var(--neon-glow),
        0 0 20px var(--neon-glow),
        0 0 30px var(--neon-glow),
        0 0 40px var(--neon-glow);
    margin-bottom: 10px;
    letter-spacing: 8px;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--neon-glow),
            0 0 20px var(--neon-glow),
            0 0 30px var(--neon-glow),
            0 0 40px var(--neon-glow);
    }
    50% {
        text-shadow: 
            0 0 20px var(--neon-glow),
            0 0 30px var(--neon-glow),
            0 0 40px var(--neon-glow),
            0 0 50px var(--neon-glow),
            0 0 60px var(--neon-glow);
    }
}

.title-glow {
    animation: titlePulse 2s ease-in-out infinite;
}

.title-subtitle {
    font-size: 14px;
    color: var(--arcade-blue);
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--arcade-blue);
}

.arcade-lights {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.light {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: lightBlink 1.5s ease-in-out infinite;
}

.light-1 {
    background: var(--arcade-red);
    box-shadow: 0 0 20px var(--arcade-red);
    animation-delay: 0s;
}

.light-2 {
    background: var(--arcade-blue);
    box-shadow: 0 0 20px var(--arcade-blue);
    animation-delay: 0.3s;
}

.light-3 {
    background: var(--arcade-green);
    box-shadow: 0 0 20px var(--arcade-green);
    animation-delay: 0.6s;
}

.light-4 {
    background: var(--arcade-yellow);
    box-shadow: 0 0 20px var(--arcade-yellow);
    animation-delay: 0.9s;
}

@keyframes lightBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    margin-top: 40px;
    position: relative;
    transition: all 0.5s ease;
    width: 100%;
    max-width: 100%;
    align-self: center;
    box-sizing: border-box;
    min-height: 600px;
}

.main-content:has(.games-sidebar.hidden) {
    gap: 0;
}

/* Games Sidebar (Left) */
.games-sidebar {
    width: 400px;
    min-width: 400px;
    height: 700px;
    min-height: 700px;
    max-height: none;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 4px solid var(--arcade-green);
    border-radius: 15px;
    padding: 20px 10px 20px 20px;
    box-shadow: 
        0 0 30px rgba(0, 255, 65, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.games-sidebar.hidden {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0;
    pointer-events: none;
    margin: 0 !important;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-title {
    font-size: 18px;
    color: var(--arcade-green);
    text-shadow: 0 0 10px var(--neon-glow);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 4px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--arcade-green);
    white-space: nowrap;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    gap: 20px;
    overflow-y: auto;
    overflow-x: visible;
    flex: 1 1 auto;
    min-height: 400px;
    padding: 10px 10px 0 0;
    align-content: start;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.games-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Game Card */
.game-card {
    background: var(--arcade-dark);
    border: 3px solid var(--arcade-green);
    border-radius: 10px;
    overflow: visible;
    cursor: grab;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    aspect-ratio: 1 / 1;
    min-width: 0;
    width: 100%;
    z-index: 10;
}

.game-card:hover {
    transform: translateX(5px) scale(1.01);
    border-color: var(--arcade-blue);
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.5),
        0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 20;
}

.game-card:active {
    cursor: grabbing;
    transform: translateX(3px) scale(0.98);
}

.game-card.dragging {
    opacity: 0;
    visibility: hidden;
    cursor: grabbing;
    z-index: 1000;
}

.game-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.8);
    z-index: 10;
}

.game-card.coming-soon:hover {
    transform: none;
    border-color: var(--arcade-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    z-index: 10;
}

.game-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 10px;
}

.game-preview {
    width: 100%;
    flex: 1;
    background: var(--arcade-dark);
    position: relative;
    overflow: hidden;
}

.game-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: pixelated;
    filter: contrast(1.2) brightness(0.9);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-indicator {
    font-size: 20px;
    color: var(--arcade-green);
    text-shadow: 0 0 10px var(--neon-glow);
    animation: playPulse 1s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.coming-soon-screen {
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            #1a1a1a 0px,
            #1a1a1a 10px,
            #0a0a0a 10px,
            #0a0a0a 20px
        );
    display: flex;
    align-items: center;
    justify-content: center;
}

.coming-soon-text {
    font-size: 12px;
    color: var(--arcade-yellow);
    text-shadow: 0 0 10px var(--arcade-yellow);
    animation: comingSoonBlink 2s ease-in-out infinite;
}

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

.game-info {
    padding: 10px 12px;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
    border-top: 2px solid var(--arcade-green);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.game-name {
    font-size: 12px;
    color: var(--arcade-green);
    text-shadow: 0 0 10px var(--neon-glow);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.game-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 8px;
    padding: 3px 6px;
    background: var(--arcade-dark);
    border: 1px solid var(--arcade-blue);
    color: var(--arcade-blue);
    text-shadow: 0 0 5px var(--arcade-blue);
    border-radius: 4px;
}

/* TV Center */
.tv-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    max-width: 100%;
}

.tv-wrapper {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.5s ease;
    margin: 0 auto;
    box-sizing: border-box;
}

/* TV Container Active State (Playing) */
.tv-center.active {
    flex: 2;
    align-self: center;
    margin: 0 auto;
}

.tv-center.active .tv-wrapper {
    max-width: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.tv-center.active .tv-container {
    width: 100%;
    max-width: 500px; /* Enforce fixed max width */
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.tv-container {
    position: relative;
    width: 100%;
    transition: all 0.5s ease;
    display: flex;
    justify-content: center; /* Center content */
}

/* TV Screen */
.tv-screen {
    position: relative;
    width: 100%;
    /* Remove aspect-ratio default here to allow flex sizing if needed, 
       but keeping it for the default TV shape is fine. */
    aspect-ratio: 4 / 3;
    background: var(--arcade-dark);
    border: 8px solid #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 
        0 0 0 12px #333,
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 0 50px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(0, 255, 65, 0.2);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2; /* Ensure screen is above frame */
}

/* Block scanlines over TV screen when game is active */
.tv-center.active .tv-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1001; /* Above scanlines (z-index 1000) */
    pointer-events: none;
}

.tv-center.active .tv-screen {
    border-radius: 4px; /* Less rounded when playing */
    box-shadow: 
        0 0 0 12px #333,
        0 30px 100px rgba(0, 255, 65, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: default;
    aspect-ratio: 320 / 480;
    width: 100%;
    margin: 0 auto;
}

.tv-screen:hover {
    transform: scale(1.02);
    box-shadow: 
        0 0 0 12px #333,
        0 30px 80px rgba(99, 102, 241, 0.4),
        inset 0 0 50px rgba(99, 102, 241, 0.1),
        0 0 60px rgba(0, 255, 65, 0.4);
    border-color: rgba(0, 255, 65, 0.5);
}

.tv-center.active .tv-screen:hover {
    transform: none;
}

/* Close Game Button - Removed from TV screen, now in like/dislike bar */

/* Like/Dislike Bar */
.like-dislike-bar {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 3px solid var(--arcade-green);
    border-radius: 10px;
    border-top: 3px solid var(--arcade-green);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    margin-top: 25px;
    box-shadow: 
        0 0 20px rgba(0, 255, 65, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
    gap: 10px;
    flex-wrap: nowrap;
}

.like-dislike-bar.hidden {
    opacity: 0;
    transform: translateY(-20px);
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

.left-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.exit-game-btn {
    background: rgba(255, 0, 64, 0.8);
    color: white;
    border: 2px solid #ff3366;
    padding: 6px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
    white-space: nowrap;
    line-height: 1.2;
}

.exit-game-btn:hover {
    background: #ff0040;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.8);
}

.fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(0, 212, 255, 0.2);
    color: var(--arcade-blue);
    border: 2px solid var(--arcade-blue);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    min-width: 36px;
    min-height: 36px;
}

.fullscreen-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.fullscreen-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.like-dislike-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.like-dislike-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--arcade-green);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 9px;
    font-family: 'Press Start 2P', monospace;
    white-space: nowrap;
    line-height: 1.2;
}

.like-dislike-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.like-dislike-btn.active.like {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.like-dislike-btn.active.dislike {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.like-dislike-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.like-dislike-count {
    font-size: 9px;
    color: var(--arcade-green);
    margin-left: 2px;
    flex-shrink: 0;
}

.like-dislike-btn.active .like-dislike-count {
    color: inherit;
}

/* TV Static Effect */
.tv-static {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 1px,
            transparent 2px
        );
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    animation: staticFlicker 0.15s infinite;
}

/* Hide static effect when game is active */
.tv-center.active .tv-static {
    display: none;
}

.static-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: staticMove 0.3s infinite;
}

@keyframes staticFlicker {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes staticMove {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
    100% { transform: translate(0, 0); }
}

/* TV Content */
.tv-content {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    z-index: 1001; /* Above scanlines */
}

/* Block scanlines over TV screen when active */
.tv-center.active .tv-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1001;
    pointer-events: none;
}

.tv-placeholder {
    text-align: center;
    color: var(--arcade-green);
    padding: 20px;
}

.tv-logo {
    font-size: 32px;
    color: var(--arcade-green);
    margin: 0;
    text-shadow: 
        0 0 20px var(--neon-glow),
        0 0 40px var(--neon-glow);
    animation: glow 2s ease-in-out infinite alternate;
    letter-spacing: 4px;
}

@keyframes glow {
    from { 
        text-shadow: 
            0 0 20px var(--neon-glow),
            0 0 40px var(--neon-glow);
    }
    to { 
        text-shadow: 
            0 0 30px var(--neon-glow),
            0 0 50px var(--neon-glow),
            0 0 70px var(--neon-glow);
    }
}


/* TV Frame */
.tv-frame {
    position: absolute;
    width: calc(100% + 24px);
    height: calc(100% + 24px);
    top: -12px;
    left: -12px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: -1;
    transition: all 0.5s ease;
}

.tv-center.active .tv-frame {
    border-radius: 10px;
}

/* TV Controls */
.tv-controls {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 5;
    transition: all 0.5s ease;
}

.tv-center.active .tv-controls {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.tv-button {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    border-radius: 50%;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    border: 2px solid #1a1a1a;
}

/* Drop Zone Indicator */
.tv-screen.drop-zone {
    border-color: var(--arcade-blue);
    box-shadow: 
        0 0 0 12px #333,
        0 20px 60px rgba(0, 212, 255, 0.6),
        inset 0 0 50px rgba(0, 212, 255, 0.2),
        0 0 60px rgba(0, 212, 255, 0.5);
    animation: dropZonePulse 1s ease-in-out infinite;
}

@keyframes dropZonePulse {
    0%, 100% { 
        border-color: var(--arcade-blue);
        box-shadow: 
            0 0 0 12px #333,
            0 20px 60px rgba(0, 212, 255, 0.6),
            inset 0 0 50px rgba(0, 212, 255, 0.2),
            0 0 60px rgba(0, 212, 255, 0.5);
    }
    50% { 
        border-color: var(--arcade-green);
        box-shadow: 
            0 0 0 12px #333,
            0 30px 80px rgba(0, 255, 65, 0.8),
            inset 0 0 50px rgba(0, 255, 65, 0.3),
            0 0 80px rgba(0, 255, 65, 0.7);
    }
}

/* Game Info Panel (Bottom) */
.game-info-panel {
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 3px solid var(--arcade-green);
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 
        0 0 30px rgba(0, 255, 65, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
    max-height: none;
    overflow-y: auto;
    overflow-x: visible;
}

.game-info-panel.hidden {
    opacity: 0;
    transform: translateY(20px);
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--arcade-blue);
    padding-bottom: 10px;
}

.info-header h2 {
    font-size: 18px;
    color: var(--arcade-green);
    text-shadow: 0 0 10px var(--neon-glow);
}

.info-meta {
    display: flex;
    gap: 10px;
}

.info-description p {
    font-size: 12px;
    line-height: 1.6;
    color: #ccc;
}

/* More Games Carousel */
.more-games-carousel {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--arcade-blue);
}

.carousel-header {
    margin-bottom: 15px;
}

.carousel-header h3 {
    font-size: 14px;
    color: var(--arcade-green);
    text-shadow: 0 0 10px var(--neon-glow);
    letter-spacing: 2px;
}

.carousel-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.carousel-container::-webkit-scrollbar {
    height: 8px;
}

.carousel-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: var(--arcade-green);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--neon-glow);
}

.carousel-container::-webkit-scrollbar-thumb:hover {
    background: var(--arcade-blue);
    box-shadow: 0 0 10px var(--arcade-blue);
}

.carousel-game-card {
    flex: 0 0 180px;
    background: var(--arcade-dark);
    border: 2px solid var(--arcade-green);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    position: relative;
}

.carousel-game-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--arcade-blue);
    box-shadow: 
        0 0 25px rgba(0, 212, 255, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.carousel-game-preview {
    width: 100%;
    height: 100px;
    background: var(--arcade-dark);
    position: relative;
    overflow: hidden;
}

.carousel-game-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: pixelated;
    filter: contrast(1.2) brightness(0.9);
}

.carousel-game-preview .coming-soon-screen {
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            #1a1a1a 0px,
            #1a1a1a 10px,
            #0a0a0a 10px,
            #0a0a0a 20px
        );
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-game-preview .coming-soon-text {
    font-size: 10px;
    color: var(--arcade-yellow);
    text-shadow: 0 0 10px var(--arcade-yellow);
    animation: comingSoonBlink 2s ease-in-out infinite;
}

.carousel-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-game-card:hover .carousel-game-overlay {
    opacity: 1;
}

.carousel-play-indicator {
    font-size: 16px;
    color: var(--arcade-green);
    text-shadow: 0 0 10px var(--neon-glow);
    animation: playPulse 1s ease-in-out infinite;
}

.carousel-game-info {
    padding: 10px;
    background: linear-gradient(to bottom, #1a1a1a 0%, #0a0a0a 100%);
    border-top: 1px solid var(--arcade-green);
}

.carousel-game-name {
    font-size: 10px;
    color: var(--arcade-green);
    text-shadow: 0 0 8px var(--neon-glow);
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-game-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.carousel-tag {
    font-size: 7px;
    padding: 2px 5px;
    background: var(--arcade-dark);
    border: 1px solid var(--arcade-blue);
    color: var(--arcade-blue);
    text-shadow: 0 0 5px var(--arcade-blue);
    border-radius: 3px;
}

/* Controls Sidebar (Right) */
.controls-sidebar {
    width: 300px;
    max-width: 300px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 3px solid var(--arcade-blue);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    opacity: 1;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateX(0);
    transition: all 0.5s ease;
    z-index: 10;
    box-sizing: border-box;
}

.controls-sidebar.hidden {
    border: none;
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
    visibility: hidden;
}

.controls-list, .stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-item, .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    font-size: 12px;
}

.key-icon {
    padding: 5px 10px;
    background: var(--arcade-dark);
    border: 2px solid var(--arcade-yellow);
    border-radius: 5px;
    color: var(--arcade-yellow);
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.3);
}

.stat-value {
    color: var(--arcade-red);
    text-shadow: 0 0 5px var(--arcade-red);
}

/* Drag Preview */
.drag-preview {
    position: fixed;
    width: 200px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease;
}

.drag-preview.active {
    opacity: 1;
}

.drag-preview .game-card {
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.5);
}

/* Instructions */
.instructions {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--arcade-green);
    border-radius: 10px;
}

.instructions-content p {
    font-size: 12px;
    color: var(--arcade-green);
    text-shadow: 0 0 10px var(--neon-glow);
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }
    
    .tv-center.active .tv-wrapper {
        max-width: 100%;
    }
    
    .controls-sidebar {
        position: static;
        width: 100%;
        max-width: 500px;
        margin: 20px auto 0;
        transform: none;
        opacity: 1;
    }
    
    .controls-sidebar.hidden {
        display: none;
    }
    
    .games-sidebar {
        width: 100%;
        min-width: 300px;
        height: 400px;
        min-height: 400px;
        max-width: 600px;
        max-height: 400px;
    }
    
    .tv-center {
        min-height: 400px;
    }
    
    /* Prevent card overlap on smaller screens */
    .game-card:hover {
        transform: scale(1.01);
        z-index: 3;
    }
    
    .games-grid {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .arcade-title h1 {
        font-size: 32px;
    }
    
    .games-sidebar {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
    }
    
    .game-preview {
        aspect-ratio: 1 / 1;
    }
    
    .tv-screen {
        border-width: 4px;
    }
    
    /* Remove hover transform on mobile to prevent overlap */
    .game-card:hover {
        transform: none;
        z-index: 1;
    }
    
    .games-grid {
        gap: 15px;
    }
}

/* Pixel Art Effects */
.game-preview img,
.coming-soon-screen {
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
