/* GameYN page — Yes or No game */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;600&display=swap');

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.16), transparent 34%),
        radial-gradient(circle at 88% 15%, rgba(59, 130, 246, 0.18), transparent 30%),
        linear-gradient(165deg, #11131e 0%, #191a2a 55%, #10121b 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-attachment: fixed;
    color: #eef2ff;
    font-family: 'Oswald', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

.gyn-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    backdrop-filter: blur(3px);
}

.gyn-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.65rem;
    letter-spacing: 0.06em;
    color: #fef08a;
    text-shadow: 0 0 16px rgba(250, 204, 21, 0.35);
    grid-column: 1;
}

.gyn-balance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    grid-column: 2;
    justify-self: center;
    font-size: 1.35rem;
    color: #bbf7d0;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
    white-space: nowrap;
}

.gyn-balance strong { color: #4ade80; }

.gyn-coin-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    background: radial-gradient(circle at 30% 30%, #fff0a8 0%, #ffd84a 35%, #f2b11c 70%, #c57f00 100%);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.gyn-coin-icon::after {
    content: 'T';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    color: #5c3a00;
    text-shadow: 0 1px 0 rgba(255,255,255,0.45);
}

.gyn-nav {
    display: flex;
    gap: 10px;
    grid-column: 3;
    justify-self: end;
}

.gyn-nav-btn {
    font-family: 'Oswald', sans-serif;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.gyn-nav-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.42);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.32);
}

.gyn-nav-btn.is-disabled {
    opacity: 0.35;
    filter: grayscale(0.7);
    pointer-events: none;
    cursor: not-allowed;
}

.gyn-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 44px;
}

