:root {
    --grass-1: #387c2b;
    --grass-2: #2a6320;
    --pitch: #e6cba5;
    --pitch-wear: #d1b285;
    --ball: #c02626;
    --white: #ffffff;
    --neon-blue: #00f2ff;
    --scoreboard-bg: #1a1a2e;
    --scoreboard-accent: #16213e;
    --text-gold: #ffcc00;
    --stand-bg: #1a1a1a;
    --stand-border: rgba(255, 255, 255, 0.15);

    /* Global Game Center Point */
    --game-center-y: 56%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    background-color: #111;
}

/* --- ACCESSIBILITY: Focus Visible --- */
*:focus-visible {
    outline: 2px solid var(--neon-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

.fielder-nav:focus-visible .fielder-icon {
    border-color: var(--neon-blue);
    box-shadow: 0 0 18px rgba(0, 242, 255, 0.5), 0 0 40px rgba(0, 242, 255, 0.15);
}

.brand-group:focus-visible {
    outline: 2px solid var(--text-gold);
    border-radius: 50%;
}

/* --- UTILITIES & REFACTORING CLASSES --- */
.mt-10 {
    margin-top: 10px !important;
}

.mt-15 {
    margin-top: 15px !important;
}

.mt-30 {
    margin-top: 30px !important;
}

.mb-5 {
    margin-bottom: 5px !important;
}

.mt-5 {
    margin-top: 5px !important;
}

.mb-10 {
    margin-bottom: 10px !important;
}

.mb-15 {
    margin-bottom: 15px !important;
}

.my-15-10 {
    margin: 15px 0 10px !important;
}

/* Text & Colors */
.text-white {
    color: var(--white);
}

.text-center {
    text-align: center !important;
}

.justify-center {
    justify-content: center !important;
}

.text-neon {
    color: var(--neon-blue);
}

/* Fonts */
.text-sm {
    font-size: 0.85rem;
}

.text-xs {
    font-size: 0.8rem;
}

.text-xxs {
    font-size: 0.75rem;
}

.font-sm {
    font-size: 0.85rem;
}

.font-xxs {
    font-size: 0.75rem;
}

/* Specific Component Utilities */



/* --- RETURN BUTTON AT BOTTOM (All Devices) --- */
.return-nav-container {
    display: flex;
    justify-content: center;
    padding: 20px 0 50px 0;
    /* Extra bottom padding for scroll space */
    position: relative;
    z-index: 10;
    width: 100%;
    /* Ensure container takes full width */
}

.return-btn-bottom {
    background: var(--neon-blue);
    color: #000;
    padding: 15px 40px;
    /* Comfortable padding */
    font-size: 1.2rem;
    border-radius: 50px;
    /* Fully rounded pill shape */
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.3);
    text-transform: uppercase;
    font-family: 'Teko', sans-serif;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    /* Max width constraint for aesthetics on wide screens */
    max-width: 300px;
    width: 100%;
    justify-content: center;
}

.return-btn-bottom:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.5);
    background: #fff;
}

/* Mobile Responsive for About Page */
@media (max-width: 1024px) {
    .return-btn-bottom {
        width: 85%;
        max-width: none;
        font-size: 1.1rem;
    }
}

/* --- THE STADIUM --- */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background:
        repeating-linear-gradient(90deg,
            var(--grass-1) 0px,
            var(--grass-1) 50px,
            var(--grass-2) 50px,
            var(--grass-2) 100px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.7);
}

/* --- LIVE ROTATING BADGES & GROUPS --- */
/* Wrapper for Logo + Label */
.brand-group {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 50;
    cursor: pointer;
    text-decoration: none;
    /* For Resume Link */
    transition: transform 0.3s ease;
}

.brand-group:hover {
    transform: scale(1.1);
}

