/* Faucet popup on /play. The markup and behaviour live in
   client_new/scripts/components/FaucetModal.js; /request renders play.html with
   the modal open, exactly like /vault, /support and /referral.

   The faucet cards themselves keep the .faucet-*, .info-alert, .claim-* and
   .stats-section rules from client_new/styles.css, which play.html already
   loads. Only the popup shell, the new rules grid and the reserved right-hand
   column live here. */

.faucet-modal {
    width: 95%;
    max-width: 1200px;
}

.faucet-modal-body {
    padding: 16px;
}

.faucet-modal * { box-sizing: border-box; }

.faucet-modal .info-alert {
    margin-bottom: 0;
}

/* The game stylesheet's reset sets `font: inherit` on strong, so the element
   loses its bold weight inside the popup. Restore it for the faucet copy. */
.faucet-modal strong {
    font-weight: 700;
}

.faucet-modal .faucet-dashboard {
    gap: 20px;
}

.faucet-modal .main-content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 0;
}

.faucet-modal .main-content-grid > .stats-section {
    min-width: 0;
}

/* While /request.json is in flight, keep the real dashboard mounted with only
   the card shells visible, and sweep the shared glance across it like the
   wallet popup. */
.faucet-loading {
    position: relative;
}

.faucet-loading.is-loading {
    overflow: hidden;
    pointer-events: none;
}

.faucet-loading.is-loading > *:not(.modal-skeleton-glance) {
    visibility: hidden;
}

.faucet-loading.is-loading .info-alert,
.faucet-loading.is-loading .stats-section {
    visibility: visible;
    position: relative;
    overflow: hidden;
}

.faucet-loading.is-loading .info-alert > *,
.faucet-loading.is-loading .stats-section > * {
    visibility: hidden;
}

/* Right column: the streak card occupies only the top part and the column
   stays otherwise free for the next panel. */
.faucet-modal .faucet-side-column {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
    align-self: start;
}

.faucet-modal .faucet-streak {
    padding: 16px;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-variant-numeric: tabular-nums;
}

.faucet-streak-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    margin-bottom: 12px;
}

.faucet-streak-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    min-width: 0;
}

.faucet-streak-flame i {
    color: #ff6b6b;
    font-size: 13px;
    text-shadow: 0 0 12px rgba(255, 107, 107, 0.35);
}

.faucet-streak-current {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.faucet-streak-sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    min-width: 0;
}

.faucet-streak-next {
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.faucet-streak.is-risk .faucet-streak-sub {
    color: #ff6b6b;
}

.faucet-streak-progress {
    margin-bottom: 12px;
}

.faucet-streak-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.faucet-streak-progress-label {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
    font-weight: 600;
}

.faucet-streak-progress-count {
    color: #00ffcc;
    font-size: 11px;
    font-weight: 700;
}

.faucet-streak-progress-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.faucet-streak-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #00d4aa, #00ffcc);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.35);
    transition: width 0.35s ease;
}

.faucet-streak-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

.faucet-streak-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
    padding: 6px 2px 5px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.faucet-streak-day-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 13px;
    margin-bottom: 1px;
    color: rgba(255, 255, 255, 0.32);
    font-size: 10px;
    line-height: 1;
}

