/* ================================================
   LAME THAT FOGO — SILLY GAME STYLES
   ================================================ */

/* === RESET & BASE === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink: #FF69B4;
    --blue: #00D4FF;
    --lime: #39FF14;
    --yellow: #FFD700;
    --purple: #7B2FBE;
    --orange: #FF6B35;
    --bg-dark: #1a0533;
    --bg-card: rgba(255, 255, 255, 0.08);
    --text-light: #fff;
    --correct: #39FF14;
    --wrong: #FF4757;
    --btn-1: #FF69B4;
    --btn-2: #00D4FF;
    --btn-3: #FFD700;
    --btn-4: #39FF14;
    --radius: 20px;
    --radius-lg: 30px;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Bubblegum Sans', 'Outfit', cursive, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2d0b4e 30%, #1a0533 60%, #0d021a 100%);
    color: var(--text-light);
}

/* === SCREENS === */
.screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: scale(0.95);
    z-index: 1;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* === START SCREEN === */
.start-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.game-title {
    font-size: clamp(3rem, 10vw, 7rem);
    line-height: 1.1;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
}

.title-word {
    display: inline-block;
    animation: titleBounce 0.8s ease infinite alternate;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 105, 180, 0.5);
}

.word-1 {
    color: var(--pink);
    animation-delay: 0s;
}

.word-2 {
    color: var(--blue);
    animation-delay: 0.15s;
}

.word-3 {
    color: var(--yellow);
    animation-delay: 0.3s;
}

@keyframes titleBounce {
    0% {
        transform: translateY(0) rotate(-2deg);
    }

    100% {
        transform: translateY(-15px) rotate(2deg);
    }
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    opacity: 0.85;
    margin-bottom: 20px;
    animation: subtitleWiggle 2s ease infinite;
}

@keyframes subtitleWiggle {

    0%,
    100% {
        transform: rotate(-1deg);
    }

    50% {
        transform: rotate(1deg);
    }
}

.start-logo-parade {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.parade-emoji {
    animation: paradeJump 1.5s ease infinite;
    display: inline-block;
}

.parade-emoji:nth-child(1) {
    animation-delay: 0s;
}

.parade-emoji:nth-child(2) {
    animation-delay: 0.2s;
}

.parade-emoji:nth-child(3) {
    animation-delay: 0.4s;
}

.parade-emoji:nth-child(4) {
    animation-delay: 0.6s;
}

.parade-emoji:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes paradeJump {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    30% {
        transform: translateY(-20px) scale(1.2);
    }

    50% {
        transform: translateY(-5px) scale(1);
    }
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 50px;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-family: inherit;
    color: #1a0533;
    background: linear-gradient(135deg, var(--yellow), var(--orange));
    border: 4px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5), 0 0 60px rgba(255, 215, 0, 0.3);
    animation: playPulse 1.5s ease infinite;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-play:hover {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.7), 0 0 80px rgba(255, 215, 0, 0.5);
}

.btn-play:active {
    transform: scale(0.95);
}

@keyframes playPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.btn-emoji {
    font-size: 1.8rem;
    display: inline-block;
    animation: rocketWiggle 0.5s ease infinite alternate;
}

@keyframes rocketWiggle {
    0% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(10deg);
    }
}

.start-hint {
    margin-top: 20px;
    font-size: 1rem;
    opacity: 0.5;
    font-family: 'Outfit', sans-serif;
}

.start-credit {
    margin-top: 12px;
    font-size: 1.15rem;
    opacity: 0.75;
    color: var(--pink);
    font-family: 'Bubblegum Sans', cursive;
    letter-spacing: 1px;
}

/* Floating shapes */
.floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    font-size: 2rem;
    opacity: 0.15;
    animation: floatAround 10s linear infinite;
}

.shape-1 {
    top: 10%;
    left: 5%;
    animation-duration: 12s;
    font-size: 3rem;
}

.shape-2 {
    top: 20%;
    right: 10%;
    animation-duration: 15s;
    animation-delay: -3s;
}

.shape-3 {
    top: 50%;
    left: 8%;
    animation-duration: 18s;
    animation-delay: -6s;
}

.shape-4 {
    top: 70%;
    right: 15%;
    animation-duration: 11s;
    animation-delay: -2s;
    font-size: 2.5rem;
}

.shape-5 {
    top: 85%;
    left: 20%;
    animation-duration: 14s;
    animation-delay: -5s;
}

.shape-6 {
    top: 30%;
    right: 5%;
    animation-duration: 16s;
    animation-delay: -8s;
    font-size: 2.5rem;
}

.shape-7 {
    top: 60%;
    left: 85%;
    animation-duration: 13s;
    animation-delay: -4s;
}

.shape-8 {
    top: 5%;
    left: 50%;
    animation-duration: 17s;
    animation-delay: -7s;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(30px, -40px) rotate(90deg) scale(1.1);
    }

    50% {
        transform: translate(-20px, -80px) rotate(180deg) scale(0.9);
    }

    75% {
        transform: translate(40px, -40px) rotate(270deg) scale(1.05);
    }

    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