.brand-logo {
    position: relative;
    /* Changed from absolute to relative to sit inside group */
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    /* Glassmorphism effect */
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-label {
    margin-top: 5px;
    font-family: 'Teko', sans-serif;
    color: var(--text-gold);
    font-size: 1rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Positioning Groups */
.left-group {
    top: 25px;
    left: 25px;
}

.right-group {
    top: 25px;
    right: 25px;
}

.logo-center {
    font-size: 2rem;
    z-index: 2;
    filter: drop-shadow(0 0 5px rgba(255, 204, 0, 0.5));
}

.rotating-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: rotate-logo 12s linear infinite;
}

.rotating-text text {
    fill: var(--text-gold);
    font-family: 'Teko', sans-serif;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 500;
}

@keyframes rotate-logo {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- THE STAND --- */
.stadium-stand {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    /* Reduced dimensions for desktop */
    width: 55%;
    max-width: 650px;
    height: 85px;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 45px;
    border-bottom-right-radius: 45px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 15;
    border: 1px solid var(--stand-border);
    border-top: none;
    overflow: hidden;
}

.stand-roof-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(0, 0, 0, 0.2) 20px);
    opacity: 0.3;
    pointer-events: none;
}

.stadium-stand h1 {
    font-family: 'Teko', sans-serif;
    color: var(--text-gold);
    /* Slightly smaller font to fit new width */
    font-size: 2.2rem;
    letter-spacing: 2px;
    margin: 5px 0 0 0;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

/* --- [FIXED] LED TICKER SYSTEM --- */

/* The Container (Window) */
.stadium-stand .stand-subtitle {
    /* Use Block, NOT Flex, to allow scrolling flow */
    display: block;

    /* Fixed Dimensions are Key */
    width: 90%;
    height: 30px;
    margin: 5px auto 0 auto;

    /* Masks & Hiding */
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    /* Slight darkness for contrast */
    border-radius: 4px;

    /* Fade effect on edges */
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

/* The Scrolling Text Track */
.ticker-track {
    display: inline-block;
    white-space: nowrap;

    /* Typography */
    font-family: 'Teko', sans-serif;
    color: var(--neon-blue);
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    line-height: 30px;
    text-shadow: 0 0 6px rgba(0, 200, 255, 0.4);

    /* Animation Setup */
    padding-left: 100%;
    /* Shorter messages = faster cycle for snappy rotation */
    animation: ticker-scroll 15s linear infinite;

    /* --- SMOOTHNESS FIXES --- */
    will-change: transform;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
}

/* Hover Pause (Optional) */
.stadium-stand:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* --- END TICKER SYSTEM --- */


/* --- GAME ELEMENTS (Centered System) --- */

/* 30-yard circle hint */
.field-circle {
    position: absolute;
    /* Use vmin so it fits both mobile width and desktop height */
    width: 75vmin;
    /* Reduced from 85vmin */
    height: 75vmin;
    /* Reduced from 85vmin */
    max-width: 650px;
    /* Reduced max-width */
    max-height: 650px;

    /* Strictly Centered based on Game Center */
    top: var(--game-center-y);
    left: 50%;
    transform: translate(-50%, -50%);

    border: 2px dashed rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
}

/* The Pitch */
.pitch {
    position: absolute;
    width: 70px;
    height: 315px;

    background-color: var(--pitch);
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0%, transparent 15%, transparent 85%, rgba(0, 0, 0, 0.05) 100%),
        radial-gradient(ellipse at center, var(--pitch-wear) 0%, transparent 80%);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: block;
    box-sizing: border-box;

    /* Lock to Center */
    top: var(--game-center-y);
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Creases */
.crease,
.bowling-crease {
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    left: 0;
}

.return-crease-left,
.return-crease-right {
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.85);
}

/* Adjusted crease positions */
.top-crease {
    top: 52px;
}

.top-bowling-crease {
    top: 18px;
}

.bottom-crease {
    bottom: 52px;
}

.bottom-bowling-crease {
    bottom: 18px;
}

.return-crease-left {
    left: 8px;
    height: 52px;
    top: 0;
}

.return-crease-right {
    right: 8px;
    height: 52px;
    top: 0;
}

.return-crease-left-bottom {
    left: 8px;
    height: 52px;
    bottom: 0;
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.85);
}

.return-crease-right-bottom {
    right: 8px;
    height: 52px;
    bottom: 0;
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.85);
}

