@font-face {
    font-family: 'Russo One';
    src: url('assets/RussoOne-Regular.ttf') format('truetype');
}

@keyframes green-flash {
  0%   { box-shadow: none; }
  50%  { box-shadow: 0 0 70px 40px #00FFD1, inset 0 0 70px 40px rgba(0, 255, 209, 0.5); }
  100% { box-shadow: none; }
}

@keyframes flash-green-bg {
  0% { background-color: rgba(0, 255, 209, 0.6); }
  50% { background-color: transparent; }
  100% { background-color: rgba(0, 255, 209, 0.6); }
}

@keyframes flicker-animation {
  0%   { border-color: #00FFD1; box-shadow: none; }
  50%  { border-color: #00BFFF; box-shadow: 0 0 15px rgba(0, 191, 255, 0.5); }
  100% { border-color: #00FFD1; box-shadow: none; }
}

html, body {
    width: 100%; height: 100%;
    margin: 0; padding: 0;
    overflow: hidden;
}

body {
    font-family: 'Russo One', sans-serif;
    background-color: #1a1a1a;
    color: white;
    background-image: url('assets/background.png');
    display: flex;
    justify-content: center;
    align-items: center;
}

#app-container {
    position: relative;
    width: 1080px;
    height: 1920px;
    background: #222;
    overflow: hidden;
    transform-origin: center center;
    border: 5px solid #FF007A;
    flex-shrink: 0;
}

#app-container.flash-correct {
    animation: green-flash 0.8s ease-out;
}

.screen {
    position: absolute; width: 100%; height: 100%;
    top: 0; left: 0;
    display: none;
    flex-direction: column; 
    align-items: center;
}
.screen.active { display: flex; }
.screen-bg, #track-image { width: 100%; height: 100%; object-fit: contain; }

/* --- UNIVERSAL BUTTON STYLE --- */
.main-action-button {
    position: absolute;
    width: 600px;
    padding: 15px 0;
    background-color: rgba(0, 0, 0, 0.2);
    border: 5px solid rgba(0, 191, 255, 0.5);
    color: white;
    font-family: 'Russo One', sans-serif;
    font-size: 70px;
    cursor: pointer;
    text-shadow: 4px 4px 8px #000;
    text-align: center;
    transition: all 0.2s ease-out;
    left: 50%;
    transform: translateX(-50%);
}

.main-action-button:active {
    background-color: rgba(0, 191, 255, 0.5);
    transform: translateX(-50%) scale(0.98); 
}

/* --- BUTTON POSITIONING --- */
#start-button { top: 1590px; }
#scoreboard-button { top: 1400px; }
#main-menu-button { top: 1590px; } 
#go-back-button { top: 1590px; }   

/* Social Media Links */
.social-link { position: absolute; top: 1750px; width: 120px; height: 120px; cursor: pointer; }
#youtube-link { left: 70px; }
#instagram-link { right: 70px; }

/* --- GAME SCREEN UI --- */
#top-bar-info { 
    position: absolute; 
    top: 60px;
    left: 50px;  
    right: 50px;
    font-size: 72px; 
    display: block; 
}
#top-bar-info .info-item { 
    position: absolute; 
    display: grid; 
    gap: 20px; 
    color: white; 
    text-shadow: 4px 4px 8px #000; 
    width: auto;
    align-items: center;
}
#top-bar-info .info-label { 
    font-family: 'Russo One', sans-serif; 
    text-align: right; 
}
#top-bar-info .info-value { 
    font-family: Arial, Helvetica, sans-serif; 
    color: #00FFD1; 
    text-align: left; 
}
#score-info { 
    top: 0; 
    left: 0; 
    grid-template-columns: 270px auto; 
}
#time-info { 
    top: 0;
    right: 0;
    grid-template-columns: auto 100px; 
}
#time-info .info-value {
    text-align: left;
}

#hint-display { position: absolute; top: 1250px; width: 90%; min-height: 3em; display: none; justify-content: center; align-items: center; text-align: center; font-size: 60px; line-height: 1.2; color: #00FFD1; text-shadow: 4px 4px 8px #000; }
#hint-text { display: none; }
#hint-text.penalty { color: orange; }
#hint-display.no-hints { color: #FFA500; }
#hint-display.no-hints #hint-text { display: block; }

