/* ==========================================
   🎯 ЕЖЕДНЕВНЫЕ ЗАДАНИЯ (DAILY QUESTS)
   Карамельная палитра проекта
   ========================================== */

:root {
    --quest-accent:        #C9955B;
    --quest-accent-dark:   #A0722D;
    --quest-accent-light:  #E8D5B8;
    --quest-gold:          #F59E0B;
    --quest-gold-light:    #FEF3C7;
    --quest-green:         #22c55e;
    --quest-green-light:   #f0fdf4;
    --quest-bg:            #FFFCF7;
    --quest-border:        #F0E5D2;
    --quest-text:          #2C1810;
    --quest-text-muted:    #5D4037;
}

/* ============ СТРАНИЦА ============ */
.quests-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem 5rem 1rem;
}

/* Шапка */
.quests-header {
    background: linear-gradient(135deg, #D4A574 0%, #C9955B 50%, #A0722D 100%);
    border-radius: 20px;
    padding: 1.75rem 1.5rem;
    color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(201, 149, 91, 0.4);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}
.quests-header-info h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.quests-header-info p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.95;
}
.quests-header-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.q-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 0.5rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Таймер */
.quests-timer-bar {
    background: #ffffff;
    border: 1px solid var(--quest-border);
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.quests-timer-title {
    font-size: 0.9rem;
    color: var(--quest-text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.quests-timer-clock {
    font-family: monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--quest-accent-dark);
    background: var(--quest-gold-light);
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
}

/* Сетка заданий */
.quests-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.quest-card {
    background: #ffffff;
    border: 1px solid var(--quest-border);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.quest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.quest-card.is-done {
    border-color: #86efac;
    background: linear-gradient(to bottom, #ffffff 0%, #f0fdf4 100%);
}
.quest-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.quest-icon {
    font-size: 2.2rem;
    width: 3.25rem;
    height: 3.25rem;
    background: var(--quest-bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--quest-border);
}
.quest-card.is-done .quest-icon {
    background: var(--quest-green-light);
    border-color: #86efac;
}
.quest-details { flex: 1; }

.quest-diff-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.35rem;
}
.diff-easy   { background: #e0f2fe; color: #0284c7; }
.diff-medium { background: #fef3c7; color: #b45309; }
.diff-hard   { background: #fee2e2; color: #b91c1c; }

.quest-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--quest-text);
    margin: 0 0 0.35rem 0;
}
.quest-desc {
    font-size: 0.88rem;
    color: var(--quest-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Прогресс-бар */
.quest-progress-wrap { margin: 0.5rem 0 1rem 0; }
.quest-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--quest-text-muted);
    margin-bottom: 0.4rem;
}
.quest-progress-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4A574, #C9955B);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.quest-card.is-done .quest-progress-fill {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* Награды и кнопки */
.quest-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-top: 1px solid var(--quest-border);
    padding-top: 0.85rem;
    flex-wrap: wrap;
}
.quest-rewards {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.reward-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
}
.reward-zeff {
    background: #FFF8F0;
    color: #92400E;
    border: 1px solid #E8D5B8;
}
.reward-points {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-quest {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    transition: all 0.2s ease;
    min-height: 44px;
}
.btn-quest-go {
    background: #F0E5D2;
    color: var(--quest-text);
}
.btn-quest-go:hover {
    background: var(--quest-accent-light);
    color: var(--quest-text);
    text-decoration: none;
}
.btn-quest-claim {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
    animation: pulse-claim 2s infinite;
}
.btn-quest-claim:hover {
    transform: scale(1.03);
}

.quest-claimed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
}

@keyframes pulse-claim {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* 🎁 Супер-Сундук */
.combo-card {
    background: linear-gradient(135deg, #FFF8F0 0%, #FEF3C7 100%);
    border: 2px solid #FDE68A;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.15);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.combo-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 260px;
}
.combo-chest-icon {
    font-size: 3.5rem;
    animation: chest-bounce 3s infinite ease-in-out;
}
@keyframes chest-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.combo-info h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #92400E;
}
.combo-info p {
    margin: 0;
    font-size: 0.88rem;
    color: #78350F;
}
.btn-combo-claim {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    padding: 0.85rem 1.4rem;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4);
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 48px;
}
.btn-combo-claim:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(217, 119, 6, 0.5);
}

/* 📱 Виджет на главной */
.daily-quests-widget {
    background: #ffffff;
    border: 1px solid var(--quest-border);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.dqw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.dqw-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--quest-text);
    font-weight: 700;
}
.dqw-badge {
    background: var(--quest-gold-light);
    color: #92400E;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.dqw-link {
    color: var(--quest-accent-dark);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
}
.dqw-link:hover {
    color: var(--quest-accent);
}
.dqw-bar-wrap {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.dqw-bar {
    height: 100%;
    background: linear-gradient(90deg, #D4A574, #C9955B);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.dqw-footer {
    font-size: 0.8rem;
    color: var(--quest-text-muted);
}

/* 📱 Мобильная адаптация */
@media (max-width: 640px) {
    .quests-page { padding: 1rem 0.75rem 5rem 0.75rem; }
    .quests-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem 1rem;
    }
    .quests-header-info h1 { font-size: 1.4rem; }
    .quests-timer-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .quest-card { padding: 1rem; }
    .quest-bottom { flex-direction: column; align-items: stretch; }
    .quest-rewards { justify-content: center; }
    .btn-quest { justify-content: center; }
    .combo-card {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem 1rem;
    }
    .combo-left { flex-direction: column; align-items: flex-start; }
    .btn-combo-claim { width: 100%; text-align: center; }
}