/* Stumps */
.stumps {
    position: absolute;
    width: 20px;
    height: 6px;
    /* Slightly smaller width */
    display: flex;
    justify-content: space-between;
    align-items: center;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.stumps:not(.bottom-stumps) {
    top: 15px;
}

/* Adjusted for new height */
.bottom-stumps {
    bottom: 15px;
}

.stump {
    width: 5px;
    height: 5px;
    background-color: #000;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    position: relative;
}

.bail {
    position: absolute;
    height: 2px;
    background-color: #eee;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

.bail-left {
    width: 7px;
    left: 3px;
}

.bail-right {
    width: 7px;
    right: 3px;
}


/* --- THE PLAYER --- */
#player {
    position: absolute;
    z-index: 10;
    width: 52px;
    /* Reduced from 60px */
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Position relative to the Game Center + Offset for Batting Crease */
    top: calc(var(--game-center-y) + 105px);
    left: 50%;
    transform: translate(-50%, -50%);
}

.player-shadow {
    position: absolute;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    filter: blur(4px);
    z-index: 1;
}

.shoulders {
    position: absolute;
    width: 35px;
    height: 16px;
    background: #1a4a8d;
    border-radius: 10px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.helmet {
    width: 23px;
    height: 23px;
    background-color: #0d2546;
    border-radius: 50%;
    position: relative;
    z-index: 3;
    box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.helmet-peak {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 5px;
    background: #0b1e36;
    border-radius: 2px;
}

.bat {
    position: absolute;
    width: 8px;
    height: 44px;
    background: linear-gradient(180deg, #3a2a1a 0%, #3a2a1a 18%, #e4c498 19%, #d4b088 50%, #c5a076 100%);
    border: 1px solid #5d4037;
    border-radius: 2px 2px 3px 3px;
    top: 4px;
    right: 4px;
    transform-origin: top center;
    transform: rotate(-25deg);
    z-index: 2;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    transition: filter 0.1s ease;
    /* Taper the handle (top ~18%) to be narrower than the blade */
    clip-path: polygon(30% 0%, 70% 0%, 70% 16%, 100% 20%, 100% 100%, 0% 100%, 0% 20%, 30% 16%);
}

/* Bat swing motion trail */
.bat-swing-trail {
    position: absolute;
    width: 8px;
    height: 44px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 204, 0, 0.15) 30%, rgba(255, 204, 0, 0.05) 100%);
    border-radius: 3px;
    top: 4px;
    right: 4px;
    transform-origin: top center;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    filter: blur(3px);
}

/* Impact spark on bat-ball contact */
.bat-impact-spark {
    position: absolute;
    width: 30px;
    height: 30px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 15;
    opacity: 0;
}

.bat-impact-spark::before,
.bat-impact-spark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.bat-impact-spark::before {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 204, 0, 0.6) 40%, transparent 70%);
}

.bat-impact-spark::after {
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 70%);
}

.bat-impact-spark.active {
    animation: impact-burst 0.4s ease-out forwards;
}

@keyframes impact-burst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.3);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.5);
    }
}

/* Screen shake on impact */
@keyframes screen-shake {
    0% { transform: translate(0, 0); }
    15% { transform: translate(-3px, 2px); }
    30% { transform: translate(3px, -2px); }
    45% { transform: translate(-2px, -1px); }
    60% { transform: translate(2px, 1px); }
    75% { transform: translate(-1px, 1px); }
    100% { transform: translate(0, 0); }
}

#game-container.screen-shake {
    animation: screen-shake 0.3s ease-out;
}

/* The Ball */
#ball {
    position: absolute;
    width: 9px;
    height: 9px;
    background: radial-gradient(circle at 35% 35%, #ff4d4d, #aa0000);
    border-radius: 50%;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
}

/* --- NAVIGATION (Relative to Center System) --- */
.fielder-nav {
    position: absolute;
    cursor: pointer;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Anchored to Center */
    top: var(--game-center-y);
    left: 50%;
}

.fielder-nav:hover {
    z-index: 25;
}

/* POSITIONING: Desktop Defaults */
/* Projects (Straight Drive - Top) */
#nav-projects {
    transform: translate(-50%, -50%) translateY(-28vmin);
}

/* Skills (Cover Drive - Top Left) */
#nav-skills {
    transform: translate(-50%, -50%) translate(-24vmin, -13vmin);
}

/* Experience (On Drive/Mid Wicket - Top Right) */
#nav-experience {
    transform: translate(-50%, -50%) translate(24vmin, -13vmin);
}

/* Contact (Wicket Keeper/Behind - Bottom) */
#nav-contact {
    transform: translate(-50%, -50%) translateY(28vmin);
}


/* Icons */
.marker-ring {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: 50%;
    animation: pulse 2.5s infinite;
    opacity: 0.5;
    box-shadow: 0 0 10px var(--neon-blue);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
        border-color: var(--white);
    }

    50% {
        opacity: 0.2;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
        border-color: var(--neon-blue);
    }
}

