/* Sydney's Hype Machine - Viral Style Edition */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a, #0f0f0f, #1a1a1a, #0a0a0a);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 65, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 65, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(0, 255, 65, 0.01) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Header */
.game-header {
    margin-bottom: 21px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.game-title {
    font-size: 4rem;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 
        0 0 0 #00ff88,
        0 0 0.75px #00ff88,
        0 0 1.5px #00ff88,
        0 0 2.25px #00ff88,
        0 0 3px #00ff88,
        0 0 3.75px #00ff88;
    letter-spacing: 0.2em;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    animation: titleGlow 3s ease-in-out infinite, titleFloat 6s ease-in-out infinite;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    text-transform: uppercase;
    image-rendering: pixelated;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



@keyframes titleGlow {
    0%, 100% { 
        filter: brightness(1);
        transform: scale(1) rotateY(0deg);
        text-shadow: 
            0 0 0 #00ff88,
            0 0 0.75px #00ff88,
            0 0 1.5px #00ff88,
            0 0 2.25px #00ff88,
            0 0 3px #00ff88,
            0 0 3.75px #00ff88;
    }
    50% { 
        filter: brightness(1.1);
        transform: scale(1.02) rotateY(1deg);
        text-shadow: 
            0 0 0 #00ff88,
            0 0 0.75px #00ff88,
            0 0 1.5px #00ff88,
            0 0 2.25px #00ff88,
            0 0 3px #00ff88,
            0 0 3.75px #00ff88,
            0 0 4.5px #00ff88;
    }
}

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg);
    }
    25% {
        transform: translateY(-5px) rotateY(2deg);
    }
    50% {
        transform: translateY(-8px) rotateY(0deg);
    }
    75% {
        transform: translateY(-3px) rotateY(-2deg);
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 1;
    }
}

.header-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.score {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 25px;
    border-radius: 50px;
    border: 2px solid rgba(0, 255, 65, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 255, 65, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

.score::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.score:hover::before {
    left: 100%;
}

/* Button Container - Positioned to the right of companies matched */
.button-container {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

/* Move existing header buttons to the right side of companies matched */
.sound-toggle-btn {
    position: fixed !important;
    top: 50% !important;
    right: 20px !important;
    transform: translateY(-50%) !important;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #00ff41;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 255, 65, 0.1);
    overflow: hidden;
    box-sizing: border-box;
    line-height: 1;
    z-index: 1000;
}

.restart-btn {
    position: fixed !important;
    top: calc(50% + 65px) !important;
    right: 20px !important;
    transform: none !important;
    background: #000000;
    color: #00ff41;
    border: 2px solid rgba(0, 255, 65, 0.3);
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18.75px rgba(0, 255, 65, 0.3);
    overflow: hidden;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
    z-index: 1000;
}



.sound-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.sound-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(0, 255, 65, 0.3);
    border-color: #00ff88;
}

.sound-toggle-btn:hover::before {
    left: 100%;
}

.sound-toggle-btn.muted {
    color: #666;
    border-color: rgba(102, 102, 102, 0.3);
}

.sound-toggle-btn.muted:hover {
    color: #999;
    border-color: rgba(153, 153, 153, 0.5);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(153, 153, 153, 0.2);
}

/* Sound toggle animation */
.sound-toggle-btn.toggling {
    animation: soundTogglePulse 0.3s ease-in-out;
}

@keyframes soundTogglePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}



.restart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.restart-btn:hover {
    box-shadow: 0 9px 26.25px rgba(0, 255, 65, 0.4);
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff88;
}

.restart-btn:hover::before {
    left: 100%;
}

/* Game Container */
.game-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease-in-out;
}

/* TV Frame - Now directly in main content */
.retro-tv-frame {
    flex: 1;
    max-width: 400px;
    height: 500px; /* Match game board height */
    text-align: center;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 25px;
    padding: 20px;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    animation: fadeInUp 0.6s ease-out;
}

.animation-panel::before {
    content: 'SYDNEY VISION';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.3);
}

.animation-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

/* TV Frame Inner Styling */
.retro-tv-frame .tv-inner {
    position: relative;
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.3);
    border: 3px solid #444;
    width: 100%;
    height: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tv-antenna {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, #666, #333);
    border-radius: 1px;
}

.tv-antenna::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    width: 18px;
    height: 18px;
    background: linear-gradient(145deg, #666, #333);
    border-radius: 50%;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

.tv-screen {
    background: #000;
    border-radius: 8px;
    padding: 10px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    position: relative;
    transition: all 0.3s ease;
}

/* Active animation state - when GIF is playing - DISABLED */
/* .tv-screen.animating {
    border-color: #ffff00;
    box-shadow: 
        inset 0 4px 8px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 0, 0.4),
        0 0 40px rgba(255, 255, 0, 0.2);
    animation: tvActiveGlow 1.5s ease-in-out infinite;
}

@keyframes tvActiveGlow {
    0%, 100% {
        border-color: #ffff00;
        box-shadow: 
            inset 0 4px 8px rgba(0, 0, 0, 0.5),
            0 0 20px rgba(255, 255, 0, 0.4),
            0 0 40px rgba(255, 255, 0, 0.2);
    }
    50% {
        border-color: #ffaa00;
        box-shadow: 
            inset 0 4px 8px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(255, 255, 0, 0.6),
            0 0 60px rgba(255, 255, 0, 0.3);
    }
} */

.tv-screen img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    object-position: center;
    border-radius: 4px;
    image-rendering: pixelated;
    filter: contrast(1.2) brightness(0.9);
    max-width: 100%;
    max-height: 100%;
}

.tv-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.tv-knob {
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, #666, #333);
    border-radius: 50%;
    box-shadow: 
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
}

.tv-knob::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #222;
    border-radius: 50%;
}

.animation-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
}

.animation-panel img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.animation-panel img:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.animation-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Main Content - Top row (game + TV) + Bottom row (companies) */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

/* Top Row - Contains game board and TV */
.top-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    background: transparent;
}