#hint-request-button {
    font-family: 'Russo One', sans-serif;
    font-size: 60px;
    padding: 10px 30px;
    cursor: pointer;
    border: 3px solid #00FFD1;
    background-color: rgba(0, 0, 0, 0.4);
    color: #00FFD1;
    text-shadow: 2px 2px 4px #000;
    margin-top: 5px;
    display: none;
}
#hint-request-button .penalty-text { color: orange; }
#hint-request-button.flicker { animation: flicker-animation 1.5s infinite; }
#hint-request-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

#choices-container { position: absolute; top: 1550px; left: 50%; transform: translateX(-50%); width: 1060px; height: 350px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; row-gap: 10px; column-gap: 10px; }
.choice-button { background: none; color: white; font-family: 'Russo One', sans-serif; font-size: 50px; cursor: pointer; display: flex; justify-content: center; align-items: center; text-align: center; padding: 5px; white-space: nowrap; transition: all 0.1s ease-out; border: 5px solid transparent; }

.choice-button:active { background-color: rgba(0, 191, 255, 0.6); box-shadow: 0 0 25px 5px rgba(0, 255, 209, 0.7); transform: scale(0.98); }
.choice-button.long-name { letter-spacing: -3px; }
.choice-button.correct { color: white; background-color: rgba(0, 255, 209, 0.6) !important; box-shadow: none !important; border-color: transparent !important; }
.choice-button.incorrect { color: #555; background-color: #888 !important; pointer-events: none; box-shadow: none !important; border-color: transparent !important; }
.choice-button.flashing-correct { color: white; animation: flash-green-bg 1s infinite ease-in-out; }

/* --- RESULTS & SCOREBOARD SCREENS --- */
#results-stats-box { position: absolute; top: 320px; width: 80%; font-size: 55px; line-height: 1.5; text-align: center; }
#results-stats-box p { margin: 10px 0; }
#results-stats-box span { color: #00FFD1; font-family: Arial, Helvetica, sans-serif; }
#results-stats-box .final-score { font-size: 1.2em; color: #00FFD1; margin-top: 40px;}
#results-stats-box .final-score span { color: #00FFD1;}

#player-name-input { 
    position: absolute;
    top: 1280px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 120px; 
    padding: 0 30px; 
    box-sizing: border-box;
    border: 5px solid rgba(0, 191, 255, 0.5);
    background: rgba(0,0,0,0.2); 
    color: white; 
    font-family: 'Russo One', sans-serif; 
    font-size: 60px; 
    text-align: center; 
}

#ok-button {
    position: absolute;
    top: 1440px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    padding: 10px 0;
    background-color: rgba(0, 0, 0, 0.2);
    border: 5px solid rgba(0, 191, 255, 0.5);
    color: white;
    font-family: 'Russo One', sans-serif;
    font-size: 60px;
    cursor: pointer;
    transition: all 0.2s ease-out;
}
#ok-button:active {
    background-color: rgba(0, 191, 255, 0.5);
    transform: translateX(-50%) scale(0.98);
}

#player-name-input:focus {
    outline: none;
}

#player-name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

#score-list { position: absolute; top: 480px; height: 960px; width: 860px; list-style: none; padding: 0 50px; box-sizing: border-box; margin: 0; overflow-y: auto; font-size: 64px; text-shadow: 3px 3px 6px #000;}
#score-list li { display: flex; justify-content: space-between; padding: 15px 10px; border-bottom: 4px solid rgba(255, 0, 122, 0.5); }
#score-list li:last-child { border-bottom: none; }
#score-list .name { color: #00FFD1; font-family: 'Russo One', sans-serif; text-align: left; }
#score-list .score { color: #00FFD1; text-align: right; font-family: Arial, Helvetica, sans-serif; }

/* --- HOVER EFFECTS (DESKTOP ONLY) --- */
.no-touch-device .main-action-button:hover, 
.no-touch-device #ok-button:hover,
.no-touch-device .choice-button:hover,
.no-touch-device #player-name-input:hover {
    border-color: #00BFFF;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
}