﻿body {
    font-family: Arial;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,.75),rgba(0,0,0,.75)),url('images/pigskinBackground.png');
    background-size: cover;
    background-attachment: fixed;
    color: white;
    padding: 20px;
}

.logo {
    max-width: 200px;
    width: 100%;
    display: block;
    margin: auto;
}

.yardNumbers {
    position: relative;
    width: calc(90% - 120px);
    max-width: 1080px;
    margin: auto;
    margin-bottom: 5px;
    height: 20px;
}

    .yardNumbers span {
        position: absolute;
        transform: translateX(-50%);
        font-weight: bold;
    }

        .yardNumbers span:last-child {
            transform: none;
            right: -55px;
        }

.fieldWrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.endzone {
    width: 60px;
    background: #002244;
    border-top: 3px solid white;
    border-bottom: 3px solid white;
}

    .endzone.left {
        border-left: 3px solid white;
        border-radius: 10px 0 0 10px;
    }

    .endzone.right {
        border-right: 3px solid white;
        border-radius: 0 10px 10px 0;
    }

.field {
    position: relative;
    flex: 1;
    height: 120px;
    border-top: 3px solid white;
    border-bottom: 3px solid white;
    background: #147a2a;
    overflow: hidden;
}

#yardLines div {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,.25);
}

    #yardLines div.major {
        width: 4px;
        background: rgba(255,255,255,.55);
    }

#lineOfScrimmage {
    position: absolute;
    top: 0;
    width: 4px;
    height: 100%;
    background: #3333ff;
}

#firstDownLine {
    position: absolute;
    top: 0;
    width: 4px;
    height: 100%;
    background: yellow;
}

#football {
    position: absolute;
    top: 40px;
    font-size: 28px;
    transition: left .12s linear;
}

.answerBtn {
    display: block;
    width: 90%;
    max-width: 420px;
    margin: 10px auto;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    background: #d8d8d8;
    color: black;
    border: 3px solid white;
    box-shadow: inset 0 0 0 2px black;
    cursor: pointer;
}

    .answerBtn:hover {
        background: #ffd447;
    }

.scoreboard {
    width: 100%;
    background: #050505;
    border: 6px solid #111;
    max-width: 1000px;
    margin: auto;
    box-shadow: inset 0 0 25px black;
    font-family: 'Orbitron',monospace;
    display: grid;
    grid-template-columns: repeat(4,1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
}

.scoreItem {
    color: #ff3b3b;
    font-size: 12px;
    letter-spacing: 2px;
}
.scoreItem2 {
    display: flex;
    justify-content: center;
    gap: 60px; /* spacing between GAME and PLAYS */
    color: #ff3a;
    font-size: 12px;
    letter-spacing: 2px;
    text-align: center;
    grid-column: 1 / -1;
}

    .scoreItem2 #gameClock,
    .scoreItem2 #playsText {
        color: #ff3a;
    }
.drive {
    grid-column: 1/-1;
    color: #ffd000;
    font-size: 28px;
}
.scoreItem {
    text-align:center;
}
#playClock {
    font-size: 36px;
    font-family: 'Share Tech Mono',monospace;
    color: #ff3b3b;
}

#questionBox {
    background: linear-gradient(#0a1fd6,#020c6b);
    border: 6px solid white;
    padding: 20px;
    width: 90%;
    max-width: 520px;
    margin: 20px auto;
}

.playButtons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.playBtn {
    width: 200px;
    height: 200px;
    cursor: pointer;
    transition: transform .2s;
}

    .playBtn:hover {
        transform: scale(1.08);
    }

#playResult {
    margin-top: 20px;
    font-weight: bold;
    height: 28px;
}

#helpBtn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #111;
    color: #ffd000;
    border: 2px solid #ffd000;
    font-family: 'Orbitron';
    font-size: 20px;
    padding: 12px 28px;
    cursor: pointer;
}

#helpModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#helpContent {
    background: #020c6b;
    border: 6px solid white;
    padding: 30px;
    max-width: 500px;
    text-align: center;
    color: white;
}

