/* ============================================
   GRID GUESS - PREMIUM MAKE-OVER STYLES
   ============================================ */

:root {
    --green: #10b981;
    --yellow: #f59e0b;
    --red: #ef4444;
    --primary-bg: #0c0817;
    --glass-bg: rgba(13, 8, 24, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-tertiary: #888888;
}

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

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 600;
    min-height: 100vh;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    margin: 0;
}

/* Floating Particle Canvas Overrides */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, #150f24 0%, #0c0817 50%, #05030a 100%);
}

/* Header suites styling alignment */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) clamp(var(--spacing-md), 4vw, var(--spacing-xl)) !important;
    background: var(--glass-bg-header, rgba(8, 4, 15, 0.75)) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--glass-border-light, rgba(255, 255, 255, 0.04)) !important;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.header-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
}

.social-link,
.stats-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(10px);
    color: var(--text-primary) !important;
    font-size: 1.1rem !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
}

.social-link:hover,
.stats-btn:hover {
    transform: translateY(-2px) scale(1.08) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-primary, #00f0ff) !important;
    box-shadow: 0 0 15px var(--accent-primary-glow, rgba(0, 240, 255, 0.3)), inset 0 1px 1px rgba(255,255,255,0.1) !important;
    color: var(--accent-primary, #00f0ff) !important;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(var(--spacing-md), 4vw, var(--spacing-xl)) !important;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

footer {
    text-align: center;
    padding: var(--spacing-md) !important;
    background: rgba(8, 4, 15, 0.8) !important;
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.version {
    margin-left: 0.5rem;
    opacity: 0.5;
}

/* Premium Cinematic Stats container */
#streak-container {
    width: 100%;
    max-width: 680px;
    background: var(--glass-bg, rgba(13, 8, 24, 0.45)) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(20px);
    padding: var(--spacing-sm) var(--spacing-md) !important;
    border-radius: var(--radius-md, 12px) !important;
    text-align: center;
    font-weight: 700;
    margin-bottom: var(--spacing-md) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.05) !important;
    position: relative;
    overflow: hidden;
}

#streak-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary, #00f0ff), transparent);
    opacity: 0.7;
}

#streak-container p {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

#streak-container span {
    color: var(--accent-primary, #00f0ff) !important;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5) !important;
    font-weight: 800;
}

#game-container {
    width: 100%;
    max-width: 1100px;
    background: var(--glass-bg, rgba(13, 8, 24, 0.45)) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(25px);
    border-radius: var(--radius-lg, 24px) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.04), 0 0 50px rgba(112, 0, 255, 0.06) !important;
    padding: var(--spacing-xl) !important;
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Lives Indicating Suite */
.lives-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 1.6rem;
}

.life-icon {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.3));
}

.life-icon.lost {
    opacity: 0.15;
    filter: grayscale(1) scale(0.85);
    transform: scale(0.9);
}

/* Beautiful Transparent Search Input */
#input-container {
    position: relative;
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

#guess-input {
    flex: 1;
    padding: 0.8rem 1.2rem !important;
    font-size: 1.05rem !important;
    font-family: var(--font-body), sans-serif !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md, 12px) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

#guess-input:focus {
    outline: none;
    border-color: var(--accent-primary, #00f0ff) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.25) !important;
}

#guess-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Premium styled range buttons & submittals */
#submit-btn, .action-btn {
    padding: 0.8rem 1.5rem !important;
    border-radius: var(--radius-md, 12px) !important;
    font-family: var(--font-heading), sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

#submit-btn {
    background: rgba(239, 68, 68, 0.04) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #ff7979 !important;
}

#submit-btn:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: #ff7979 !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.35) !important;
    transform: translateY(-2px) !important;
}

#hint-btn {
    background: rgba(16, 185, 129, 0.04) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
}

#hint-btn:hover {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: #34d399 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35) !important;
    transform: translateY(-2px) !important;
}

#cast-hint-btn {
    background: rgba(245, 158, 11, 0.04) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

#cast-hint-btn:hover {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35) !important;
    transform: translateY(-2px) !important;
}

#skip-btn {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #9ca3af !important;
}

#skip-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: #9ca3af !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px) !important;
}

