/* Daily Login Bonus Modal - Modern Space Theme 2025 */

/* Modal Container */
.daily-bonus-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.daily-bonus-modal.show {
    opacity: 1;
    pointer-events: auto;
}

/* Backdrop - Simple dark overlay without blur for performance */
.daily-bonus-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

/* Content Container - Modern space design */
.daily-bonus-content {
    position: relative;
    background: linear-gradient(135deg, #0a0e1a 0%, #141b2e 50%, #0f1624 100%);
    border-radius: 20px;
    padding: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 
        0 0 40px rgba(0, 212, 255, 0.3),
        0 0 80px rgba(0, 153, 204, 0.2),
        inset 0 0 20px rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.daily-bonus-modal.show .daily-bonus-content {
    transform: scale(1) translateY(0);
}

/* Scrollbar styling */
.daily-bonus-content::-webkit-scrollbar {
    width: 6px;
}

.daily-bonus-content::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 3px;
}

.daily-bonus-content::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 3px;
}

/* Header Section - Compact and prominent */
.daily-bonus-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.daily-bonus-header h2 {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 800;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #00d4ff 0%, #00ffff 50%, #0099cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    letter-spacing: 1px;
}

/* Streak Display - Large and glowing */
.daily-bonus-streak {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 153, 204, 0.1));
    padding: 12px 24px;
    border-radius: 100px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.3),
        inset 0 0 10px rgba(0, 212, 255, 0.1);
}

.streak-number {
    font-size: clamp(32px, 6vw, 42px);
    font-weight: 900;
    color: #ffd700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.4);
    animation: pulse-gold 2s ease-in-out infinite;
}

.streak-label {
    font-size: clamp(14px, 3vw, 16px);
    color: #e0f7ff;
    font-weight: 500;
}

/* Today's Reward - Central focus */
.daily-bonus-today {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(0, 153, 204, 0.05));
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.daily-bonus-today h3 {
    font-size: clamp(18px, 4vw, 20px);
    color: #00ffff;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reward-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

.reward-item:nth-child(even) {
    animation-delay: 1.5s;
}

.reward-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 5px currentColor);
}

.reward-amount {
    font-size: clamp(16px, 3.5vw, 20px);
    font-weight: 700;
    color: #fff;
}

.reward-item.coins .reward-amount {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.reward-item.diamonds .reward-amount {
    color: #7dd3fc;
    text-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
}

/* Coin icon styling */
.coin-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 3px;
    display: inline-block;
}

/* Calendar Section - Compact horizontal scroll on mobile */
.daily-bonus-calendar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.daily-bonus-calendar::-webkit-scrollbar {
    height: 4px;
}

.daily-bonus-calendar::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 2px;
}

.daily-bonus-calendar::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 2px;
}

.calendar-day {
    flex: 0 0 auto;
    min-width: 80px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
    scroll-snap-align: center;
}

.calendar-day:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.calendar-day.current {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 153, 204, 0.2));
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.4),
        inset 0 0 10px rgba(0, 212, 255, 0.1);
    animation: pulse-current 2s ease-in-out infinite;
}

.calendar-day.milestone {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.05));
}

.calendar-day.future {
    opacity: 0.5;
}

.day-number {
    font-size: 11px;
    color: #7dd3fc;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-reward {
    font-size: 13px;
    color: #e0f7ff;
    font-weight: 500;
    line-height: 1.3;
}

.day-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    font-weight: bold;
}

/* Claim Button - Large and prominent */
.daily-bonus-claim-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 16px 32px;
    font-size: clamp(18px, 4vw, 22px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #000;
    background: linear-gradient(135deg, #00ff88 0%, #00ffff 50%, #00d4ff 100%);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 20px rgba(0, 255, 136, 0.4),
        0 0 40px rgba(0, 212, 255, 0.3);
}

.daily-bonus-claim-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 30px rgba(0, 255, 136, 0.5),
        0 0 60px rgba(0, 212, 255, 0.4);
}

.daily-bonus-claim-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.daily-bonus-claim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #333, #555);
}