.gyn-top-row {
    display: grid;
    grid-template-columns: 195px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

/* Vertical portrait video (01m.mp4 … 12m.mp4), rounded panel */
.gyn-character-panel {
    width: 195px;
    aspect-ratio: 9 / 16;
    height: auto;
    margin: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
    flex-shrink: 0;
}

.gyn-character-panel.gyn-hidden {
    display: none !important;
}

.gyn-character-photo {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    background: #0f0f13;
}

.gyn-text-panel {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
}

.gyn-text-stage {
    position: relative;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(5, 7, 15, 0.65);
    overflow: hidden;
}

.gyn-listening-overlay {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(59, 130, 246, 0.48);
    background: linear-gradient(155deg, rgba(10, 18, 32, 0.93), rgba(12, 10, 28, 0.93));
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.gyn-listening-overlay.is-revealing {
    animation: gynOverlayRiseGlow 520ms ease forwards;
    pointer-events: none;
}

@keyframes gynOverlayRiseGlow {
    0% {
        transform: translateY(0);
        opacity: 1;
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
    }
    35% {
        box-shadow: 0 0 18px rgba(255, 215, 0, 0.7);
    }
    100% {
        transform: translateY(-42px);
        opacity: 0;
        box-shadow: 0 0 34px rgba(255, 215, 0, 0.05);
    }
}

.gyn-source-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 4px 2px;
}

.gyn-tts-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.gyn-tts-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.gyn-tts-btn:hover {
    transform: scale(1.12);
}

.tts-play {
    background: #22c55e;
    color: #fff;
}

.tts-pause {
    background: #f59e0b;
    color: #fff;
}

.tts-stop {
    background: #ef4444;
    color: #fff;
}

.tts-speed {
    background: #444;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.gyn-tts-speed {
    min-width: 34px;
    text-align: center;
    color: #aaa;
    font-size: 0.95rem;
}

.gyn-show-text-btn {
    font-size: 0.95rem;
    padding: 8px 12px;
}

.gyn-question-panel {
    display: flex;
    align-items: stretch;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border-radius: 16px;
    padding: 10px 14px;
    margin-bottom: 18px;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
    min-height: 132px;
    overflow: hidden;
}

.gyn-question-body {
    flex: 1;
    min-width: 0;
    min-height: 110px;
}

.gyn-show-answer-btn {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.92rem;
    line-height: 1.25;
    padding: 10px 14px;
    text-align: center;
    white-space: nowrap;
}

.gyn-instruction {
    color: #9ca3af;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.gyn-warn {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fcd34d;
    padding: 16px;
    border-radius: 12px;
    line-height: 1.5;
}

.gyn-warn a { color: #fde68a; }

.gyn-hidden { display: none !important; }

/* Source line: e.g. Problems #23 — Uncommitted — Characters: Jane. */
.gyn-source {
    font-size: 1.02rem;
    color: #e2e8f0;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border-left: none;
    border-radius: 0;
}

.gyn-source strong { color: #f3f4f6; }

/* Full text block (what they read) */
.gyn-text-block {
    position: absolute;
    inset: 0;
    background: transparent;
    border-radius: 0;
    padding: 10px 12px;
    margin-bottom: 0;
    line-height: 1.5;
    color: #f8fafc;
    font-size: 1.45rem;
    overflow-y: auto;
    z-index: 1;
}

.gyn-question-label {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin: 0 0 10px;
}

.gyn-question-statement {
    background: transparent;
    border-left: none;
    padding: 0;
    margin: 0;
    line-height: 1.45;
    color: #ffffff;
    font-size: calc(2.15rem - 2px);
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
    max-height: 110px;
    overflow-y: auto;
}

.gyn-timer-wrap {
    height: 6px;
    border-radius: 999px;
    background: #20253c;
    overflow: hidden;
    border: 1px solid #3e4b7e;
    margin-bottom: 14px;
}
.gyn-timer-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #38d67b 0%, #f1d450 62%, #e34a4a 100%);
    transform-origin: left center;
}
.gyn-timer-bar.is-critical { animation: gynshake .22s infinite; }
@keyframes gynshake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    50% { transform: translateX(1px); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

.gyn-btns {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.gyn-btn {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    padding: 12px 32px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    text-decoration: none;
    display: inline-block;
}

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

.gyn-btn-yes {
    background: linear-gradient(180deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 10px 18px rgba(34, 197, 94, 0.36);
}

.gyn-btn-no {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.34);
}

.gyn-btn-secondary {
    background: rgba(255, 255, 255, 0.14);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.gyn-feedback {
    margin-top: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 1.15rem;
    display: none;
}

.gyn-feedback.show {
    display: block;
    margin-top: 0;
    margin-left: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    flex: 1 1 220px;
    align-self: center;
}

.gyn-feedback.ok {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #86efac;
}

.gyn-feedback.bad {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

/* Modal */
.gyn-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gyn-modal.gyn-hidden { display: none !important; }

.gyn-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.gyn-modal-box {
    position: relative;
    max-width: 420px;
    width: 100%;
    padding: 28px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.35);
    background: #1a1a22;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.gyn-modal-box--instructions {
    max-width: 520px;
}

.gyn-modal-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #f3f4f6;
    margin: 0 0 22px;
    line-height: 1.4;
}

.gyn-modal-ok {
    min-width: 140px;
    text-align: center;
}

.gyn-modal-text {
    margin: 0 0 18px;
    color: #d1d5db;
    font-size: 1.05rem;
    line-height: 1.5;
}

.gyn-instructions-body {
    text-align: left;
}

.gyn-instructions-list {
    margin: 0;
    padding-left: 1.25em;
    text-align: left;
}

.gyn-instructions-list li {
    margin-bottom: 0.5em;
}

.gyn-instructions-list li:last-child {
    margin-bottom: 0;
}

.gyn-intro-autostart {
    color: #fde68a;
}

.gyn-dont-show-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0 4px;
    text-align: left;
    color: #d1d5db;
    font-size: 0.98rem;
    line-height: 1.45;
    cursor: pointer;
}

.gyn-dont-show-label input {
    margin-top: 4px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#gynGame.gyn-game-blocked {
    display: none !important;
}

/* Vote Token bonus (same as Game 2): toast + fly to header */
.vtb-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 18vh 16px 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.vtb-overlay.vtb-visible {
    opacity: 1;
}

.vtb-overlay.vtb-leaving {
    opacity: 0;
}

.vtb-card {
    pointer-events: none;
    max-width: 420px;
    width: 100%;
    text-align: center;
    padding: 22px 26px 24px;
    border-radius: 18px;
    border: 1px solid rgba(250, 204, 21, 0.55);
    background: linear-gradient(155deg, rgba(30, 27, 18, 0.97) 0%, rgba(22, 24, 38, 0.98) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 20px 50px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(250, 204, 21, 0.22);
    transform: scale(0.82) translateY(12px);
    opacity: 0;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s ease;
}

.vtb-overlay.vtb-visible .vtb-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.vtb-overlay.vtb-leaving .vtb-card {
    transform: scale(0.96) translateY(-10px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.35s ease;
}

.vtb-token-line {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.85rem, 4.5vw, 2.35rem);
    letter-spacing: 0.06em;
    color: #fef08a;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.45);
    margin: 0 0 10px;
    line-height: 1.15;
}

.vtb-subline {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.1rem, 2.8vw, 1.35rem);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #c7f9cc;
    margin: 0;
    line-height: 1.35;
    animation: vtb-sub-pulse 1.1s ease-in-out infinite;
}

@keyframes vtb-sub-pulse {
    0%, 100% { opacity: 0.88; }
    50% { opacity: 1; }
}

.vtb-fly {
    position: fixed;
    z-index: 99999;
    margin: 0;
    border-radius: 50%;
    pointer-events: none;
    box-sizing: border-box;
    background: radial-gradient(circle at 32% 28%, #fffef0 0%, #fde047 38%, #eab308 72%, #a16207 100%);
    box-shadow:
        0 0 14px rgba(253, 224, 71, 1),
        0 0 32px rgba(234, 179, 8, 0.75),
        0 0 48px rgba(202, 138, 4, 0.45);
}

.g2-balance.vtb-balance-glow,
.gyn-balance.vtb-balance-glow,
.tok-balance.vtb-balance-glow {
    border-radius: 14px;
    outline: 2px solid rgba(250, 204, 21, 0.85);
    outline-offset: 4px;
    box-shadow: 0 0 28px rgba(253, 224, 71, 0.55), 0 0 48px rgba(234, 179, 8, 0.35);
    transition: box-shadow 0.2s ease, outline 0.2s ease;
}

#g2VoteTokens.vtb-token-counter-hit,
#gynVoteTokenBalance.vtb-token-counter-hit,
#tokVoteTokenBalance.vtb-token-counter-hit,
[data-bbg-vote-tokens].vtb-token-counter-hit {
    display: inline-block;
    animation: vtb-counter-bump 0.95s ease-out;
}

@keyframes vtb-counter-bump {
    0% {
        transform: scale(1);
        color: inherit;
        text-shadow: none;
    }
    35% {
        transform: scale(1.55);
        color: #fef08a;
        text-shadow: 0 0 18px rgba(250, 204, 21, 0.95), 0 0 36px rgba(234, 179, 8, 0.65);
    }
    100% {
        transform: scale(1);
        color: inherit;
        text-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #g2VoteTokens.vtb-token-counter-hit,
    #gynVoteTokenBalance.vtb-token-counter-hit,
    #tokVoteTokenBalance.vtb-token-counter-hit,
    [data-bbg-vote-tokens].vtb-token-counter-hit {
        animation: none;
    }
}