.fielder-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 2;
    border: 3px solid #1a4a8d;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.fielder-nav:hover .fielder-icon {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
}

.nav-icon-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

.fielder-label {
    margin-top: 8px;
    color: var(--white);
    font-family: 'Teko', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px #000;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    white-space: nowrap;
}

/* --- GAME FOOTER (Replacing Instruction) --- */
.game-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(0deg, #151515 0%, #252525 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 30;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
    gap: 15px;
}

.game-footer span {
    color: var(--text-gold);
    font-family: 'Teko', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    animation: flash 4s infinite;
}

.footer-icon {
    font-size: 1rem;
    opacity: 0.7;
}

@keyframes flash {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}


/* --- SCOREBOARD MODALS --- */
.content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* CHANGED: Darker background instead of blur to save GPU */
    background: rgba(0, 0, 0, 0.92);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    /* Faster transition */
    /* REMOVED: backdrop-filter: blur(8px); <-- THIS WAS THE LAG CAUSE */
}

.content-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.scoreboard-card {
    background: var(--scoreboard-bg);
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.content-overlay.active .scoreboard-card {
    transform: scale(1);
}

.scoreboard-header {
    background: linear-gradient(90deg, var(--scoreboard-accent) 0%, #253358 100%);
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--text-gold);
    flex-shrink: 0;
}

.scoreboard-header h3 {
    margin: 0;
    color: var(--white);
    font-family: 'Teko', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.score {
    font-family: 'Teko', sans-serif;
    font-size: 1.8rem;
    color: var(--text-gold);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

.scoreboard-body {
    padding: 2rem;
    color: #d0d0d0;
    text-align: left;
    overflow-y: auto;
    flex-grow: 1;
    /* ADDED: Smooth scrolling for iOS/Mac */
    -webkit-overflow-scrolling: touch;
    /* ADDED: Hardware acceleration hint */
    will-change: scroll-position;
}

.inning-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.inning-item:last-child {
    border-bottom: none;
}

.inning-item h4 {
    color: #fff;
    margin: 0 0 5px 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.inning-item p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #aaa;
}

/* --- PROJECT INNING CARDS (Projects Modal) --- */
.project-inning {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--neon-blue);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project-inning:last-child {
    margin-bottom: 0;
}

.project-inning:hover {
    background: rgba(0, 242, 255, 0.04);
    border-color: rgba(0, 242, 255, 0.25);
    transform: translateX(4px);
}

.project-inning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.project-inning-header h4 {
    color: #fff;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}

.project-inning-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 50px;
    color: var(--neon-blue);
    text-decoration: none;
    font-family: 'Teko', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.project-inning-link:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.3);
    transform: scale(1.05);
}

.project-inning-link.live {
    background: rgba(255, 204, 0, 0.1);
    border-color: rgba(255, 204, 0, 0.35);
    color: var(--text-gold);
}

.project-inning-link.live:hover {
    background: var(--text-gold);
    color: #000;
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.3);
}

.project-inning-link i {
    font-size: 0.85rem;
}

.project-inning p {
    margin: 0 0 10px 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #999;
}

.project-inning-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-inning-tags span {
    padding: 2px 10px;
    background: rgba(255, 204, 0, 0.06);
    border: 1px solid rgba(255, 204, 0, 0.18);
    border-radius: 50px;
    font-size: 0.7rem;
    color: var(--text-gold);
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.project-inning-tags span:hover {
    background: var(--text-gold);
    color: #000;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.25);
}

/* --- SKILL INNING CARDS (Skills Modal) --- */
.skill-inning {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--neon-blue);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.skill-inning:last-child {
    margin-bottom: 0;
}

.skill-inning:hover {
    background: rgba(0, 242, 255, 0.04);
    border-color: rgba(0, 242, 255, 0.25);
    transform: translateX(4px);
}

.skill-inning-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.skill-inning-header h4 {
    color: #fff;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.skill-inning-sub {
    font-size: 0.72rem;
    color: #666;
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    white-space: nowrap;
}

.skill-inning .stat-grid {
    gap: 8px;
}

.skill-inning .badge {
    transition: all 0.2s ease;
    cursor: default;
}

/* --- EXPERIENCE INNING CARDS (Experience Modal) --- */
.exp-inning {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--text-gold);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.exp-inning:last-child {
    margin-bottom: 0;
}

.exp-inning:hover {
    background: rgba(255, 204, 0, 0.03);
    border-color: rgba(255, 204, 0, 0.3);
    transform: translateX(4px);
}

.exp-inning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 12px;
}

.exp-inning-header h4 {
    color: #fff;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.exp-inning-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 50px;
    color: var(--neon-blue);
    font-family: 'Teko', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.exp-inning-badge.gold {
    background: rgba(255, 204, 0, 0.1);
    border-color: rgba(255, 204, 0, 0.35);
    color: var(--text-gold);
}

.exp-inning-date {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--neon-blue);
    font-family: 'Teko', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.exp-inning-list {
    margin: 0 0 10px 0;
    padding-left: 18px;
    list-style: none;
}

.exp-inning-list li {
    position: relative;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #999;
    margin-bottom: 5px;
    padding-left: 6px;
}

.exp-inning-list li::before {
    content: '›';
    position: absolute;
    left: -14px;
    color: var(--text-gold);
    font-weight: 700;
    font-size: 1rem;
}

.exp-inning-list li:last-child {
    margin-bottom: 0;
}

.exp-inning-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.exp-inning-tags span {
    padding: 2px 10px;
    background: rgba(255, 204, 0, 0.06);
    border: 1px solid rgba(255, 204, 0, 0.18);
    border-radius: 50px;
    font-size: 0.7rem;
    color: var(--text-gold);
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.exp-inning-tags span:hover {
    background: var(--text-gold);
    color: #000;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.25);
}

.stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    background: rgba(0, 242, 255, 0.05);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--neon-blue);
    border: 1px solid rgba(0, 242, 255, 0.3);
    font-family: 'Teko', sans-serif;
    letter-spacing: 0.5px;
}

/* MODAL ACTIONS (New Bottom Bar) */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.icon-btn.back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-gold);
    border: 1px solid var(--text-gold);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.icon-btn.back:hover {
    background: var(--text-gold);
    color: #000;
    transform: scale(1.1);
}