/* Right Column - Contains game board */
.right-column {
    flex: 3;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Game Board - Takes most of the space */
.game-board {
    width: 100%;
    height: 500px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 4px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    border-radius: 25px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 255, 65, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 255, 65, 0.1),
        inset 0 1px 0 rgba(0, 255, 65, 0.1);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.game-board::before {
    content: 'GAME';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8));
    color: #00ff41;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 2px solid rgba(0, 255, 65, 0.3);
    box-shadow: 
        0 0 15px rgba(0, 255, 65, 0.2),
        0 0 30px rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
    display: none;
}

.tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    border-radius: 12px;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    user-select: none;
    border: 1px solid rgba(0, 255, 65, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(0, 255, 65, 0.1);
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.tile:hover {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 200, 50, 0.1));
    transform: scale(1.1) rotate(2deg);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 255, 65, 0.3);
    z-index: 10;
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-color: rgba(0, 255, 65, 0.4);
}

.tile:hover::before {
    transform: translateX(100%);
}

.tile.selected {
    background: linear-gradient(45deg, rgba(0, 255, 65, 0.4), rgba(0, 200, 50, 0.3));
    transform: scale(1.15);
    box-shadow: 
        0 0 30px rgba(0, 255, 65, 0.6),
        0 0 50px rgba(0, 255, 65, 0.3);
    animation: selectedPulse 1s ease-in-out infinite;
    transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-color: rgba(0, 255, 65, 0.8);
}

/* Highlighting state for tiles when company is selected */
.tile.highlighted {
    background: linear-gradient(45deg, rgba(255, 255, 0, 0.3), rgba(255, 255, 0, 0.2));
    border-color: #ffff00;
    box-shadow: 
        0 0 20px rgba(255, 255, 0, 0.6),
        0 0 40px rgba(255, 255, 0, 0.3);
    animation: tileHighlightedPulse 1.5s ease-in-out infinite;
    z-index: 5;
}

@keyframes tileHighlightedPulse {
    0%, 100% { 
        box-shadow: 
            0 0 20px rgba(255, 255, 0, 0.6),
            0 0 40px rgba(255, 255, 0, 0.3);
        border-color: #ffff00;
    }
    50% { 
        box-shadow: 
            0 0 30px rgba(255, 255, 0, 0.8),
            0 0 60px rgba(255, 255, 0, 0.4);
        border-color: #ffff00;
    }
}

@keyframes selectedPulse {
    0%, 100% { 
        box-shadow: 
            0 0 30px rgba(0, 255, 65, 0.6),
            0 0 50px rgba(0, 255, 65, 0.3);
        transform: scale(1.15);
    }
    50% { 
        box-shadow: 
            0 0 50px rgba(0, 255, 65, 0.8),
            0 0 80px rgba(0, 255, 65, 0.4);
        transform: scale(1.2);
    }
}

.tile.invalid {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24) !important;
    animation: shake 0.6s ease-in-out;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.6);
}

/* Standard Match-3 Animations and Colors */