#submit-btn:disabled, .action-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Autocomplete Search Dropdown */
.dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 120px; 
    background: rgba(10, 6, 22, 0.85) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(0, 240, 255, 0.25) !important;
    border-radius: var(--radius-md, 12px) !important;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.15) !important;
    padding: 0.35rem;
}

.dropdown.show {
    display: block !important;
}

.dropdown::-webkit-scrollbar {
    width: 6px;
}

.dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.search-dropdown-item {
    padding: 0.7rem 1rem;
    cursor: pointer;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    padding-left: calc(1rem + 4px);
}

.game-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

/* Sleek Legend Capsules */
.legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(10px);
    padding: 10px 20px !important;
    border-radius: var(--radius-md, 12px) !important;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.02);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.box {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
}

.box.green { background: var(--green); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.box.yellow { background: var(--yellow); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.box.red { background: var(--red); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }

/* Grid layout Makeover */
.grid-wrapper {
    overflow-x: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

.grid-header {
    display: grid;
    grid-template-columns: 140px 100px 180px 140px 100px 120px;
    gap: 10px;
    margin-bottom: 15px;
    min-width: 800px;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: var(--radius-md, 12px) !important;
    padding: 0 20px !important; /* Sync padding with rows */
}

.cell-header {
    font-weight: 800 !important;
    text-align: center;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    color: var(--text-tertiary) !important;
    padding: 12px 8px !important;
    border-bottom: none !important;
}

.grid-row {
    display: grid;
    grid-template-columns: 140px 100px 180px 140px 100px 120px;
    gap: 10px;
    margin-bottom: 15px;
    min-width: 800px;
    position: relative;
    background: rgba(255, 255, 255, 0.01) !important;
    padding: 12px 20px !important;
    border-radius: var(--radius-md, 12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(5px);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.2s, background-color 0.2s;
}

.grid-row:hover {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Remove film strip holes for a modern look */
.grid-row::before, .grid-row::after {
    display: none !important;
}

/* Tactile guess cells */
.grid-cell {
    background-color: rgba(13, 8, 24, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: var(--radius-sm, 8px) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    min-height: 110px;
    position: relative;
    transition: transform 0.6s, background-color 0.6s, border-color 0.6s, box-shadow 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.02) !important;
}

.grid-cell.flip {
    animation: flipCell 0.6s forwards;
}

@keyframes flipCell {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

/* Vibrant glowing indicators */
.cell-green { 
    background-color: rgba(16, 185, 129, 0.12) !important; 
    border: 1px solid #10b981 !important; 
    color: #a7f3d0 !important;
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2), inset 0 0 20px rgba(16, 185, 129, 0.15) !important;
}
.cell-yellow { 
    background-color: rgba(245, 158, 11, 0.12) !important; 
    border: 1px solid #f59e0b !important; 
    color: #fde68a !important;
    text-shadow: 0 0 5px rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2), inset 0 0 20px rgba(245, 158, 11, 0.15) !important;
}
.cell-red { 
    background-color: rgba(239, 68, 68, 0.12) !important; 
    border: 1px solid #ef4444 !important; 
    color: #fecaca !important;
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2), inset 0 0 20px rgba(239, 68, 68, 0.15) !important;
}

.cell-skipped {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px dashed rgba(255, 255, 255, 0.15) !important;
    color: #9ca3af !important;
}

.movie-poster-cell {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-sm, 8px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

.movie-poster-cell .title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%) !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    padding: 10px 6px !important;
    backdrop-filter: blur(2px);
}

.arrow-indicator {
    font-size: 1.8rem;
    margin-top: 5px;
    opacity: 0.9;
}

/* Cinematic Start & Conclusion Overlays */
.start-content, .overlay-content {
    background: var(--glass-bg, rgba(13, 8, 24, 0.45)) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08)) !important;
    border-radius: var(--radius-lg, 24px) !important;
    padding: clamp(1.5rem, 4vw, 2.5rem) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 95, 95, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.start-content h2, .overlay-content h2 {
    font-size: clamp(1.8rem, 4vw, 2.4rem) !important;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    background: var(--text-gradient-accent, linear-gradient(135deg, #00f0ff, #7000ff)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.1) !important;
}

.start-content p, .overlay-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

.start-content ul.introtext, .overlay-content ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
}

.start-content li, .overlay-content li {
    margin: 0.75rem 0 !important;
    padding-left: 2rem !important;
    position: relative !important;
    font-size: 0.95rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.5;
}

.start-content li::before, .overlay-content li::before {
    content: '🎬' !important;
    position: absolute !important;
    left: 0 !important;
    font-size: 1rem;
}

#play-start-btn {
    display: block;
    margin: 2rem auto 0 !important;
    padding: 0.9rem 2.2rem !important;
    background: var(--accent-gradient, linear-gradient(135deg, #00f0ff 0%, #7000ff 100%)) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-pill, 30px) !important;
    cursor: pointer;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25) !important;
    animation: buttonPulse 2s ease-in-out infinite !important;
}

#play-start-btn:hover {
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.4), 0 0 15px rgba(112, 0, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 240, 255, 0.2); }
    50% { box-shadow: 0 4px 30px rgba(0, 240, 255, 0.35); }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 3, 10, 0.8) !important;
    backdrop-filter: blur(15px) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.overlay.show {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 50% !important;
    width: 34px;
    height: 34px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-primary, #00f0ff) !important;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3) !important;
    transform: rotate(90deg) scale(1.05) !important;
}