.action-btn.explore {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: var(--neon-blue);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    font-family: 'Teko', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
    transition: all 0.2s;
}

.action-btn.explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 255, 0.5);
    background: #fff;
}


/* --- [FIXED] MEDIA QUERIES --- */

/* --- TABLET ADJUSTMENTS (768px to 1024px) --- */
@media (min-width: 768px) and (max-width: 1024px) {
    .stadium-stand {
        width: 75%;
        height: 80px;
    }

    .stadium-stand h1 {
        font-size: 1.8rem;
    }

    /* FIX: Ticker window for Tablet */
    .stadium-stand .stand-subtitle {
        height: 25px;
        width: 85%;
        margin-top: 5px;
    }

    /* FIX: Text size and centering for Tablet */
    .ticker-track {
        font-size: 0.9rem;
        line-height: 25px;
        animation-duration: 12s;
    }

    /* Move badges BELOW stand level */
    .left-group {
        top: 90px;
        left: 20px;
    }

    .right-group {
        top: 90px;
        right: 20px;
    }

    /* Slightly more spread out for tablet touch targets */
    #nav-projects {
        transform: translate(-50%, -50%) translateY(-30vmin);
    }

    #nav-skills {
        transform: translate(-50%, -50%) translate(-32vmin, -10vmin);
    }

    #nav-experience {
        transform: translate(-50%, -50%) translate(32vmin, -10vmin);
    }

    #nav-contact {
        transform: translate(-50%, -50%) translateY(32vmin);
    }
}

