/* ====================================================================
   DAILY BONUS REWARD SYSTEM - COMPLETE CSS v3.0
   Gold Theme - Matches App Design System
   ==================================================================== */

/* ====================================================================
   1. DAILY BONUS BUTTON
   ==================================================================== */
.daily-bonus-button-container {
    position: relative;
    display: inline-block;
}

.daily-bonus-btn {
    background: linear-gradient(135deg, #c9a84c 0%, #a88a2e 50%, #d4b85c 100%);
    background-size: 200% 200%;
    animation: db-gradient-shift 3s ease infinite;
    color: #1a1610;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 8px 30px rgba(201, 168, 76, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: inherit;
}

@keyframes db-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.daily-bonus-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 
        0 15px 40px rgba(201, 168, 76, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.daily-bonus-btn:active {
    transform: translateY(-2px) scale(1.01);
}

.daily-bonus-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: db-btn-shine 2.5s infinite;
}

@keyframes db-btn-shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.daily-bonus-btn .icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daily-bonus-btn .icon i {
    font-size: 18px;
}

/* Notification Badge */
.daily-bonus-notification-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border-radius: 50%;
    min-width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    border: 3px solid #1a1610;
    animation: db-badge-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.5);
}

@keyframes db-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ====================================================================
   2. MODAL OVERLAY
   ==================================================================== */
.daily-bonus-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 8, 5, 0.92);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.daily-bonus-modal-overlay.active,
.daily-bonus-modal-overlay.show,
.daily-bonus-modal-overlay[style*="display: flex"] {
    display: flex !important;
    animation: db-overlay-fade 0.3s ease;
}

@keyframes db-overlay-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ====================================================================
   3. MODAL CONTENT BOX
   ==================================================================== */
.daily-bonus-modal-overlay > .daily-bonus-modal {
    background: linear-gradient(165deg, #1f1a12 0%, #12100a 100%);
    border-radius: 28px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 30px 100px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(201, 168, 76, 0.15) inset,
        0 0 80px rgba(201, 168, 76, 0.08);
    animation: db-modal-slide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(201, 168, 76, 0.2);
    display: flex;
    flex-direction: column;
}

@keyframes db-modal-slide {
    from { 
        opacity: 0; 
        transform: translateY(50px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* ====================================================================
   4. MODAL HEADER
   ==================================================================== */
.daily-bonus-header {
    background: linear-gradient(135deg, #c9a84c 0%, #a88a2e 100%);
    padding: 30px 24px 35px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}

.daily-bonus-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18) 0%, transparent 50%);
    pointer-events: none;
}

.daily-bonus-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: inherit;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

.daily-bonus-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(26, 22, 16, 0.25);
    border: 2px solid rgba(26, 22, 16, 0.3);
    color: #1a1610;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.daily-bonus-close:hover {
    background: rgba(26, 22, 16, 0.4);
    transform: rotate(90deg) scale(1.1);
}

.daily-bonus-icon-header {
    width: 70px;
    height: 70px;
    background: rgba(26, 22, 16, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 32px;
    color: #1a1610;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    animation: db-icon-float 3s ease-in-out infinite;
}

@keyframes db-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.daily-bonus-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1610;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
    position: relative;
    z-index: 2;
}

.daily-bonus-subtitle {
    color: rgba(26, 22, 16, 0.8);
    font-size: 15px;
    margin: 0;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* ====================================================================
   5. STATS SECTION
   ==================================================================== */
.daily-bonus-stats {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.1) 0%, rgba(168, 138, 46, 0.06) 100%);
    padding: 24px 20px;
    margin: 24px 20px 0;
    border-radius: 20px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.daily-bonus-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
}

.daily-bonus-stat-item {
    display: inline-block;
}