/* Regular match animation */
.tile.matched {
    background: linear-gradient(45deg, #00b894, #00cec9);
    animation: matchExplode 0.8s ease-out forwards;
    box-shadow: 0 0 30px rgba(0, 184, 148, 0.8);
    z-index: 10;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}



/* Line clear animation (5+ match) */
.tile.line-clear {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    animation: lineClearExplode 1.5s ease-out forwards;
    box-shadow: 0 0 50px rgba(108, 92, 231, 0.9);
    z-index: 20;
    transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Color bomb animation (L/T shape) */
.tile.color-bomb {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    animation: colorBombExplode 2s ease-out forwards;
    box-shadow: 0 0 60px rgba(253, 203, 110, 0.9);
    z-index: 25;
    transition: all 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover effects for special tiles */

.tile:hover.line-clear {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(108, 92, 231, 1);
}

.tile:hover.color-bomb {
    transform: scale(1.1);
    box-shadow: 0 0 70px rgba(253, 203, 110, 1);
}

/* Match explosion animation */
@keyframes matchExplode {
    0% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: brightness(1);
    }
    15% {
        transform: scale(1.1) rotate(45deg);
        background: linear-gradient(45deg, #00b894, #00cec9);
        filter: brightness(1.3);
        box-shadow: 0 0 20px rgba(0, 184, 148, 0.8);
    }
    30% {
        transform: scale(1.3) rotate(90deg);
        background: linear-gradient(45deg, #00cec9, #74b9ff);
        filter: brightness(1.5);
        box-shadow: 0 0 30px rgba(0, 206, 201, 0.9);
    }
    50% { 
        transform: scale(1.5) rotate(180deg);
        background: linear-gradient(45deg, #fdcb6e, #e17055);
        filter: brightness(1.8);
        box-shadow: 0 0 40px rgba(253, 203, 110, 0.9);
    }
    70% {
        transform: scale(1.3) rotate(270deg);
        background: linear-gradient(45deg, #6c5ce7, #a29bfe);
        filter: brightness(1.5);
        box-shadow: 0 0 35px rgba(108, 92, 231, 0.9);
    }
    85% {
        transform: scale(0.8) rotate(315deg);
        background: linear-gradient(45deg, #fd79a8, #e84393);
        filter: brightness(1.2);
        box-shadow: 0 0 25px rgba(253, 121, 168, 0.8);
    }
    100% { 
        transform: scale(0) rotate(360deg);
        opacity: 0;
        filter: brightness(0);
    }
}



/* Line clear explosion animation */
@keyframes lineClearExplode {
    0% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: brightness(1);
    }
    10% {
        transform: scale(1.3) rotate(45deg);
        background: linear-gradient(45deg, #6c5ce7, #a29bfe);
        filter: brightness(1.4);
        box-shadow: 0 0 30px rgba(108, 92, 231, 0.8);
    }
    20% {
        transform: scale(1.6) rotate(90deg);
        background: linear-gradient(45deg, #a29bfe, #74b9ff);
        filter: brightness(1.6);
        box-shadow: 0 0 50px rgba(162, 155, 254, 0.9);
    }
    35% { 
        transform: scale(2) rotate(135deg);
        background: linear-gradient(45deg, #fdcb6e, #e17055);
        filter: brightness(1.8);
        box-shadow: 0 0 80px rgba(253, 203, 110, 1);
    }
    50% {
        transform: scale(2.2) rotate(180deg);
        background: linear-gradient(45deg, #00b894, #00cec9);
        filter: brightness(2);
        box-shadow: 0 0 100px rgba(0, 184, 148, 1);
    }
    65% {
        transform: scale(1.8) rotate(225deg);
        background: linear-gradient(45deg, #e17055, #d63031);
        filter: brightness(1.7);
        box-shadow: 0 0 70px rgba(225, 112, 85, 0.9);
    }
    80% {
        transform: scale(1.4) rotate(270deg);
        background: linear-gradient(45deg, #fd79a8, #e84393);
        filter: brightness(1.5);
        box-shadow: 0 0 50px rgba(253, 121, 168, 0.9);
    }
    90% {
        transform: scale(1.1) rotate(315deg);
        background: linear-gradient(45deg, #6c5ce7, #a29bfe);
        filter: brightness(1.3);
        box-shadow: 0 0 30px rgba(108, 92, 231, 0.8);
    }
    100% { 
        transform: scale(0) rotate(360deg);
        opacity: 0;
        filter: brightness(0);
    }
}

/* Color bomb explosion animation */
@keyframes colorBombExplode {
    0% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: brightness(1);
    }
    5% {
        transform: scale(1.3) rotate(30deg);
        background: linear-gradient(45deg, #fdcb6e, #e17055);
        filter: brightness(1.5);
        box-shadow: 0 0 40px rgba(253, 203, 110, 0.8);
    }
    10% {
        transform: scale(1.6) rotate(60deg);
        background: linear-gradient(45deg, #e17055, #d63031);
        filter: brightness(1.7);
        box-shadow: 0 0 60px rgba(225, 112, 85, 0.9);
    }
    20% { 
        transform: scale(2.2) rotate(90deg);
        background: linear-gradient(45deg, #6c5ce7, #a29bfe);
        filter: brightness(1.9);
        box-shadow: 0 0 100px rgba(108, 92, 231, 1);
    }
    30% {
        transform: scale(2.5) rotate(135deg);
        background: linear-gradient(45deg, #00b894, #00cec9);
        filter: brightness(2.1);
        box-shadow: 0 0 120px rgba(0, 184, 148, 1);
    }
    40% {
        transform: scale(2.8) rotate(180deg);
        background: linear-gradient(45deg, #e17055, #d63031);
        filter: brightness(2.3);
        box-shadow: 0 0 140px rgba(225, 112, 85, 1);
    }
    50% {
        transform: scale(2.6) rotate(225deg);
        background: linear-gradient(45deg, #fd79a8, #e84393);
        filter: brightness(2.1);
        box-shadow: 0 0 130px rgba(253, 121, 168, 1);
    }
    60% {
        transform: scale(2.3) rotate(270deg);
        background: linear-gradient(45deg, #6c5ce7, #a29bfe);
        filter: brightness(1.9);
        box-shadow: 0 0 110px rgba(108, 92, 231, 1);
    }
    70% {
        transform: scale(2) rotate(315deg);
        background: linear-gradient(45deg, #00b894, #00cec9);
        filter: brightness(1.7);
        box-shadow: 0 0 90px rgba(0, 184, 148, 0.9);
    }
    80% {
        transform: scale(1.7) rotate(360deg);
        background: linear-gradient(45deg, #fdcb6e, #e17055);
        filter: brightness(1.5);
        box-shadow: 0 0 70px rgba(253, 203, 110, 0.9);
    }
    90% {
        transform: scale(1.3) rotate(405deg);
        background: linear-gradient(45deg, #e17055, #d63031);
        filter: brightness(1.3);
        box-shadow: 0 0 50px rgba(225, 112, 85, 0.8);
    }
    100% { 
        transform: scale(0) rotate(450deg);
        opacity: 0; 
    }
}

/* Shake animation for invalid moves */
@keyframes shake {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotate(0deg); 
    }
    10%, 30%, 50%, 70%, 90% { 
        transform: translate3d(-8px, 0, 0) rotate(-2deg); 
    }
    20%, 40%, 60%, 80% { 
        transform: translate3d(8px, 0, 0) rotate(2deg); 
    }
}

/* Explode animation for matches */
@keyframes explode {
    0% { 
        transform: scale(1) rotate(0deg);
        opacity: 1; 
    }
    25% {
        transform: scale(1.3) rotate(90deg);
        background: linear-gradient(45deg, #00b894, #00cec9);
    }
    50% { 
        transform: scale(1.5) rotate(180deg);
        background: linear-gradient(45deg, #fdcb6e, #e17055);
        box-shadow: 0 0 60px rgba(253, 203, 110, 0.8);
    }
    75% {
        transform: scale(1.2) rotate(270deg);
        background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    }
    100% { 
        transform: scale(0) rotate(360deg);
        opacity: 0; 
    }
}

/* Gravity animation for falling tiles */
.tile.falling {
    animation: gravityFall 0.6s ease-in forwards;
    z-index: 5;
}

@keyframes gravityFall {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0.8;
    }
}

/* New tile spawn animation */
.tile.spawning {
    animation: tileSpawn 0.4s ease-out forwards;
    transform: scale(0);
}

@keyframes tileSpawn {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(90deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Score popup animation */
.score-popup {
    position: absolute;
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 100;
    animation: scorePopup 1s ease-out forwards;
}

@keyframes scorePopup {
    0% {
        transform: scale(0) translateY(0);
        opacity: 0;
    }
    20% {
        transform: scale(1.2) translateY(-10px);
        opacity: 1;
    }
    80% {
        transform: scale(1) translateY(-30px);
        opacity: 1;
    }
    100% {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
}

/* Combo indicator */
.combo-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
    color: #fdcb6e;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    animation: comboPulse 0.5s ease-out;
    z-index: 50;
}

@keyframes comboPulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
}



/* AWESOME Match Counter - Green/Black Techno Box */
.match-counter-container {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 255, 65, 0.1),
        inset 0 1px 0 rgba(0, 255, 65, 0.1);
    width: 100%;
}

/* Desktop Control Buttons - Positioned on the left side of the screen */
.desktop-controls {
    position: fixed !important;
    top: 100px !important;
    left: 20px !important;
    right: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    z-index: 1000 !important;
}

.desktop-controls .restart-btn,
.desktop-controls .sound-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 65, 0.3);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    color: #00ff41;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.6),
        0 0 10px rgba(0, 255, 65, 0.2);
}

.desktop-controls .restart-btn:hover,
.desktop-controls .sound-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 200, 50, 0.1));
    transform: scale(1.1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 255, 65, 0.4);
    border-color: rgba(0, 255, 65, 0.6);
}

/* Hide desktop controls on mobile */
@media (max-width: 768px) {
    .desktop-controls {
        display: none;
    }
}

.match-counter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.05) 2px,
        rgba(0, 255, 65, 0.05) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.match-counter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
    position: relative;
    z-index: 2;
}

.counter-title {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
    letter-spacing: 0.1em;
}

.counter-total {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 900;
    color: #00ff41;
    text-shadow: 0 0 15px rgba(0, 255, 65, 1);
    background: rgba(0, 255, 65, 0.1);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.match-counter-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    position: relative;
    z-index: 2;
}

.checklist-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.match-counter-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 10px;
    padding: 8px 4px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.match-counter-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    transition: left 0.5s ease;
}

.match-counter-item:hover::before {
    left: 100%;
}

.match-counter-item:hover {
    border-color: rgba(0, 255, 65, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

/* Highlighting state for match counter items */
.match-counter-item.highlighted {
    border-color: #ffff00;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.6);
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.1), rgba(255, 255, 0, 0.05));
    animation: highlightedPulse 1.5s ease-in-out infinite;
}

/* Mobile fix: Disable infinite animation to prevent stuck highlighting */
@media (max-width: 768px) {
    .match-counter-item.highlighted {
        animation: none; /* Disable infinite animation on mobile */
        border-color: #ffff00;
        box-shadow: 0 0 20px rgba(255, 255, 0, 0.6);
        background: linear-gradient(135deg, rgba(255, 255, 0, 0.1), rgba(255, 255, 0, 0.05));
    }
}

@keyframes highlightedPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 255, 0, 0.6);
        border-color: #ffff00;
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
        border-color: #ffff00;
    }
}

.counter-emoji {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.counter-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #00ff41;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.6);
    margin-bottom: 2px;
}

.match-counter-item.completed {
    border-color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    animation: completedPulse 2s ease-in-out infinite;
}

/* Active animation state - when GIF is playing */
.match-counter-item.animating {
    transform: scale(1.05) !important;
    z-index: 10;
}

@keyframes completedGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 184, 148, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(0, 184, 148, 0.8);
        transform: scale(1.05);
    }
}

@keyframes counterGlow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(0, 255, 65, 0.3),
            0 0 40px rgba(0, 255, 65, 0.1),
            inset 0 0 20px rgba(0, 255, 65, 0.05);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(0, 255, 65, 0.4),
            0 0 60px rgba(0, 255, 65, 0.2),
            inset 0 0 30px rgba(0, 255, 65, 0.1);
    }
}

@keyframes completedPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.6);
    }
}

@keyframes countGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 255, 65, 1);
    }
}

.checklist-item.completed::after {
    content: "✓";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #00b894;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.5);
    animation: checkBounce 0.6s ease-out;
}

@keyframes checkBounce {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.company-silhouette {
    width: 50px;
    height: 50px;
    font-size: 32px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checklist-item:hover .company-silhouette {
    transform: scale(1.2) rotate(5deg);
}

.company-name {
    font-size: 0.72rem; /* Reduced by 20% from 0.9rem */
    font-weight: 600;
}

.match-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    opacity: 0.9;
    transition: all 0.3s ease;
    margin-top: 6px;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.counter-count {
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    opacity: 0.9;
    transition: all 0.3s ease;
    margin-top: 4px;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Color coding: White for no matches, Neon green for 1+ matches */
.match-counter-item.has-matches .counter-count {
    color: #00ff41;
    opacity: 1;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.8);
}

/* Enhanced visual feedback for companies with matches */
.match-counter-item.has-matches {
    border-color: rgba(0, 255, 65, 0.4);
    box-shadow: 
        0 0 15px rgba(0, 255, 65, 0.2),
        0 0 20px rgba(0, 255, 65, 0.1);
    animation: hasMatchesGlow 2s ease-in-out infinite;
}

/* When both has-matches and animating are present, animating takes precedence */
.match-counter-item.has-matches.animating {
    transform: scale(1.05) !important;
    z-index: 10;
}

@keyframes hasMatchesGlow {
    0%, 100% {
        border-color: rgba(0, 255, 65, 0.4);
        box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    }
    50% {
        border-color: rgba(0, 255, 65, 0.6);
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    }
}

.checklist-item.completed .match-count {
    color: #00ff41;
    opacity: 1;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.8);
}

/* Denim background */
.denim-bg {
  background: url('https://www.transparenttextures.com/patterns/denim.png'), linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  background-size: 300px, cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Start Screen */
.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.start-content {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 65, 0.3);
    border: 2px solid rgba(0, 255, 65, 0.3);
    animation: startFloat 3s ease-in-out infinite;
}

@keyframes startFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* TV Hero Section */
.tv-hero {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}
.tv-frame {
  position: relative;
  width: 340px;
  height: 220px;
  background: #1a1a1a;
  border: 6px solid #00cc33;
  border-radius: 20px;
  box-shadow: 0 0 30px #00cc33aa, 0 6px 30px #000a;
  overflow: hidden;
}
.tv-static {
    position: absolute;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, #00ff41 2px, #00ff41 4px);
    opacity: 0.08;
    pointer-events: none;
    animation: tvStaticHide 1s ease-out forwards;
    z-index: 2;
}

@keyframes tvStaticHide {
    0% {
        opacity: 0.08;
    }
    80% {
        opacity: 0.08;
    }
    100% {
        opacity: 0;
    }
}
@keyframes tvFlicker {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.16; }
}
.tv-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    border-radius: 16px;
    opacity: 0;
    animation: tvStartup 2s ease-out forwards;
    animation-fill-mode: forwards;
}