#touchdownBanner {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%,-50%);
    font-size: 90px;
    font-weight: bold;
    color: #ffd000;
    opacity: 0;
    z-index: 9999;
}

#playerIntro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.92);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

    #playerIntro input {
        padding: 12px;
        font-size: 18px;
        width: 260px;
        text-align: center;
        margin-bottom: 15px;
        border-radius: 6px;
        border: 2px solid #ffd000;
        background: black;
        color: white;
    }
#leaderTicker {
    max-width: 1000px;
    background: black;
    border-top: 3px solid #ffcc00;
    border-bottom: 3px solid #ffcc00;
    overflow: hidden;
    white-space: nowrap;
    font-family: "Courier New", monospace;
    color: #ffcc00;
    padding: 6px 0;
    margin-left:auto;
    margin-right:auto;
}

#tickerContent {
    display: inline-block;
    padding-left: 100%;
    animation: tickerScroll 35s linear infinite;
}

@keyframes tickerScroll {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}




/* PLAYER INTRO OVERLAY */
#playerIntro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 4px solid #ffd000;
    box-shadow: 0 0 20px #000, 0 0 10px #ffd000 inset;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    z-index: 999;
}

    /* TITLE */
    #playerIntro h1 {
        font-family: 'Orbitron', monospace;
        font-size: 28px;
        color: #ffd000;
        margin-bottom: 10px;
        text-shadow: 0 0 10px #ffd000;
    }

    /* SUBTEXT */
    #playerIntro p {
        font-size: 14px;
        color: #ccc;
        margin-bottom: 15px;
    }

/* INPUT FIELD */
#playerNameInput {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: #111;
    color: #fff;
    border: 2px solid #ffd000;
    border-radius: 8px;
    text-align: center;
    outline: none;
    box-shadow: inset 0 0 10px #000;
}

    /* INPUT FOCUS EFFECT */
    #playerNameInput:focus {
        border-color: #ff3b3b;
        box-shadow: 0 0 8px #ff3b3b;
    }

/* START BUTTON */
#playerIntro button {
    margin-top: 15px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    background: linear-gradient(#ffd000, #caa500);
    color: black;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 0 #8a7300, 0 0 10px #ffd000;
    transition: all 0.15s ease;
}

    /* BUTTON HOVER */
    #playerIntro button:hover {
        background: linear-gradient(#ffe347, #d6b200);
        transform: translateY(-2px);
        box-shadow: 0 6px 0 #8a7300, 0 0 15px #ffd000;
    }

    /* BUTTON CLICK */
    #playerIntro button:active {
        transform: translateY(2px);
        box-shadow: 0 2px 0 #8a7300;
    }

#playerIntro {
    animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}
/* OVERLAY BACKDROP */
#helpModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* MODAL BOX */
#helpContent {
    background: #0a1a40; /* deep football blue */
    border: 4px solid #ffd000;
    width: 90%;
    max-width: 600px;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 0 25px black, 0 0 15px #ffd000 inset;
    color: white;
    text-align: left;
    font-family: Arial;
}

    /* TITLE */
    #helpContent h2 {
        font-family: 'Orbitron', monospace;
        color: #ffd000;
        text-align: center;
        margin-bottom: 15px;
        text-shadow: 0 0 10px #ffd000;
    }

    /* SECTION HEADINGS */
    #helpContent p strong {
        display: block;
        color: #ffd000;
        margin-top: 12px;
        margin-bottom: 3px;
    }

    /* BODY TEXT */
    #helpContent p {
        font-size: 14px;
        line-height: 1.5;
        color: #ddd;
    }

    /* BUTTON */
    #helpContent button {
        display: block;
        margin: 20px auto 0;
        padding: 12px 20px;
        font-size: 14px;
        font-weight: bold;
        background: linear-gradient(#ffd000, #caa500);
        color: black;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        box-shadow: 0 4px 0 #8a7300, 0 0 10px #ffd000;
        transition: all 0.15s ease;
    }

        #helpContent button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 0 #8a7300, 0 0 15px #ffd000;
        }

        #helpContent button:active {
            transform: translateY(2px);
            box-shadow: 0 2px 0 #8a7300;
        }