.daily-bonus-stat-value {
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, #c9a84c 0%, #d4b85c 50%, #e8d48b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.daily-bonus-stat-label {
    color: #a8a08e;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ====================================================================
   6. TASKS CONTAINER
   ==================================================================== */
.daily-bonus-tasks {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar */
.daily-bonus-tasks::-webkit-scrollbar {
    width: 6px;
}

.daily-bonus-tasks::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.daily-bonus-tasks::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #c9a84c, #a88a2e);
    border-radius: 3px;
}

/* ====================================================================
   7. LOADING STATE
   ==================================================================== */
.daily-bonus-loading {
    text-align: center;
    padding: 50px 20px;
    color: #a8a08e;
}

.daily-bonus-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(201, 168, 76, 0.15);
    border-top-color: #c9a84c;
    border-radius: 50%;
    animation: db-spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes db-spin {
    to { transform: rotate(360deg); }
}

.daily-bonus-loading p {
    margin: 0;
    font-size: 15px;
}

/* ====================================================================
   8. TASK CARDS
   ==================================================================== */
.daily-bonus-task-card {
    background: linear-gradient(135deg, rgba(31, 26, 18, 0.95), rgba(18, 16, 10, 0.98));
    border: 1px solid rgba(201, 168, 76, 0.1);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.daily-bonus-task-card:hover {
    transform: translateX(6px);
    border-color: rgba(201, 168, 76, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ====================================================================
   9. MOBILE RESPONSIVE
   ==================================================================== */
@media (max-width: 480px) {
    .daily-bonus-btn {
        padding: 14px 26px;
        font-size: 14px;
        gap: 10px;
        letter-spacing: 1px;
    }
    
    .daily-bonus-modal-overlay {
        padding: 12px;
    }
    
    .daily-bonus-modal-overlay > .daily-bonus-modal {
        max-height: 95vh;
        border-radius: 24px;
    }
    
    .daily-bonus-header {
        padding: 26px 20px 32px;
    }
    
    .daily-bonus-title {
        font-size: 22px;
    }
    
    .daily-bonus-subtitle {
        font-size: 14px;
    }
    
    .daily-bonus-icon-header {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .daily-bonus-stats {
        margin: 20px 16px 0;
        padding: 20px 16px;
    }
    
    .daily-bonus-stat-value {
        font-size: 46px;
    }
    
    .daily-bonus-stat-label {
        font-size: 12px;
    }
    
    .daily-bonus-tasks {
        padding: 16px;
    }
    
    .daily-bonus-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 14px;
        right: 14px;
    }
}

@media (max-width: 360px) {
    .daily-bonus-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .daily-bonus-stat-value {
        font-size: 40px;
    }
    
    .daily-bonus-title {
        font-size: 20px;
    }
    
    .daily-bonus-subtitle {
        font-size: 13px;
    }
    
    .daily-bonus-icon-header {
        width: 52px;
        height: 52px;
        font-size: 24px;
        margin-bottom: 14px;
    }
    
    .daily-bonus-header {
        padding: 22px 16px 28px;
    }
}

/* ====================================================================
   10. LIGHT MODE SUPPORT
   ==================================================================== */
[data-theme="light"] .daily-bonus-modal-overlay {
    background: rgba(26, 22, 16, 0.85);
}

[data-theme="light"] .daily-bonus-modal-overlay > .daily-bonus-modal {
    background: linear-gradient(165deg, #ffffff 0%, #f7f5f0 100%);
    border: 1px solid rgba(201, 168, 76, 0.25);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2), 0 0 60px rgba(201, 168, 76, 0.1);
}

[data-theme="light"] .daily-bonus-stats {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(168, 138, 46, 0.04));
    border-color: rgba(201, 168, 76, 0.2);
}

[data-theme="light"] .daily-bonus-stat-label {
    color: #6b5e4f;
}

[data-theme="light"] .daily-bonus-loading {
    color: #6b5e4f;
}

[data-theme="light"] .daily-bonus-task-card {
    background: linear-gradient(135deg, #ffffff, #f7f5f0);
    border-color: rgba(201, 168, 76, 0.15);
}

[data-theme="light"] .daily-bonus-task-card:hover {
    border-color: rgba(201, 168, 76, 0.4);
    box-shadow: 0 10px 40px rgba(44, 36, 23, 0.1);
}

/* ====================================================================
   11. ANIMATIONS
   ==================================================================== */
@keyframes db-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes db-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(201, 168, 76, 0.3); }
    50% { box-shadow: 0 0 20px rgba(201, 168, 76, 0.6); }
}

/* ====================================================================
   12. UTILITY CLASSES
   ==================================================================== */
.db-text-gradient {
    background: linear-gradient(135deg, #c9a84c, #d4b85c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.db-hidden {
    display: none !important;
}

.db-visible {
    display: flex !important;
}