@keyframes tvStartup {
    0% {
        opacity: 0;
        filter: brightness(0) blur(8px);
    }
    50% {
        opacity: 0;
        filter: brightness(0) blur(8px);
    }
    60% {
        opacity: 1;
        filter: brightness(1.2) blur(1px);
    }
    100% {
        opacity: 1;
        filter: brightness(1) blur(0);
        visibility: visible;
    }
}
@keyframes tvOn {
    0% { filter: brightness(0) blur(8px); opacity: 0; }
    60% { filter: brightness(2) blur(2px); opacity: 1; }
    100% { filter: brightness(1) blur(0); opacity: 1; }
}

/* Game Title */
.game-title-start {
  text-align: center;
  font-size: 1.8rem;
  font-family: 'Orbitron', 'Courier New', monospace;
  color: #00cc33;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 0 8px #00cc33, 0 0 16px #00cc33aa;
  letter-spacing: 0.05em;
}

/* Mobile override to make title fit on one line */
@media (max-width: 768px) {
  .game-title-start {
    font-size: 1.4rem; /* Reduced from 1.8rem to fit on one line */
    white-space: nowrap; /* Ensure it stays on one line */
  }
}

/* Headline */
.headline {
  text-align: center;
  margin-bottom: 12px;
}
.headline-main {
  display: block;
  font-size: 2.6rem;
  font-family: 'Orbitron', 'Courier New', monospace;
  color: #00cc33;
  letter-spacing: 0.1em;
  font-weight: 900;
}
.headline-sub {
  display: block;
  font-size: 2.1rem;
  font-family: 'Orbitron', 'Courier New', monospace;
  color: #e0e0e0;
  font-weight: 700;
  margin-top: -8px;
  letter-spacing: 0.08em;
}
.flicker {
    animation: flicker 1.2s infinite alternate;
}
@keyframes flicker {
    0%, 100% { opacity: 1; text-shadow: 0 0 12px #fff, 0 0 24px #00ff41; }
    50% { opacity: 0.7; text-shadow: 0 0 24px #00ff41, 0 0 48px #fff; }
}

/* Microcopy */
.microcopy {
  text-align: center;
  color: #a0d0a0;
  font-size: 1.1rem;
  margin-bottom: 18px;
  font-family: 'Courier New', monospace;
}

/* CTA Buttons */
.cta {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 10px auto;
    padding: 16px 5%;
    font-size: 1.3rem;
    font-family: 'Orbitron', 'Courier New', monospace;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    text-decoration: none;
    box-sizing: border-box;
}
.play-btn {
  background: linear-gradient(90deg, #00cc33 0%, #0099cc 100%);
  color: #1a1a1a;
  box-shadow: 0 0 20px #00cc33aa;
  margin-bottom: 8px;
}
.play-btn:active {
    background: #00ff41;
    transform: scale(0.97);
}
.business-btn {
  background: #000000;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  margin-bottom: 0;
}
.or-divider {
  text-align: center;
  color: #00cc33;
  font-size: 1.1rem;
  margin: 8px 0;
  font-family: 'Courier New', monospace;
  opacity: 0.7;
}

/* Accordion */
.accordion {
    margin: 18px auto 0 auto;
    max-width: 320px;
}
.accordion-toggle {
  width: 100%;
  background: #1a1a1a;
  color: #00cc33;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 0 6px #00cc3333;
  transition: background 0.2s;
}
.accordion-toggle:focus {
    outline: 2px solid #00ff41;
}
.info-icon {
    margin-left: 8px;
    font-size: 1.1rem;
    color: #fff;
    opacity: 0.7;
    cursor: pointer;
}
.accordion-content {
  background: #151515;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 6px #00cc3322;
  padding: 12px 16px;
  margin-top: 2px;
  animation: accordionOpen 0.3s;
}
@keyframes accordionOpen {
    0% { opacity: 0; transform: translateY(-10px);}
    100% { opacity: 1; transform: translateY(0);}
}
.company-row {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 6px;
    gap: 10px;
    transition: color 0.2s, text-shadow 0.2s;
}
.company-row span {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 4px #00ff41aa);
}
.company-row:hover {
    color: #00ff41;
    text-shadow: 0 0 8px #00ff41;
}

/* Business Section */
.business-section {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.1);
}

.business-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 15px #00ff88;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.newsletter-text {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 20px;
    opacity: 0.8;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.email-subscribe-form {
    display: flex;
    max-width: 350px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
}

.email-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.email-input::placeholder {
    color: #666;
}

.subscribe-btn {
    padding: 10px 20px;
    background: #00ff88;
    color: #000;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    white-space: nowrap;
    min-width: 120px;
    flex-shrink: 0;
    text-align: left;
    padding-left: 5px;
}

.subscribe-btn:hover {
    background: #00cc6a;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.subscribe-btn:active {
    transform: scale(0.98);
}

.subscribe-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Completion Screen */
.completion-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: #0a0a0a;
}

/* Clean, simple background - no animations */
.completion-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.completion-gif-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 0 50px rgba(0, 255, 65, 0.3),
        0 0 100px rgba(0, 255, 65, 0.1);
    animation: gifFloat 4s ease-in-out infinite;
}