.hint-popup {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: var(--radius-md, 12px);
    font-style: italic;
    display: none;
}

.hint-popup.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* SUMMARY Row Holographic Highlight */
.summary-row {
    border: 1.5px dashed rgba(255, 218, 117, 0.6) !important;
    background: rgba(255, 218, 117, 0.03) !important;
    margin-bottom: 25px !important;
    box-shadow: 0 0 25px rgba(255, 218, 117, 0.15), inset 0 0 10px rgba(255, 218, 117, 0.05) !important;
    display: grid;
    border-radius: var(--radius-md, 12px) !important;
    animation: summaryPulse 3s ease-in-out infinite alternate !important;
}

@keyframes summaryPulse {
    0% {
        border-color: rgba(255, 218, 117, 0.4) !important;
        box-shadow: 0 0 20px rgba(255, 218, 117, 0.1) !important;
    }
    100% {
        border-color: rgba(255, 218, 117, 0.8) !important;
        box-shadow: 0 0 35px rgba(255, 218, 117, 0.25) !important;
    }
}

.summary-row .grid-cell {
    border-style: dashed !important;
    background: rgba(255, 218, 117, 0.02) !important;
}

/* Tactile Frosted Toggle */
.summary-toggle-container {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.summary-toggle-container input {
    display: none;
}

.summary-toggle-container .summary-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-radius: 24px;
    transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.summary-toggle-container .summary-toggle-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.summary-toggle-container input:checked + .summary-toggle-slider {
    background-color: #10b981 !important;
    border-color: #059669 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4) !important;
}

.summary-toggle-container input:checked + .summary-toggle-slider:before {
    transform: translateX(20px);
}

.summary-toggle-label {
    margin-left: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary) !important;
    transition: color 0.3s;
}

.summary-toggle-container input:checked ~ .summary-toggle-label {
    color: #10b981 !important;
}

/* Personal Statistics Modal Grid */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    margin: var(--spacing-lg) 0 !important;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: var(--radius-md, 12px) !important;
    padding: var(--spacing-md) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.02);
    transition: transform var(--transition-bounce, 0.3s cubic-bezier(0.25, 1, 0.5, 1)), border-color var(--transition-base, 0.2s);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.03);
    border-color: var(--accent-primary, #00f0ff) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.05) !important;
}

.stat-card::before {
    font-size: 1.6rem;
    margin-bottom: 5px;
}

/* Injected icons using pure CSS markers for premium elegance! */
.stat-card:nth-child(1)::before { content: '🎧'; }
.stat-card:nth-child(2)::before { content: '🎯'; }
.stat-card:nth-child(3)::before { content: '🔥'; }

.stat-card .stat-value {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
}

.stat-card .stat-label {
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    color: var(--text-tertiary) !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}

/* Achievements section Makeover */
.achievements-section h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.achievements-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
}