/* --- MOBILE ADJUSTMENTS (< 768px) --- */
@media (max-width: 767px) {

    /* Scale down game center elements */
    .pitch {
        transform: translate(-50%, -50%) scale(0.85);
    }

    #player {
        transform: translate(-50%, -50%) scale(0.85);
    }

    /* Live Logo Size & Position */
    .brand-logo {
        width: 65px;
        height: 65px;
    }

    .badge-label {
        font-size: 0.8rem;
    }

    .left-group {
        top: 75px;
        left: 10px;
    }

    .right-group {
        top: 75px;
        right: 10px;
    }

    .logo-center {
        font-size: 1.5rem;
    }

    /* Stand Adjustments - Smaller & Compact */
    .stadium-stand {
        width: 90%;
        height: 65px;
        border-bottom-left-radius: 25px;
        border-bottom-right-radius: 25px;
    }

    .stadium-stand h1 {
        font-size: 1.3rem;
        margin-top: 2px;
    }

    /* FIX: Ticker window for Mobile */
    .stadium-stand .stand-subtitle {
        width: 95%;
        /* Maximize width */
        height: 22px;
        /* Fixed height */
        margin-top: 2px;
        background: transparent;
        /* Remove background on mobile for cleaner look */
    }

    /* FIX: Text size and centering for Mobile */
    .ticker-track {
        font-size: 0.85rem;
        line-height: 22px;
        animation-duration: 10s;
    }

    /* Fielders - Using VH/VW for better portrait spread */
    #nav-projects {
        transform: translate(-50%, -50%) translateY(-32vh);
    }

    #nav-skills {
        transform: translate(-50%, -50%) translate(-33vw, -7vh);
    }

    #nav-experience {
        transform: translate(-50%, -50%) translate(33vw, -7vh);
    }

    #nav-contact {
        transform: translate(-50%, -50%) translateY(28vh);
    }

    /* Smaller Icons for Mobile */
    .marker-ring {
        width: 40px;
        height: 40px;
    }

    .fielder-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .fielder-label {
        font-size: 0.9rem;
        padding: 1px 6px;
    }

    .game-footer {
        height: 35px;
    }

    .game-footer span {
        font-size: 1rem;
    }

    .field-circle {
        width: 85vmin;
        height: 85vmin;
    }
}

/* --- EXTRA SMALL DEVICES (< 400px) --- */
@media (max-width: 400px) {
    .stadium-stand h1 {
        font-size: 1.0rem;
        letter-spacing: 0.5px;
    }

    /* FIX: Ticker for Tiny Screens */
    .stadium-stand .stand-subtitle {
        height: 18px;
    }

    .ticker-track {
        font-size: 0.75rem;
        line-height: 18px;
    }

    .field-circle {
        width: 85vmin;
        height: 85vmin;
    }
}

/* Skill Badges Pop */
.badge {
    transition: all 0.2s ease;
    cursor: default;
}

.badge:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 15px var(--neon-blue);
    transform: scale(1.1);
    border-color: var(--neon-blue);
}

/* --- DESKTOP EXCLUSIVE UPGRADES --- */

/* 1. Default Safety: Hide these elements on mobile/tablet */
.desktop-only {
    display: none;
}

/* 2. Enable ONLY on Large Screens (Laptops/Desktops) */
@media (min-width: 1025px) {

    /* Reveal elements */
    .desktop-only {
        display: block;
    }

    /* --- ATMOSPHERE: FLOODLIGHTS --- */
    .floodlight-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 2;
        /* Behind the UI but above grass */
    }

    .light-beam {
        position: absolute;
        width: 60vw;
        /* Increased size slightly to compensate for lack of blur */
        height: 60vw;
        /* CHANGED: Use a softer gradient instead of a blur filter */
        background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 242, 255, 0.01) 50%, transparent 70%);
        /* REMOVED: filter: blur(60px); <-- EXPENSIVE */
        opacity: 0.8;
        pointer-events: none;
        /* ADDED: Force GPU layer */
        transform: translateZ(0);
        will-change: transform;
    }

    .left-light {
        top: -25%;
        left: -15%;
    }

    .right-light {
        top: -25%;
        right: -15%;
    }

    /* --- SIDE WIDGETS: FLOATING STATS --- */
    .floating-stat {
        position: absolute;
        top: 50%;
        /* Vertically centered */
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.5);
        /* Darker, sleek background */
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 25px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 15px;
        backdrop-filter: blur(8px);
        /* Glass effect */
        z-index: 10;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        animation: float-vertical 6s ease-in-out infinite;
        width: 200px;
        /* Fixed width for consistency */
    }

    /* Specific positioning to fill empty side space */
    .left-stat {
        left: 5%;
        border-left: 3px solid var(--text-gold);
    }

    .right-stat {
        right: 5%;
        border-right: 3px solid var(--neon-blue);
        flex-direction: row-reverse;
        /* Flip icon/text */
        text-align: right;
    }

    .stat-icon {
        font-size: 2.2rem;
        color: #fff;
        opacity: 0.9;
    }

    .stat-text small {
        display: block;
        color: #aaa;
        font-size: 0.7rem;
        letter-spacing: 2px;
        margin-bottom: 2px;
    }

    .stat-text strong {
        color: var(--neon-blue);
        font-family: 'Teko', sans-serif;
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    @keyframes float-vertical {

        0%,
        100% {
            transform: translateY(-50%);
        }

        50% {
            transform: translateY(-60%);
        }
    }

    /* --- CROWD CAMERA FLASHES (CSS Part) --- */
    .camera-flash {
        position: absolute;
        width: 8px;
        /* Slightly larger */
        height: 8px;
        background: #fff;
        border-radius: 50%;
        /* CHANGED: Reduced shadow spread to lower rendering cost */
        box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
        opacity: 0;
        animation: flash-pop 0.3s ease-out forwards;
        z-index: 1;
        pointer-events: none;
        /* ADDED: Force GPU */
        will-change: opacity, transform;
    }

    @keyframes flash-pop {
        0% {
            transform: scale(0);
            opacity: 0;
        }

        50% {
            transform: scale(2);
            opacity: 1;
        }

        100% {
            transform: scale(0.5);
            opacity: 0;
        }
    }
}