.completion-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: gifPulse 3s ease-in-out infinite;
}

.completion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
    backdrop-filter: blur(1px);
}

/* Main Content */
.completion-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 40px 35px;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    max-width: 500px;
    width: 90%;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.completion-sydney-gif {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sydney-victory-gif {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 15px;
    border: 2px solid rgba(0, 255, 65, 0.4);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 255, 65, 0.3);
    animation: sydneyVictoryFloat 3s ease-in-out infinite;
}

@keyframes sydneyVictoryFloat {
    0%, 100% {
        transform: translateY(0px);
        filter: brightness(1);
    }
    50% {
        transform: translateY(-10px);
        filter: brightness(1.1);
    }
}

@keyframes gifFloat {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 
            0 0 50px rgba(0, 255, 65, 0.3),
            0 0 100px rgba(0, 255, 65, 0.1);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 
            0 0 70px rgba(0, 255, 65, 0.4),
            0 0 140px rgba(0, 255, 65, 0.2);
    }
}

@keyframes gifPulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1) saturate(1);
    }
    50% { 
        transform: scale(1.05);
        filter: brightness(1.1) saturate(1.2);
    }
}

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

.completion-title {
    font-size: 1.65rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    color: #00ff41;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    letter-spacing: 0.1em;
    position: relative;
}

.completion-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 10px 0;
}

.completion-text {
    margin-bottom: 15px;
}