.achievement-card {
    border-radius: var(--radius-md, 12px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    padding: var(--spacing-md) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.achievement-card:hover {
    transform: translateY(-3px) scale(1.04);
}

/* Modal and layout specific polish */
.help-content {
    text-align: left !important;
    max-width: 600px !important;
}

.summary-row .summary-title-cell {
    background: transparent !important;
    border: none !important;
    font-weight: 900 !important;
    color: #ffda75 !important;
    letter-spacing: 1.5px !important;
    box-shadow: none !important;
    text-shadow: 0 0 10px rgba(255, 218, 117, 0.4) !important;
}

#result-poster {
    width: 140px;
    height: 195px;
    object-fit: cover;
    border-radius: var(--radius-md, 12px);
    border: 1.5px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.95), 0 0 15px rgba(0, 240, 255, 0.1);
    margin: var(--spacing-md) auto;
    display: block;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

#result-poster:hover {
    transform: scale(1.04) rotate(1deg);
    border-color: var(--accent-primary, #00f0ff);
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.share-action-btn {
    background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    color: #ffffff !important;
}

.share-action-btn:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    border-color: #2563eb !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45) !important;
}

#submit-btn:active, .action-btn:active {
    transform: translateY(1px) scale(0.97) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

/* ============================================
   GRID GUESS - MOBILE RESPONSIVENESS
   ============================================ */
@media (max-width: 768px) {
    main {
        padding: var(--spacing-sm) !important;
    }
    #game-container {
        padding: var(--spacing-md) !important;
        gap: 15px;
    }
    #input-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    #guess-input {
        width: 100% !important;
    }
    #submit-btn {
        width: 100% !important;
    }
    .dropdown {
        width: 100% !important;
        right: 0 !important;
    }
    .game-controls {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .game-controls button {
        width: 100% !important;
    }
    .legend {
        padding: 8px 12px !important;
        gap: 10px;
        font-size: 0.75rem;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .result-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .result-actions button {
        width: 100% !important;
    }

    /* Mobile-first grid guess columns makeover */
    .grid-header {
        display: none !important;
    }

    .grid-wrapper {
        overflow-x: hidden !important;
        width: 100% !important;
        padding: 5px 0 !important;
    }

    .grid-row, .summary-row {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: auto auto !important;
        min-width: 0 !important;
        width: 100% !important;
        gap: 8px !important;
        padding: 10px !important;
        margin-bottom: 12px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border-radius: 12px !important;
        border-color: rgba(255, 255, 255, 0.04) !important;
    }

    .grid-cell {
        min-height: 80px !important;
        padding: 8px 6px !important;
        font-size: 0.78rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .grid-cell::before {
        display: block !important;
        font-size: 0.58rem !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        opacity: 0.5 !important;
        margin-bottom: 4px !important;
        content: "";
    }

    /* Assign vertical category labels */
    .grid-row:not(.summary-row) .grid-cell:nth-child(1)::before {
        content: "Movie" !important;
    }
    .summary-row .grid-cell:nth-child(1)::before {
        content: "Summary" !important;
    }
    .grid-row .grid-cell:nth-child(2)::before {
        content: "Year" !important;
    }
    .grid-row .grid-cell:nth-child(3)::before {
        content: "Genre" !important;
    }
    .grid-row .grid-cell:nth-child(4)::before {
        content: "Director" !important;
    }
    .grid-row .grid-cell:nth-child(5)::before {
        content: "Runtime" !important;
    }
    .grid-row .grid-cell:nth-child(6)::before {
        content: "Cast" !important;
    }

    .movie-poster-cell {
        min-height: 80px !important;
    }

    .title-overlay {
        font-size: 0.72rem !important;
        padding: 3px !important;
    }

    .arrow-indicator {
        font-size: 0.8rem !important;
        margin-top: 2px !important;
    }

    /* Handle skipped guesses cleanly */
    .cell-skipped {
        grid-column: span 3 !important;
        min-height: 50px !important;
        font-size: 0.9rem !important;
        font-weight: 800 !important;
        background-color: rgba(255, 255, 255, 0.05) !important;
    }
    .cell-skipped::before {
        display: none !important;
    }
}

@media (max-width: 480px) {
    #streak-container {
        padding: var(--spacing-xs) var(--spacing-sm) !important;
    }
    #streak-container p {
        font-size: 0.9rem;
    }
    .lives-indicator {
        font-size: 1.3rem;
    }
}