/* Add this to style.css */
body.modal-open .ticker-track {
    animation-play-state: paused;
}

/* ===================================================
   MAIN PAGE UX ENHANCEMENTS
   =================================================== */

/* --- CINEMATIC ENTRANCE OVERLAY --- */
.entrance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0e17;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.entrance-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.entrance-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: entrance-pulse 1.5s ease-in-out infinite;
}

.entrance-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 0 15px rgba(255, 204, 0, 0.5));
}

.entrance-label {
    font-family: 'Teko', sans-serif;
    font-size: 1.4rem;
    color: var(--text-gold);
    letter-spacing: 6px;
    text-transform: uppercase;
}

@keyframes entrance-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Entrance Loading Progress Bar */
.entrance-progress {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.entrance-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--text-gold), var(--neon-blue));
    border-radius: 3px;
    animation: entrance-load 1.2s ease-in-out forwards;
}

@keyframes entrance-load {
    0% { width: 0%; }
    60% { width: 70%; }
    100% { width: 100%; }
}

/* --- PAGE TRANSITION OVERLAY --- */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0e17;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* --- CURSOR TRAIL (Desktop Only) --- */
.cursor-trail-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.6), transparent);
    mix-blend-mode: screen;
    transition: opacity 0.1s;
}

/* --- PAGE LOADING STATE (hide elements for entrance) --- */
body.page-loading .stadium-stand,
body.page-loading .brand-group,
body.page-loading #player,
body.page-loading .fielder-nav,
body.page-loading .field-circle,
body.page-loading .game-footer,
body.page-loading .game-overlay {
    opacity: 0;
}

/* --- PLAYER IDLE BREATHING --- */
@keyframes player-breathe {
    0%, 100% {
        filter: drop-shadow(0 0 0px transparent);
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.25));
    }
}

/* --- IDLE BAT TAP (gentle guard-tapping) --- */
@keyframes bat-idle-tap {
    0%, 85%, 100% {
        transform: rotate(-25deg);
    }
    90% {
        transform: rotate(-20deg) translateY(1px);
    }
    95% {
        transform: rotate(-25deg) translateY(0px);
    }
}

#player {
    animation: player-breathe 3s ease-in-out infinite;
    animation-play-state: paused; /* Starts after entrance */
}

#player.alive {
    animation-play-state: running;
}

#player.alive .bat {
    animation: bat-idle-tap 4s ease-in-out infinite;
}

#player.swinging .bat {
    animation: none;
}

/* --- BALL TRAIL EFFECT --- */
#ball-trail {
    position: absolute;
    width: 9px;
    height: 9px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 77, 77, 0.5), rgba(170, 0, 0, 0.3));
    border-radius: 50%;
    box-shadow: 0 0 12px 3px rgba(255, 77, 77, 0.3);
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    filter: blur(3px);
    transition: opacity 0.1s;
}

/* --- ENHANCED FIELDER NAV INTERACTIONS --- */

