/* ========== Daily Page ========== */
.daily-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 24px 48px;
    gap: 24px;
    position: relative;
}

.daily-page:has(.daily-card) {
    justify-content: center;
    min-height: 80vh;
}

.daily-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 20%, var(--accent-soft) 0%, transparent 60%);
    pointer-events: none;
}

/* ========== Login gate ========== */
.daily-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    position: relative;
}

.daily-gate h1 {
    font-family: 'Righteous', cursive;
    font-size: 2rem;
    color: var(--text);
}

.daily-gate p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    max-width: 300px;
}

.daily-gate-iris {
    width: 64px;
    height: 64px;
    opacity: 0.5;
    filter: grayscale(0.3);
}

.daily-login-btn {
    padding: 12px 32px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
    margin-top: 8px;
}

.daily-login-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* ========== Main card ========== */
.daily-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 32px;
    border-radius: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.daily-card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* ========== Streak ========== */
.daily-streak-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.daily-streak-fire {
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.daily-streak-fire.active {
    opacity: 1;
}

.daily-streak-num {
    font-family: 'Righteous', cursive;
    font-size: 3rem;
    color: var(--text);
    line-height: 1;
    transition: transform 0.3s ease;
}

.daily-streak-num.bump {
    animation: dly-bump 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dly-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.daily-streak-text {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

/* ========== Week tracker ========== */
.daily-week {
    display: flex;
    gap: 12px;
}

.daily-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.daily-day-label {
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.daily-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.daily-dot.filled {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.daily-dot.today {
    transform: scale(1.25);
    border-color: var(--accent);
}

.daily-dot.today.filled {
    animation: dly-dot-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dly-dot-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.6); }
    100% { transform: scale(1.25); }
}

/* ========== Divider ========== */
.daily-divider {
    width: 60%;
    height: 1px;
    background: var(--border);
}

/* ========== Center (coin + button) ========== */
.daily-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.daily-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.daily-coin-glow {
    display: none;
}

.daily-coin {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: default;
    transition: transform 0.3s ease;
}

.daily-coin-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.5s ease;
    user-select: none;
}

.daily-coin.spinning {
    animation: dly-spin 0.5s linear infinite;
}

.daily-coin.spinning .daily-coin-img {
    filter: hue-rotate(40deg) saturate(2) brightness(1.3);
    opacity: 1;
}

.daily-coin.spin-down {
    animation: dly-spin-down 1s cubic-bezier(0.2, 0, 0.1, 1) forwards;
}

@keyframes dly-spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

@keyframes dly-spin-down {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(540deg) scale(1.08); }
    100% { transform: rotateY(720deg) scale(1.12); }
}

.daily-coin.claimed .daily-coin-img {
    filter: hue-rotate(90deg) saturate(1.5) brightness(1.2);
}

/* ========== Claim button ========== */
.daily-claim-btn {
    padding: 12px 48px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.15s ease, transform 0.1s ease, opacity 0.2s ease;
}

.daily-claim-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.daily-claim-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.daily-claim-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.daily-claim-btn.success {
    background: #16a34a;
    opacity: 1;
}

/* ========== Result area ========== */
.daily-result-area {
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.dly-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.dly-amount-plus {
    font-size: 1.5rem;
    color: #22c55e;
    font-weight: 700;
}

.dly-amount-num {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    color: #22c55e;
    line-height: 1;
}

.dly-amount-unit {
    font-size: 0.875rem;
    color: #22c55e;
    font-weight: 600;
    margin-left: 4px;
}

.dly-multiplier {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 197, 24, 0.12);
    color: #ffc518;
    vertical-align: middle;
}

.dly-multiplier-streak {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    animation: dly-streak-pulse 0.6s ease;
}

@keyframes dly-streak-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Captcha */
.captcha-wrap {
    display: none;
    justify-content: center;
    margin-bottom: 8px;
    transform: scale(0.85);
    transform-origin: center;
}

.captcha-wrap.visible,
.rep-page-card .captcha-wrap {
    display: flex;
}

/* Rep page */
.rep-page-card {
    max-width: 340px;
    padding: 28px 24px;
}

.rep-target-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rep-target-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.rep-target-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.rep-target-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.rep-target-num {
    font-family: 'Righteous', cursive;
    font-size: 2.25rem;
    color: #ffc518;
    line-height: 1;
}

.rep-target-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
}

.rep-target-price {
    font-size: 0.6875rem;
    color: #22c55e;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.15);
    font-weight: 600;
}

.rep-target-free {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.rep-give-btn {
    background: #ffc518 !important;
    color: #000 !important;
    font-weight: 700 !important;
}

.rep-give-btn:hover:not(:disabled) {
    background: #eab308 !important;
}

.rep-give-btn.success {
    background: #16a34a !important;
    color: #fff !important;
}

.dly-balance {
    font-size: 0.8125rem;
    color: var(--text-muted);
    opacity: 0;
    animation: dly-fade-up 0.4s ease forwards;
    animation-delay: 0.3s;
}

.dly-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dly-countdown-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dly-countdown-time {
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.dly-error {
    font-size: 0.875rem;
    color: var(--accent);
}

@keyframes dly-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Daily Info (public) ========== */
.daily-info {
    position: relative;
    max-width: 640px;
    margin-top: 32px;
    padding: 0 8px;
}

.daily-info h2 {
    font-family: 'Righteous', cursive;
    font-size: 1.375rem;
    color: var(--text);
    margin-bottom: 12px;
    margin-top: 32px;
}

.daily-info h2:first-child {
    margin-top: 0;
}

.daily-info > p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.daily-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

.daily-info-card {
    padding: 24px 20px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.daily-info-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.daily-info-card h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.daily-info-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.daily-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
}

.daily-info-list li {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.daily-info-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

@media (max-width: 768px) {
    .daily-info-grid { grid-template-columns: 1fr; }
    .daily-info-card { padding: 20px 16px; }
}

/* ========== Falling coins ========== */
.falling-coin {
    position: fixed;
    z-index: 9001;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffcc00, #cc8800);
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(230, 168, 0, 0.25);
}

/* ========== Mobile ========== */
@media (max-width: 768px) {
    .daily-page {
        padding: 60px 16px 32px;
        min-height: 70vh;
    }

    .daily-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .daily-streak-num {
        font-size: 2.5rem;
    }

    .daily-coin {
        width: 80px;
        height: 80px;
    }

    .daily-coin-img {
        width: 80px;
        height: 80px;
    }

    .daily-coin-glow {
        width: 120px;
        height: 120px;
    }

    .daily-claim-btn {
        padding: 12px 40px;
        width: 100%;
    }

    .daily-week {
        gap: 8px;
    }

    .daily-dot {
        width: 12px;
        height: 12px;
    }

    .dly-amount-num {
        font-size: 2rem;
    }
}

@media (max-width: 360px) {
    .daily-streak-num {
        font-size: 2rem;
    }

    .daily-coin {
        width: 64px;
        height: 64px;
    }

    .daily-coin-img {
        width: 64px;
        height: 64px;
    }

    .daily-week {
        gap: 4px;
    }

    .daily-day-label {
        font-size: 0.5rem;
    }
}