.completion-text p {
    margin: 8px 0;
    line-height: 1.4;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
}

.viral-message {
    color: #00ff41;
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
    letter-spacing: 0.05em;
}

.business-message {
    color: #ffffff;
    font-weight: 500;
    opacity: 0.9;
    font-size: 1.1rem;
}

.viral-stats-container {
    margin-top: 15px;
}

.viral-stats {
    color: #fdcb6e;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 0 6px rgba(253, 203, 110, 0.5);
    padding: 15px 20px;
    background: rgba(253, 203, 110, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(253, 203, 110, 0.2);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
}

.completion-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.cta-button {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 18px 35px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    position: relative;
    min-width: 200px;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.business-btn {
    background: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.play-again-btn {
    background: linear-gradient(45deg, #006400, #008000);
}

/* Company Match Notification */
.company-match-notification {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    animation: notificationFloat 3s ease-in-out forwards;
}

.notification-content {
    background: linear-gradient(45deg, #00b894, #00cec9);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 15px 40px rgba(0, 184, 148, 0.4);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: notificationPulse 0.6s ease-out;
}

.company-emoji {
    font-size: 1.5rem;
    animation: emojiBounce 0.8s ease-out;
}

.company-name {
    letter-spacing: 0.1em;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes notificationFloat {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
}

@keyframes notificationPulse {
    0% {
        transform: scale(0.5);
        box-shadow: 0 0 0 rgba(0, 184, 148, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(0, 184, 148, 0.9);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 15px 40px rgba(0, 184, 148, 0.4);
    }
}

@keyframes emojiBounce {
    0% {
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.3) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow: 0 2px 8px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

@keyframes statsPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 15px rgba(253, 203, 110, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(253, 203, 110, 0.6);
    }
}

/* Digital TV Channel Display */
.digital-channel-display {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -200px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 5px 15px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 
        0 0 15px rgba(0, 255, 65, 0.2),
        0 0 30px rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
    white-space: nowrap;
    width: auto;
    height: auto;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
}

.digital-channel-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.1) 2px,
            rgba(0, 255, 65, 0.1) 4px
        );
    pointer-events: none;
    animation: tvStatic 0.1s infinite;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
}

.live-indicator {
    color: #ff0000;
    font-weight: bold;
    animation: livePulse 1s infinite;
    font-size: 0.9rem;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    padding: 0;
    display: inline;
    white-space: nowrap;
    float: none;
    clear: none;
    line-height: 1.2;
    word-wrap: normal;
    word-break: keep-all;
    overflow-wrap: normal;
}

.channel-number {
    color: #00ff41;
    font-weight: bold;
    font-size: 0.9rem;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    padding: 0;
    display: inline;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
    float: none;
    clear: none;
    line-height: 1.2;
    word-wrap: normal;
    word-break: keep-all;
    overflow-wrap: normal;
}

.channel-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-name-display {
    color: #00ff41;
    font-weight: bold;
    font-size: 0.9rem;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    padding: 0;
    display: inline;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
    float: none;
    clear: none;
    line-height: 1.2;
    word-wrap: normal;
    word-break: keep-all;
    overflow-wrap: normal;
}

.company-emoji-display {
    color: #00ff41;
    font-weight: bold;
    font-size: 0.9rem;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    padding: 0;
    display: inline;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
    float: none;
    clear: none;
    line-height: 1.2;
    word-wrap: normal;
    word-break: keep-all;
    overflow-wrap: normal;
}

/* TV Static Animation */
@keyframes tvStatic {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Live Indicator Pulse */
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Text Glow Animation */
@keyframes textGlow {
    0% { text-shadow: 0 0 10px rgba(0, 255, 65, 0.8); }
    100% { text-shadow: 0 0 20px rgba(0, 255, 65, 1), 0 0 30px rgba(0, 255, 65, 0.6); }
}

/* Emoji Float Animation */
@keyframes emojiFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Channel Surfing Animation */
.channel-surfing {
    animation: channelSurf 0.5s ease-out;
}

@keyframes channelSurf {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    50% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .button-container {
        position: fixed;
        top: 20px;
        right: 20px;
        transform: none;
        flex-direction: row;
        gap: 10px;
    }
    
    .game-header {
        display: none; /* Hide game header on mobile - title moved to TV frame */
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        padding: 0 15px;
        position: relative;
    }
    
    .game-title {
        font-size: 2rem;
        padding: 8px 15px;
        letter-spacing: 0.05em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        text-align: center;
    }
    
    .sound-toggle-btn {
        position: static !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        order: 3;
    }
    
    .restart-btn {
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        order: 1;
    }
    
    .restart-btn .restart-text {
        display: none;
    }
    
    .match-counter-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .counter-title {
        white-space: nowrap;
        font-size: 0.9rem;
    }
    
    .match-counter-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 4px 4px !important; /* 4px row gap, 4px column gap - remove row gaps */
        row-gap: 0px !important; /* Remove row gaps completely */
    }
    
    .match-counter-item {
        padding: 2px 2px !important; /* Equal padding to make squares */
        aspect-ratio: 1 !important; /* Force square shape */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .counter-emoji {
        font-size: 1rem; /* Keep emoji size the same */
        margin-bottom: 1px; /* Reduced spacing */
        line-height: 1;
    }
    
    .counter-name {
        font-size: 0.6rem; /* Keep text size the same */
        margin-bottom: 0px;
        line-height: 1;
    }
    
    .counter-count {
        font-size: 0.9rem; /* Keep count size the same */
        margin-top: 1px; /* Reduced spacing */
        line-height: 1;
    }
    
    @media (max-width: 480px) {
        .button-container {
            top: 15px;
            right: 15px;
            gap: 8px;
        }
        
        .sound-toggle-btn {
            position: fixed !important;
            top: 15px !important;
            right: 15px !important;
            transform: none !important;
            width: 40px;
            height: 40px;
            font-size: 1.1rem;
        }
        
        .restart-btn {
            position: fixed !important;
            top: 15px !important;
            left: 15px !important;
            transform: none !important;
            width: 40px;
            height: 40px;
            font-size: 1.1rem;
        }
        
        .game-title {
            font-size: 1.5rem;
            padding: 7px 12px;
            letter-spacing: 0.02em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .match-counter-grid {
            grid-template-columns: repeat(4, 1fr) !important;
            gap: 4px 4px !important; /* 4px row gap, 4px column gap */
            row-gap: 0px !important; /* Remove row gaps completely */
        }
        
        .match-counter-item {
            padding: 2px 2px !important; /* Equal padding to make squares */
            aspect-ratio: 1 !important; /* Force square shape */
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: center !important;
        }
        
        .counter-emoji {
            font-size: 0.9rem; /* Keep emoji size the same */
            margin-bottom: 1px;
            line-height: 1;
        }
        
        .counter-name {
            font-size: 0.5rem; /* Keep text size the same */
            margin-bottom: 1px;
            line-height: 1;
        }
        
        .counter-count {
            font-size: 0.8rem; /* Keep count size the same */
            margin-top: 1px; /* Reduced spacing */
            line-height: 1;
        }
    }
    
    @media (max-width: 360px) {
        .button-container {
            top: 10px;
            right: 10px;
            gap: 6px;
        }
        
        .sound-toggle-btn {
            position: fixed !important;
            top: 10px !important;
            right: 10px !important;
            transform: none !important;
            width: 35px;
            height: 35px;
            font-size: 1rem;
        }
        
        .restart-btn {
            position: fixed !important;
            top: 10px !important;
            left: 10px !important;
            transform: none !important;
            width: 35px;
            height: 35px;
            font-size: 1rem;
        }
        
        .game-title {
            font-size: 1.3rem;
            padding: 6px 10px;
            letter-spacing: 0.01em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
    
    .main-content {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 0 10px;
        margin-top: 0; /* Remove top margin since TV touches top */
    }
    
    .top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .right-column {
        max-width: none;
    }
    
    .game-board {
        width: 100%;
        max-width: none;
        height: 500px;
        margin: 0;
        margin-top: -25px; /* Shifted up 35px from 10px */
        padding: 2px; /* Minimized for larger emojis */
    }
    
    .retro-tv-frame {
        padding: 15px;
        max-width: none;
        width: calc(100% + 40px); /* Widen by 40px */
        height: 500px;
        margin-top: 15px; /* Shifted down 5px from 10px */
        margin-left: -20px; /* Center the extra width */
        margin-right: -20px; /* Center the extra width */
        position: relative; /* For positioning title */
    }
    
    /* Game title on TV frame top bar */
    .retro-tv-frame::before {
        content: 'SYDNEY VISION';
        position: absolute;
        top: 7px; /* Shifted down 5px from 2px */
        left: 50%;
        transform: translateX(-50%);
        font-family: 'Orbitron', 'Courier New', monospace;
        font-size: 1.2rem;
        font-weight: 700;
        color: #00ff41;
        text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
        letter-spacing: 0.1em;
        z-index: 10;
        background: rgba(0, 0, 0, 0.8);
        padding: 5px 15px;
        border-radius: 8px;
        border: 1px solid rgba(0, 255, 65, 0.3);
        white-space: nowrap;
    }
    
    .retro-tv-frame .tv-screen img {
        height: 180px;
    }
    
    /* Reduce black areas by adjusting TV screen padding and sizing */
    .retro-tv-frame .tv-screen {
        padding: 2px; /* Reduced from 10px to minimize black areas */
        min-height: 184px; /* Reduced to match image height + padding */
    }
    
    /* Single line channel display in black area below GIF - IDENTICAL to top title */
    .digital-channel-display {
        position: absolute;
        bottom: 35px; /* Shifted up 20px from 15px */
        left: 50%;
        transform: translateX(-50%);
        top: auto !important;
        margin-top: 0 !important;
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid rgba(0, 255, 65, 0.3);
        border-radius: 8px;
        padding: 5px 15px;
        display: inline-block;
        font-size: 0.9rem;
        font-weight: 600;
        font-family: 'Orbitron', monospace;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        box-shadow: 
            0 0 15px rgba(0, 255, 65, 0.2),
            0 0 30px rgba(0, 255, 65, 0.1);
        text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
        white-space: nowrap;
        width: auto;
        height: auto;
        text-align: center;
        line-height: 1.2;
        overflow: hidden;
        z-index: 10;
    }
    
    /* On mobile, position relative to the TV frame */
    .retro-tv-frame {
        position: relative;
    }
    
    .digital-channel-display .channel-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 0;
        border: none;
    }
    
    .digital-channel-display .channel-content {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .digital-channel-display .live-indicator,
    .digital-channel-display .channel-number,
    .digital-channel-display .company-name-display,
    .digital-channel-display .company-emoji-display {
        font-size: 0.9rem;
        font-weight: 600;
        font-family: 'Orbitron', monospace;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin: 0;
        padding: 0;
        display: inline;
        white-space: nowrap;
        text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
        float: none;
        clear: none;
        line-height: 1.2;
        word-wrap: normal;
        word-break: keep-all;
        overflow-wrap: normal;
    }
    
    .companies-row {
        padding: 20px;
        height: auto;
    }
    
    .header-row {
        flex-direction: row;
        gap: 15px;
        justify-content: center;
    }
    
    .checklist-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 8px;
    }
    
    .checklist-item {
        padding: 8px 4px;
    }
    
    .company-silhouette {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .company-name {
        font-size: 0.7rem;
    }
    
    /* Completion screen mobile styles */
    .completion-content {
        padding: 30px 20px;
        max-width: 95%;
        min-height: 320px;
    }
    
    .completion-sydney-gif {
        margin-bottom: 15px;
    }
    
    .sydney-victory-gif {
        max-width: 300px;
    }
    
    .completion-title {
        font-size: 1.35rem;
        margin-bottom: 10px;
    }
    
    .completion-gif-container {
        width: 250px;
        height: 250px;
    }
    
    .completion-text p {
        font-size: 1rem;
        margin: 6px 0;
        line-height: 1.3;
    }
    
    .viral-message {
        font-size: 1.1rem;
    }
    
    .viral-stats {
        font-size: 1rem;
        padding: 10px 12px;
        margin-top: 10px;
    }
    
    .completion-buttons {
        flex-direction: column;
        gap: 12px;
        margin-top: 10px;
    }
    
    .cta-button {
        padding: 15px 25px;
        font-size: 1rem;
        min-width: 180px;
    }
} 







 

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .tile {
        min-height: 35px;
        min-width: 35px;
        touch-action: manipulation;
    }

    .restart-btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .sound-toggle-btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .checklist-item {
        min-height: 44px;
        touch-action: manipulation;
    }

    .start-button, .cta-button {
        min-height: 44px;
        touch-action: manipulation;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .game-board {
        will-change: transform;
        gap: 2px;
        padding: 2px;
    }
    
    .tile {
        will-change: transform, opacity;
        width: 100%;
        height: 100%;
        font-size: 24px;
        padding: 2px;
    }
    
    .game-board .tile.selected {
        box-shadow: 0 0 8px rgba(0, 255, 65, 0.6) !important;
        transform: scale(1.05) !important;
        animation: none !important;
        background: linear-gradient(45deg, rgba(0, 255, 65, 0.4), rgba(0, 200, 50, 0.3)) !important;
        border-color: rgba(0, 255, 65, 0.8) !important;
    }
    
    .game-board .tile.selected::before {
        box-shadow: none !important;
    }
} 

/* Smooth transitions and visual polish */
.game-container {
    transition: all 0.3s ease-in-out;
}

.tile {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tile:hover {
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tile.selected {
    transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Loading state for tiles */
.tile.loading {
    animation: tileLoading 1s ease-in-out infinite;
}

@keyframes tileLoading {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Smooth fade-in for game elements */
.game-board, .retro-tv-frame, .companies-row {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced focus states for accessibility */
.tile:focus-visible {
    outline: 2px solid #00ff41;
    outline-offset: 2px;
}

.restart-btn:focus-visible {
    outline: 2px solid #00ff41;
    outline-offset: 2px;
}

.sound-toggle-btn:focus-visible {
    outline: 2px solid #00ff41;
    outline-offset: 2px;
}

/* Improved visual feedback */
.tile.matched {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tile.line-clear, .tile.color-bomb {
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
} 

/* Company Completion Animations */
.checklist-item.company-explosion {
    animation: companyExplosion 1.5s ease-out;
    transform-origin: center;
}

@keyframes companyExplosion {
    0% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    }
    25% {
        transform: scale(1.2) rotate(5deg);
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.6);
    }
    50% {
        transform: scale(1.4) rotate(-5deg);
        box-shadow: 0 0 40px rgba(0, 255, 65, 0.8);
    }
    75% {
        transform: scale(1.2) rotate(3deg);
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.6);
    }
    100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    }
}

@keyframes companyCompletionPulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
        filter: brightness(1);
    }
    25% {
        box-shadow: 0 0 40px rgba(0, 255, 65, 0.6);
        filter: brightness(1.3);
    }
    50% {
        box-shadow: 0 0 60px rgba(0, 255, 65, 0.8);
        filter: brightness(1.5);
    }
    75% {
        box-shadow: 0 0 40px rgba(0, 255, 65, 0.6);
        filter: brightness(1.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
        filter: brightness(1);
    }
}

/* Company Particle Effects */
.company-particle {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
} 

/* Score Breakdown Display */
.score-breakdown {
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    border: 2px solid #00ff41;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    font-family: 'Courier New', monospace;
    max-width: 300px;
    animation: scoreBreakdownSlide 0.5s ease-out;
}

.breakdown-title {
    color: #00ff41;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

.breakdown-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    font-size: 0.7rem;
}

.company-score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.company-score-emoji {
    font-size: 1rem;
    margin-right: 6px;
}

.company-score-name {
    color: #ffffff;
    font-weight: bold;
    flex: 1;
}

.company-score-count {
    color: #00ff41;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.8);
}

@keyframes scoreBreakdownSlide {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile optimization for score breakdown */
@media (max-width: 768px) {
    .score-breakdown {
        max-width: 250px;
        padding: 8px;
    }
    
    .breakdown-content {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .company-score-item {
        padding: 3px 6px;
        font-size: 0.6rem;
    }
}

/* Responsive styles for new start screen */
@media (max-width: 600px) {
    .tv-frame { 
        width: 98vw; 
        height: 38vw; 
        min-width: 220px; 
        min-height: 120px; 
    }
    .headline-main { 
        font-size: 2rem; 
    }
    .headline-sub { 
        font-size: 1.3rem; 
    }
    .cta { 
        font-size: 1rem; 
        padding: 12px 0; 
    }
    .accordion, .cta, .tv-frame { 
        max-width: 98vw; 
    }
    .start-content { 
        padding: 20px; 
    }
    .microcopy { 
        font-size: 1rem; 
    }
    
    .business-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .business-heading {
        font-size: 1.2rem;
        margin-bottom: 8px;
        letter-spacing: 0.02em;
    }
    
    .newsletter-text {
        font-size: 0.8rem;
        margin-bottom: 15px;
    }
    
    .email-subscribe-form {
        max-width: 90%;
        margin: 0 auto;
    }
    
    .email-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .subscribe-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 400px) {
    .button-container {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .game-title {
        font-size: 1.2rem;
        padding: 4px 8px;
        letter-spacing: 0.005em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .game-header {
        padding: 8px;
        margin-bottom: 15px;
    }
    
    .sound-toggle-btn {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        transform: none !important;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .restart-btn {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        transform: none !important;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
} 

/* Full-screen GIF Player Modal */
.gif-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gif-player-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gif-player-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff41;
    border: 2px solid #00ff41;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.gif-player-close:hover {
    background: #00ff41;
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.6);
    transform: scale(1.1);
}

.modal-gif {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 255, 65, 0.2);
    image-rendering: pixelated;
    filter: contrast(1.1) brightness(1.05);
}

/* Make TV screen more obviously clickable */
.tv-screen {
    cursor: pointer;
    transition: all 0.3s ease;
}

.tv-screen:hover {
    transform: scale(1.02);
    box-shadow: 
        inset 0 4px 8px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(0, 255, 65, 0.3);
}

.tv-screen:hover img {
    filter: contrast(1.3) brightness(1.1);
}

/* Mobile responsive adjustments for modal */
@media (max-width: 768px) {
    .gif-player-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .gif-player-close {
        top: -40px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .modal-gif {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .gif-player-close {
        top: -35px;
        right: 5px;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}