/* Pause marker-ring pulse on hover — reduces visual noise */
.fielder-nav:hover .marker-ring {
    animation-play-state: paused;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.fielder-icon {
    transition: border-color 0.35s ease, box-shadow 0.4s ease, transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fielder-nav:hover .fielder-icon {
    transform: scale(1.14);
    border-color: var(--neon-blue);
    box-shadow: 0 0 18px rgba(0, 242, 255, 0.4), 0 0 35px rgba(0, 242, 255, 0.1);
}

.fielder-label {
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.fielder-nav:hover .fielder-label {
    background: rgba(0, 242, 255, 0.12);
    color: var(--neon-blue);
    border-color: rgba(0, 242, 255, 0.25);
}

/* Fielder click ripple */
.fielder-nav::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--neon-blue);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.fielder-nav.clicked::after {
    animation: fielder-ripple 0.6s ease-out forwards;
}

@keyframes fielder-ripple {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* --- ENHANCED MODAL TRANSITIONS --- */
.content-overlay {
    transition: opacity 0.4s ease;
}

.scoreboard-card {
    transform: scale(0.85) translateY(30px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease;
    opacity: 0;
}

.content-overlay.active .scoreboard-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Staggered content reveal inside modals */
.content-overlay.active .scoreboard-header {
    animation: modal-slide-down 0.4s ease-out 0.1s both;
}

.content-overlay.active .scoreboard-body {
    animation: modal-slide-down 0.5s ease-out 0.2s both;
}

.content-overlay.active .modal-actions {
    animation: modal-slide-down 0.4s ease-out 0.35s both;
}

@keyframes modal-slide-down {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scoreboard header accent overlay */
.scoreboard-header {
    position: relative;
    overflow: hidden;
}

.scoreboard-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.05));
    pointer-events: none;
}

/* --- ENHANCED GAME FOOTER --- */
.game-footer {
    overflow: hidden;
}

.footer-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    animation: footer-scan 3s linear infinite;
}

@keyframes footer-scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.game-footer span {
    /* Override existing flash with smoother one */
    animation: footer-glow 3s ease-in-out infinite;
}

@keyframes footer-glow {
    0%, 100% { opacity: 0.5; text-shadow: none; }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(255, 204, 0, 0.3); }
}

/* --- ENHANCED ROTATING BADGES --- */
.brand-group {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo {
    transition: box-shadow 0.3s ease;
}

.brand-group:hover .brand-logo {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 204, 0, 0.2);
}

.badge-label {
    transition: all 0.3s ease;
}

.brand-group:hover .badge-label {
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
    transform: translateY(2px);
}

/* --- STADIUM STAND HOVER POLISH --- */
.stadium-stand {
    transition: box-shadow 0.3s ease;
}

.stadium-stand:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7),
                0 0 30px rgba(255, 204, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* --- INNING ITEMS HOVER --- */
.inning-item {
    transition: background 0.3s ease, transform 0.2s ease;
}

.inning-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

/* --- FIELD CIRCLE SUBTLE ANIMATION --- */
.field-circle {
    animation: field-circle-breathe 8s ease-in-out infinite;
}

@keyframes field-circle-breathe {
    0%, 100% { opacity: 1; border-color: rgba(255, 255, 255, 0.25); }
    50% { opacity: 0.6; border-color: rgba(0, 242, 255, 0.15); }
}

/* ===================================================
   COMMENTARY TOAST — Cricket-style commentator popup
   =================================================== */
.commentary-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9997;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.97), rgba(13, 27, 42, 0.97));
    color: var(--text-gold);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-style: italic;
    padding: 12px 28px;
    border-radius: 50px;
    border: 1px solid rgba(255, 204, 0, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 204, 0, 0.08);
    backdrop-filter: blur(12px);
    animation: toast-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commentary-toast.fade-out {
    animation: toast-slide-out 0.5s ease-in forwards;
}

@keyframes toast-slide-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.9); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes toast-slide-out {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* Easter Egg Animations */
@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

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

/* ===================================================
   ENHANCED BADGE HOVER — Cricket ball spin effect
   =================================================== */
.badge {
    position: relative;
    overflow: hidden;
}

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

.badge:hover::before {
    left: 150%;
}

/* ===================================================
   SCOREBOARD BODY — Scrollbar styling
   =================================================== */
.scoreboard-body::-webkit-scrollbar {
    width: 4px;
}

.scoreboard-body::-webkit-scrollbar-track {
    background: transparent;
}

.scoreboard-body::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 255, 0.3);
    border-radius: 4px;
}

.scoreboard-body::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}