/* === GAME SCREEN === */
#game-screen {
    justify-content: flex-start;
    padding: 12px 15px;
    gap: 6px;
}

/* HUD */
.hud {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 700px;
    flex-shrink: 0;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: var(--radius);
    border: 2px solid rgba(255, 255, 255, 0.1);
    min-width: 75px;
    flex: 1;
}

.hud-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 1px;
    font-family: 'Outfit', sans-serif;
}

.hud-value {
    font-size: 1.3rem;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.hud-value.bump {
    animation: scoreBump 0.4s ease;
}

@keyframes scoreBump {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.5);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.hud-score .hud-value {
    color: var(--yellow);
}

.hud-streak .hud-value {
    color: var(--orange);
}

.streak-fire {
    display: inline-block;
    animation: fireJiggle 0.3s ease infinite alternate;
    opacity: 0;
    transition: opacity 0.3s;
}

.streak-fire.visible {
    opacity: 1;
}

@keyframes fireJiggle {
    0% {
        transform: rotate(-10deg) scale(1);
    }

    100% {
        transform: rotate(10deg) scale(1.15);
    }
}

.difficulty-badge {
    font-size: 0.9rem !important;
    padding: 2px 8px;
    border-radius: 10px;
}

.difficulty-badge.easy {
    color: var(--lime);
}

.difficulty-badge.medium {
    color: var(--yellow);
}

.difficulty-badge.hard {
    color: var(--orange);
}

.difficulty-badge.expert {
    color: var(--pink);
}

.difficulty-badge.insane {
    color: #FF4757;
    text-shadow: 0 0 10px #FF4757;
}

/* === LIVES DISPLAY === */
.lives-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.lives-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.7;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.lives-hearts {
    display: flex;
    gap: 6px;
}

.heart-icon {
    font-size: 1.6rem;
    display: inline-block;
    transition: all 0.4s ease;
    filter: none;
}

.heart-icon.lost {
    animation: heartBreak 0.6s ease forwards;
}

@keyframes heartBreak {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: none;
    }

    30% {
        transform: scale(1.4) rotate(15deg);
        opacity: 1;
    }

    60% {
        transform: scale(0.6) rotate(-10deg);
        opacity: 0.5;
        filter: grayscale(1);
    }

    100% {
        transform: scale(0.8);
        opacity: 0.25;
        filter: grayscale(1);
    }
}

.heart-icon.lost-final {
    font-size: 1.6rem;
    opacity: 0.25;
    filter: grayscale(1);
}

/* Streak Progress */
.streak-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.streak-dots {
    display: flex;
    gap: 8px;
}

.streak-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.streak-dot.filled {
    background: var(--lime);
    border-color: var(--lime);
    box-shadow: 0 0 15px var(--lime);
    animation: dotPop 0.4s ease;
}

@keyframes dotPop {
    0% {
        transform: scale(0.5);
    }

    60% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

.streak-label {
    font-size: 0.7rem;
    opacity: 0.5;
    font-family: 'Outfit', sans-serif;
}

/* === LOGO CONTAINER (made larger) === */
.logo-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    position: relative;
    min-height: 0;
}

.logo-wrapper {
    width: clamp(220px, 55vmin, 380px);
    height: clamp(220px, 55vmin, 380px);
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(123, 47, 190, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    animation: logoWobble 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
}

@keyframes logoWobble {

    0%,
    100% {
        transform: rotate(-1deg) scale(1);
    }

    25% {
        transform: rotate(0.5deg) scale(1.02);
    }

    50% {
        transform: rotate(1deg) scale(1);
    }

    75% {
        transform: rotate(-0.5deg) scale(1.01);
    }
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 1;
    /* Force logos to fill space */
    min-width: 120px;
    min-height: 120px;
}

.logo-img.hidden {
    opacity: 0;
}

.logo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.logo-placeholder.visible {
    opacity: 1;
}

.logo-placeholder p {
    font-size: 1rem;
    margin-top: 5px;
}

/* === BONUS KID GIF === */
.bonus-kid {
    position: absolute;
    bottom: -20px;
    right: -30px;
    z-index: 3;
    width: clamp(100px, 25vmin, 180px);
    height: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%) scale(0.5);
    transition: none;
}

.bonus-kid.show {
    opacity: 1;
    animation: kidPeekBounce 2.8s ease forwards;
}

@keyframes kidPeekBounce {
    0% {
        transform: translateY(100%) scale(0.5) rotate(10deg);
        opacity: 0;
    }

    15% {
        transform: translateY(10%) scale(1.1) rotate(-5deg);
        opacity: 1;
    }

    25% {
        transform: translateY(0%) scale(1) rotate(3deg);
        opacity: 1;
    }

    35% {
        transform: translateY(-15%) scale(1.05) rotate(-3deg);
        opacity: 1;
    }

    45% {
        transform: translateY(0%) scale(1) rotate(2deg);
        opacity: 1;
    }

    55% {
        transform: translateY(-8%) scale(1.02) rotate(-1deg);
        opacity: 1;
    }

    70% {
        transform: translateY(0%) scale(1) rotate(0deg);
        opacity: 1;
    }

    85% {
        transform: translateY(0%) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100%) scale(0.5) rotate(10deg);
        opacity: 0;
    }
}