.daily-bonus-claim-btn.claiming {
    animation: claiming-pulse 0.6s ease-in-out infinite;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 100%;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

/* Close Button */
.daily-bonus-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #7dd3fc;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.daily-bonus-close:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff4444;
    transform: scale(1.1) rotate(90deg);
}

/* Success Overlay */
.claim-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.claim-success-overlay.show {
    opacity: 1;
}

.success-content {
    text-align: center;
    padding: 30px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: success-bounce 0.6s ease;
    filter: drop-shadow(0 0 20px currentColor);
}

.success-content h3 {
    font-size: clamp(24px, 5vw, 28px);
    color: #00ffff;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.success-reward {
    font-size: clamp(18px, 4vw, 20px);
    color: #00ff88;
    font-weight: bold;
    margin: 10px 0;
    animation: reward-slide-in 0.5s ease backwards;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.success-reward:nth-child(2) { animation-delay: 0.1s; }
.success-reward:nth-child(3) { animation-delay: 0.2s; }
.success-reward:nth-child(4) { animation-delay: 0.3s; }

.streak-continue {
    margin-top: 20px;
    font-size: clamp(14px, 3vw, 16px);
    color: #ffd700;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Animations */
@keyframes pulse-gold {
    0%, 100% {
        transform: scale(1);
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 60px rgba(255, 215, 0, 0.6);
    }
}

@keyframes pulse-current {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(0, 212, 255, 0.4),
            inset 0 0 10px rgba(0, 212, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(0, 212, 255, 0.6),
            inset 0 0 15px rgba(0, 212, 255, 0.2);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

@keyframes claiming-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 5px 20px rgba(0, 255, 136, 0.4),
            0 0 40px rgba(0, 212, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 8px 30px rgba(0, 255, 136, 0.6),
            0 0 60px rgba(0, 212, 255, 0.5);
    }
}

@keyframes success-bounce {
    0% {
        transform: scale(0) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes reward-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Portrait Optimizations */
@media (max-width: 480px) and (orientation: portrait) {
    .daily-bonus-content {
        padding: 15px;
        max-height: 90vh;
    }
    
    .daily-bonus-header {
        margin-bottom: 15px;
    }
    
    .daily-bonus-streak {
        padding: 10px 20px;
    }
    
    .daily-bonus-today {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .daily-bonus-calendar {
        margin-bottom: 15px;
    }
    
    .calendar-day {
        min-width: 70px;
        padding: 10px 6px;
    }
    
    .reward-item {
        padding: 8px 16px;
    }
    
    .reward-icon {
        font-size: 24px;
    }
    
    .daily-bonus-claim-btn {
        padding: 14px 28px;
    }
}

/* Landscape adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .daily-bonus-content {
        max-height: 95vh;
        padding: 8px 15px;
    }
    
    /* Header inline layout - title and streak on same line */
    .daily-bonus-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        gap: 15px;
        padding-right: 50px; /* Space for close button */
    }
    
    .daily-bonus-header h2 {
        font-size: 20px;
        margin: 0;
    }
    
    .daily-bonus-streak {
        padding: 8px 16px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    
    .streak-number {
        font-size: 24px;
    }
    
    .streak-label {
        font-size: 13px;
    }
    
    /* Today's reward inline - text and reward on same line */
    .daily-bonus-today {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .daily-bonus-today h3 {
        font-size: 16px;
        margin: 0;
        flex-shrink: 0;
    }
    
    .reward-display {
        margin: 0;
    }
    
    .reward-item {
        padding: 6px 12px;
    }
    
    .reward-icon {
        font-size: 20px;
    }
    
    .reward-amount {
        font-size: 16px;
    }
    
    .daily-bonus-calendar {
        margin-bottom: 8px;
        padding: 5px 0;
    }
    
    .calendar-day {
        min-width: 65px;
        padding: 8px 5px;
    }
    
    .day-number {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .day-reward {
        font-size: 12px;
    }
    
    .daily-bonus-claim-btn {
        padding: 12px 24px;
        font-size: 18px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .daily-bonus-content {
        border: 2px solid #fff;
    }
    
    .calendar-day,
    .reward-item,
    .daily-bonus-claim-btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}