/* BLINK ANIMATION */
/* FLASH RED ↔ YELLOW */
@keyframes flashWarning {
    0% {
        background: #8b0000;
    }
    /* dark red */
    50% {
        background: #ffd000;
    }
    /* yellow */
    100% {
        background: #8b0000;
    }
}

/* APPLY TO PLAY CLOCK */
#playClock {
    padding: 10px;
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    background: black;
    color: #fff;
    transition: background 0.2s;
}
    /* default warning */
    #playClock.warning {
        animation: flashWarning 0.8s infinite;
    }

        /* faster panic mode */
        #playClock.warning.fast {
            animation: flashWarning 0.3s infinite;
        }





/* =========================
   PENALTY FLAG
========================= */

#penaltyFlag {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #ffd000;
    color: black;
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 20px 40px;
    border-radius: 12px;
    border: 4px solid black;
    box-shadow: 0 0 25px #ffd000, 0 0 50px #ff3b3b;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
}
@keyframes flagPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -70%) scale(0.5) rotate(-10deg);
    }

    40% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }

    60% {
        transform: translate(-50%, -50%) scale(0.95) rotate(-3deg);
    }

    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@keyframes flagFlash {
    0% {
        background: #ffd000;
    }

    50% {
        background: #ff3b3b;
    }

    100% {
        background: #ffd000;
    }
}

#penaltyFlag.show {
    animation: flagPop 0.4s ease, flagFlash 0.6s infinite;
    opacity: 1;
}
@keyframes screenShake {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-5px, 5px);
    }

    50% {
        transform: translate(5px, -5px);
    }

    75% {
        transform: translate(-5px, -5px);
    }

    100% {
        transform: translate(0, 0);
    }
}

body.shake {
    animation: screenShake 0.3s;
}



/* =========================
   AUDIBLE BUTTON
========================= */

#audibleBtn {
    margin: 10px auto 15px;
    display: block;
    padding: 10px 18px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    background: #000; /* black base */
    color: #00e6e6; /* teal text */

    border: 2px solid #00e6e6; /* teal outline */
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 0 #004c4c, 0 0 10px #00e6e6;
    transition: all 0.15s ease;
}

    /* HOVER */
    #audibleBtn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 0 #004c4c, 0 0 15px #00e6e6;
    }

    /* CLICK */
    #audibleBtn:active {
        transform: translateY(2px);
        box-shadow: 0 2px 0 #004c4c;
    }

/* PULSE (power-up ready) */
@keyframes audiblePulse {
    0% {
        box-shadow: 0 0 8px #00e6e6;
    }

    50% {
        box-shadow: 0 0 20px #00e6e6, 0 0 35px #00ffff;
    }

    100% {
        box-shadow: 0 0 8px #00e6e6;
    }
}

#audibleBtn.ready {
    animation: audiblePulse 1.5s infinite;
}

/* DISABLED */
#audibleBtn.disabled {
    background: #111;
    color: #555;
    border: 2px solid #333;
    cursor: not-allowed;
    box-shadow: none;
    animation: none;
}





/* =========================
  TURNOVER ON DOWNS BANNER
========================= */
#turnoverBanner {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: #111;
    color: #ff3b3b;
    font-family: 'Orbitron', monospace;
    font-size: 34px;
    font-weight: bold;
    letter-spacing: 3px;
    padding: 25px 50px;
    border-radius: 12px;
    border: 4px solid #ff3b3b;
    box-shadow: 0 0 25px #ff3b3b, 0 0 60px black inset;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
}
@keyframes turnoverPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(0.5) rotate(-5deg);
    }

    40% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotate(2deg);
    }

    60% {
        transform: translate(-50%, -50%) scale(0.95);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes turnoverPulse {
    0% {
        box-shadow: 0 0 15px #ff3b3b;
    }

    50% {
        box-shadow: 0 0 35px #ff0000;
    }

    100% {
        box-shadow: 0 0 15px #ff3b3b;
    }
}

#turnoverBanner.show {
    animation: turnoverPop 0.4s ease, turnoverPulse 0.6s infinite;
    opacity: 1;
}
@keyframes heavyShake {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-8px, 6px);
    }

    40% {
        transform: translate(8px, -6px);
    }

    60% {
        transform: translate(-6px, -4px);
    }

    80% {
        transform: translate(6px, 4px);
    }

    100% {
        transform: translate(0, 0);
    }
}