.faucet-streak-day-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.faucet-streak-day-reward {
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.faucet-streak-day.is-claimed {
    background: linear-gradient(160deg, rgba(0, 212, 170, 0.25), rgba(0, 255, 204, 0.08));
    border-color: rgba(0, 212, 170, 0.45);
    box-shadow: 0 12px 32px rgb(0 255 204 / 0%), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.faucet-streak-day.is-claimed .faucet-streak-day-icon,
.faucet-streak-day.is-claimed .faucet-streak-day-label,
.faucet-streak-day.is-claimed .faucet-streak-day-reward {
    color: #00ffcc;
}

.faucet-streak-day.is-active {
    background: rgba(0, 255, 204, 0.08);
    border-color: #00ffcc;
    box-shadow: 0 0 0 1px rgba(0, 255, 204, 0.3),
        0 0 16px rgba(0, 255, 204, 0.18);
}

.faucet-streak-day.is-active .faucet-streak-day-icon,
.faucet-streak-day.is-active .faucet-streak-day-label {
    color: #00ffcc;
}

.faucet-streak-day.is-mystery {
    background: linear-gradient(160deg, rgba(0, 255, 204, 0.14), rgba(0, 212, 170, 0.04));
    border-color: rgba(0, 255, 204, 0.3);
    box-shadow: 0 12px 32px rgb(0 255 204 / 0%), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.faucet-streak-day.is-mystery .faucet-streak-day-icon {
    color: #00ffcc;
}

.faucet-streak-day.is-mystery .faucet-streak-day-reward {
    color: #00ffcc;
    font-size: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.35);
}

.faucet-streak-day.is-mystery.is-claimed {
    background: linear-gradient(160deg, rgba(0, 255, 204, 0.32), rgba(0, 212, 170, 0.14));
}

.faucet-streak-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    border-radius: 11px;
    color: #04110e;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(145deg, #00a594, #00d4aa);
    box-shadow: 0 12px 32px rgb(0 255 204 / 0%), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.faucet-streak-btn.is-mystery {
    background: linear-gradient(145deg, #00ffcc, #4ecdc4 55%, #00d4aa);
}

.faucet-streak-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 255, 204, 0.32);
}

.faucet-streak-btn.is-disabled,
.faucet-streak-btn:disabled {
    cursor: default;
    color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(145deg, rgba(107, 114, 128, 0.3), rgba(107, 114, 128, 0.2));
    box-shadow: none;
}

.faucet-streak-result,
.faucet-streak-error {
    margin-top: 10px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.faucet-streak-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #00ffcc;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.25);
    animation: faucetStreakPop 0.35s ease;
}

.faucet-streak-result.is-mystery {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.3);
    animation: faucetMysteryPop 0.55s ease;
}

.faucet-streak-error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.25);
}

@keyframes faucetStreakPop {
    0% { opacity: 0; transform: translateY(4px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes faucetMysteryPop {
    0% { opacity: 0; transform: scale(0.85); }
    55% { opacity: 1; transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
}

/* Error state */
.faucet-state {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faucet-state-text {
    color: #9a9aa2;
    font-size: 14px;
    text-align: center;
}

.faucet-state-text.is-error {
    color: #ff6b6b;
}

/* Faucet Rules & Guidelines cards, moved from the old page's inline styles. */
.faucet-rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.faucet-rule-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faucet-rule-title {
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faucet-rule-icon i {
    background: linear-gradient(267deg, #00ffcc 0%, #00d4aa 25%, #4ecdc4 50%, #00ffcc 75%, #00d4aa 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographicShift 3s ease-in-out infinite;
    position: relative;
}

.faucet-rule-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 900px) {
    .faucet-modal .main-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .faucet-modal-body {
        padding: 10px;
    }

    .faucet-modal .stats-section {
        padding: 18px;
    }

    .faucet-modal .faucet-streak {
        padding: 14px;
    }

    .faucet-streak-title {
        font-size: 13px;
    }

    .faucet-streak-current {
        font-size: 12px;
    }

    .faucet-streak-sub,
    .faucet-streak-next {
        font-size: 10px;
    }

    .faucet-streak-days {
        gap: 4px;
    }

    .faucet-streak-day {
        padding: 5px 1px 4px;
    }

    .faucet-streak-day-icon {
        height: 12px;
        font-size: 9px;
    }

    .faucet-streak-day-label {
        font-size: 8px;
    }

    .faucet-streak-day-reward {
        font-size: 9px;
    }

    .faucet-streak-btn {
        font-size: 13px;
    }

    .faucet-rule-grid {
        grid-template-columns: 1fr;
    }
}

/* Faucet notices sit below the navbar, matching the deposit banners. */
#security-message-container.faucet-toast {
    top: 53px;
}
