body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    color: white;
    margin: 0;
    padding: 0;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 400px;
    margin: auto;
    padding: 10px;
}

.app-header {
    display: grid;
    grid-template-columns: minmax(58px, 0.75fr) minmax(130px, 1.7fr) minmax(44px, 0.75fr);
    grid-template-rows: 32px 28px;
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 6px;
}

.header-left {
    grid-column: 1;
    grid-row: 1 / 3;
    display: grid;
    grid-template-rows: 32px 28px;
    align-items: center;
    min-width: 0;
}

.app-logo {
    display: block;
    width: auto;
    height: 30px;
    object-fit: contain;
}

.login-status {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin-top: 5px;
    color: #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    text-align: left;
}

.status-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.status-dot.is-online {
    background: #22c55e;
}

.status-dot.is-offline {
    background: #ef4444;
    margin-left: 15px;
}

.status-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.app-title {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 10px;
    color: white;
    font-family: "Lobster", sans-serif;
    font-size: clamp(1.85rem, 8vw, 2.45rem);
    font-weight: 400;
    font-style: normal;
    line-height: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.header-actions {
    grid-column: 3;
    grid-row: 1 / 3;
    display: grid;
    grid-template-rows: 32px 28px;
    align-items: center;
    justify-items: end;
    gap: 4px;
}

.header-actions button {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

@media (max-width: 500px) {
    .container {
        max-width: 100%;
        padding: 8px;
    }
}

.daily-challenge-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 8px 0;
    padding: 5px 0;
    white-space: nowrap;
    color: white;
    font-family: "Courgette", cursive;
    font-weight: 700;
    font-style: normal;
    line-height: 3.1;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.daily-challenge-line h2 {
    margin: 0;
    font-size: 1.5em;
}

.daily-challenge-line p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.1;
}

#prizesBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 7px 8px;
    border-radius: 5px;
    background: #1e293b;
    font-size: inherit;
    line-height: 1.15;
}

#prizesBtn:hover {
    background: #27364d;
}

.stats-line {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 7px 0;
    font-size: 1em;
    /* font-size: 1.2em; */
    text-align: center;
}

.stats-line > span {
    background: #1e293b;
    padding: 8px 12px;
    border-radius: 8px;
    color: white;
}

.communication-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4cm;
    margin: 10px 0;
    padding: 0 14px;
    border: 1px solid #2d3748;
    border-radius: 10px;
    background: #1e293b;
    color: white;
    font-size: 1.1em;
}

#leaderboard {
    width: 100%;
    margin-top: 20px;
    text-align: center;
}

#leaderboard h3 {
    margin-bottom: 15px;
    color: white;
}

#leaderboard-list {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 20px;
    border-radius: 10px;
    background: #1e293b;
    text-align: left;
}

#leaderboard-weekly {
    width: 100%;
    margin-top: 20px;
    text-align: center;
}

#leaderboard-weekly h3 {
    margin-bottom: 15px;
    color: white;
}

#leaderboard-weekly-list {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 20px;
    border-radius: 10px;
    background: #1e293b;
    text-align: left;
}

@media (max-width: 380px) {
    .stats-line {
        gap: 6px;
        font-size: 1em;
    }

    .stats-line > span {
        padding: 7px 8px;
    }
}

/* 🖼️ IMAGEM */
.image-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 280px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
}

#gameImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* 🟦 BLUR ZONE */
#blurZone {
    position: absolute;
    overflow: hidden;
    border-radius: 8px;
    pointer-events: none;
}

#blurZone img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
}

/* 💬 FEEDBACK - BOTTOM DA IMAGEM */
#feedback {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);

    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    pointer-events: none;
    z-index: 10;

    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

#feedback.success {
    background: rgba(34, 197, 94, 0.9);
}

#feedback.error {
    background: rgba(239, 68, 68, 0.9);
}

#feedback.info {
    background: rgba(59, 130, 246, 0.9);
}

/* ⏱️ TIMER OVERLAY */
#timer-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    z-index: 5;
}