.bonus-kid-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Feedback Overlay */
.feedback-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
}

.feedback-overlay.show {
    opacity: 1;
    animation: feedbackPop 0.6s ease;
}

@keyframes feedbackPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.feedback-emoji {
    font-size: 4rem;
}

.feedback-text {
    font-size: 1.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.feedback-points {
    font-size: 1.2rem;
    font-weight: 700;
}

.feedback-overlay.correct .feedback-text {
    color: var(--correct);
}

.feedback-overlay.correct .feedback-points {
    color: var(--correct);
}

.feedback-overlay.wrong .feedback-text {
    color: var(--wrong);
}

.feedback-overlay.wrong .feedback-points {
    color: var(--wrong);
}

/* Answer Buttons */
.answers-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 700px;
    flex-shrink: 0;
    padding-bottom: 10px;
}

.answer-btn {
    padding: 14px 12px;
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #1a0533;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    line-height: 1.2;
    min-height: 55px;
}

.answer-btn:nth-child(1) {
    background: linear-gradient(135deg, #FF69B4, #FF1493);
}

.answer-btn:nth-child(2) {
    background: linear-gradient(135deg, #00D4FF, #0099CC);
}

.answer-btn:nth-child(3) {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.answer-btn:nth-child(4) {
    background: linear-gradient(135deg, #39FF14, #00CC00);
}

.answer-btn:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.answer-btn:active {
    transform: scale(0.95);
}

.answer-btn.correct {
    animation: correctPulse 0.6s ease;
    border-color: var(--correct);
    box-shadow: 0 0 30px var(--correct);
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.answer-btn.wrong {
    animation: wrongShake 0.5s ease;
    border-color: var(--wrong);
    opacity: 0.7;
}

@keyframes wrongShake {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-15px) rotate(-3deg);
    }

    30% {
        transform: translateX(12px) rotate(3deg);
    }

    45% {
        transform: translateX(-10px) rotate(-2deg);
    }

    60% {
        transform: translateX(8px) rotate(1deg);
    }

    75% {
        transform: translateX(-5px);
    }
}

.answer-btn.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.answer-btn.reveal-correct {
    border-color: var(--correct) !important;
    box-shadow: 0 0 30px var(--correct) !important;
    opacity: 1 !important;
    animation: revealBounce 0.5s ease;
}

@keyframes revealBounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* === GAME OVER SCREEN === */
.gameover-content {
    text-align: center;
    z-index: 2;
}

.gameover-title {
    font-size: clamp(3rem, 8vw, 5rem);
    background: linear-gradient(135deg, var(--pink), var(--yellow), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleBounce 1s ease infinite alternate;
    margin-bottom: 10px;
}

.gameover-emoji {
    font-size: 5rem;
    animation: paradeJump 1.5s ease infinite;
    margin-bottom: 20px;
}

.gameover-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto 30px;
}

.stat-item {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: var(--radius);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.6;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--yellow);
}

/* === FIREWORKS === */
.fireworks-canvas {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.fireworks-canvas.active {
    opacity: 1;
}

.bonus-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 101;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--yellow);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5), 0 0 40px var(--yellow);
    pointer-events: none;
    opacity: 0;
    transition: none;
}

.bonus-text.show {
    opacity: 1;
    animation: bonusPopIn 2.5s ease forwards;
}

@keyframes bonusPopIn {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-20deg);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -50%) scale(1.4) rotate(5deg);
        opacity: 1;
    }

    40% {
        transform: translate(-50%, -50%) scale(1) rotate(-2deg);
        opacity: 1;
    }

    80% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.5) rotate(10deg);
        opacity: 0;
    }
}

/* === NEW ROUND ANIMATION === */
.logo-wrapper.entering {
    animation: logoEnter 0.5s ease;
}

@keyframes logoEnter {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.15) rotate(3deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(-1deg);
        opacity: 1;
    }
}

/* === RESPONSIVE === */
@media (max-width: 500px) {
    .hud {
        gap: 6px;
    }

    .hud-item {
        padding: 5px 6px;
        min-width: 55px;
    }

    .hud-value {
        font-size: 1.1rem;
    }

    .answers-container {
        gap: 8px;
    }

    .answer-btn {
        padding: 12px 8px;
        font-size: 0.85rem;
        min-height: 50px;
    }

    .logo-wrapper {
        padding: 18px;
    }

    .heart-icon {
        font-size: 1.3rem;
    }
}

@media (max-height: 700px) {
    #game-screen {
        gap: 4px;
        padding: 8px 12px;
    }

    .streak-progress {
        display: none;
    }

    .logo-wrapper {
        width: clamp(180px, 40vmin, 280px);
        height: clamp(180px, 40vmin, 280px);
        padding: 18px;
    }

    .hud-item {
        padding: 4px 10px;
    }

    .heart-icon {
        font-size: 1.3rem;
    }
}