body.heavyShake {
    animation: heavyShake 0.4s;
}






/* =========================
   MOBILE OPTIMIZATION
========================= */
.adContainer {
    width: 100%;
    max-width: 900px;
    margin: 15px auto;
    background: #111;
    border: 2px dashed #444;
    text-align: center;
    padding: 10px;
    color: #888;
    font-size: 12px;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 768px) {
    .adContainer {
        margin: 10px auto;
        padding: 8px;
        font-size: 11px;
    }
}
.adBox {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}



/* =========================
   TOUCHDOWN BANNER
========================= */
#touchdownBanner {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    background: radial-gradient(circle, #ffd000, #caa500);
    color: black;
    font-family: 'Orbitron', monospace;
    font-size: 42px;
    font-weight: bold;
    letter-spacing: 4px;
    padding: 30px 60px;
    border-radius: 14px;
    border: 5px solid #fff;
    box-shadow: 0 0 30px #ffd000, 0 0 60px #ffea00, 0 0 80px #ffffff;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    text-align: center;
}
@keyframes tdPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(0.4) rotate(-5deg);
    }

    40% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotate(3deg);
    }

    60% {
        transform: translate(-50%, -50%) scale(0.95);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes tdGlow {
    0% {
        box-shadow: 0 0 20px #ffd000, 0 0 40px #ffea00;
    }

    50% {
        box-shadow: 0 0 40px #ffffff, 0 0 80px #ffd000;
    }

    100% {
        box-shadow: 0 0 20px #ffd000, 0 0 40px #ffea00;
    }
}

#touchdownBanner.show {
    animation: tdPop 0.4s ease, tdGlow 0.8s infinite;
    opacity: 1;
}
@keyframes tdFlash {
    0% {
        background: #fff;
    }

    100% {
        background: transparent;
    }
}

body.tdFlash {
    animation: tdFlash 0.3s;
}



/* =========================
   MOBILE OPTIMIZATION
========================= */

@media (max-width: 768px) {

    body {
        padding: 10px;
        font-size: 14px;
    }

    .logo {
        max-width: 140px;
    }

    /* Field + Endzones */
    .fieldWrapper {
        width: 100%;
    }

    .endzone {
        width: 35px;
    }

    .field {
        height: 90px;
    }

    #football {
        top: 28px;
        font-size: 22px;
    }

    /* Yard numbers */
    .yardNumbers {
        width: calc(100% - 70px);
    }

        .yardNumbers span {
            font-size: 10px;
        }

    /* Scoreboard */
    .scoreboard {
        grid-template-columns: repeat(2,1fr);
        grid-template-rows: auto auto auto auto;
        font-size: 11px;
        padding: 5px;
    }

    .drive {
        font-size: 18px;
    }

    #playClock {
        font-size: 22px;
    }

    /* Question box */
    #questionBox {
        padding: 15px;
        font-size: 14px;
    }

    /* Answer buttons */
    .answerBtn {
        width: 95%;
        font-size: 14px;
        padding: 10px;
    }

    /* Play buttons */
    .playButtons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .playBtn {
        width: 140px;
        height: 140px;
    }

    /* Help button */
    #helpBtn {
        font-size: 16px;
        padding: 8px 16px;
        top: 10px;
        right: 10px;
    }

    /* Touchdown banner */
    #touchdownBanner {
        font-size: 48px;
        text-align: center;
    }

    /* Leader ticker */
    #leaderTicker {
        font-size: 12px;
        padding: 4px 0;
    }
}  

/* END MOBILE */














































/* =========================
   ADS
========================= */
#mobileAd {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000;
    border-top: 2px solid #444;
    z-index: 999;
    display: none;
}

@media (max-width: 768px) {
    #mobileAd {
        display: block;
    }
}