/* 🔝 STATS PANEL */
.stats-panel {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    gap: 10px;
}

.stat-block {
    flex: 1;
    background: #1e293b;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-emoji {
    font-size: 24px;
    margin-bottom: 4px;
}

.stat-title {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #f8fafc;
}

/* ℹ️ INFO BUTTON */
#infoBtn,
#profileBtn {
    background: #334155;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    color: #fde68a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#infoBtn {
    font-weight: 900;
    font-size: 20px;
}

.profile-icon {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
}

.profile-icon::before,
.profile-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #fde68a;
}

.profile-icon::before {
    top: 1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.profile-icon::after {
    bottom: 1px;
    width: 16px;
    height: 8px;
    border-radius: 999px 999px 5px 5px;
}

#infoBtn:hover,
#profileBtn:hover {
    background: #475569;
}

/* 🔘 BOTÕES */
button {
    display: block;
    width: 100%;
    margin: 10px auto;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    background: #334155;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #475569;
}

button:disabled {
    background: #1e293b;
    opacity: 0.5;
    cursor: not-allowed;
}

#resumeBtn {
    background: #22c55e;
}

#resumeBtn:hover {
    background: #16a34a;
}

#revealBtn {
    background: #3b82f6;
}

#revealBtn:hover {
    background: #2563eb;
}

#skipBtn {
    background: #f59e0b;
}

#skipBtn:hover {
    background: #d97706;
}

#exitBtn {
    opacity: 0.6;
}

/* 📋 OPÇÕES */
#options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 15px;
    margin-bottom: 15px;
}

#options .option-btn {
    display: block;
    width: calc(50% - 5px);
    margin: 0;
}

/* 🎛️ ACTION BUTTONS */
#action-buttons {
    display: flex;
    gap: 10px;
    margin: 15px auto;
}

#action-buttons button {
    flex: 1;
    margin: 0;
    padding: 12px;
    font-size: 14px;
}

/* 📊 TOP BAR */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-weight: bold;
}

.top-bar .left {
    font-size: 22px;
    color: #ff3b3b;
}

.top-bar .center {
    font-size: 18px;
    text-align: center;
    flex: 1;
}

.top-bar .right {
    font-size: 14px;
    display: flex;
    gap: 10px;
}

/* 💰 COINS (removido fixed) */

#coinFly {
    position: fixed;
    top: 50%;
    left: 50%;
    font-size: 24px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.6s ease;
}

/* 🎆 CONFETTI */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s;
    z-index:11;
}

/* 🎭 OVERLAY (MODAL) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9;
}

.box {
    background: white;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    color: #222;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}


/* ✨ TROPHY WIN ANIMATION */
.win-flash {
    position: relative;
    overflow: hidden; /* necessário pro shimmer */
}

@keyframes trophy-shimmer {
    0%   { transform: translateX(-150%) skewX(-20deg); opacity: 0; }
    30%  { opacity: 1; }
    100% { transform: translateX(250%) skewX(-20deg); opacity: 0; }
}

@keyframes trophy-pulse {
    0%   { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
    30%  { box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.5), 0 0 20px rgba(250, 204, 21, 0.3); }
    100% { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
}

@keyframes trophy-bounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25%       { transform: scale(1.4) rotate(-8deg); }
    50%       { transform: scale(1.3) rotate(8deg); }
    75%       { transform: scale(1.2) rotate(-4deg); }
}

.win-flash {
    animation: trophy-pulse 0.7s ease-out forwards, trophy-bounce 0.5s ease-out forwards;
}

/* a faixa de luz — pseudo-elemento no bloco do troféu */
.win-flash::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 60px;
    height: 300%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    animation: trophy-shimmer 0.45s ease-in-out forwards,
               trophy-shimmer 0.45s ease-in-out 0.5s forwards; /* 2ª passada */
}

/* emoji quicando */
.win-flash .stat-emoji {
    animation: trophy-bounce 0.5s ease-out forwards;
}
