/* ==========================================
   DAILY LOGIN STREAK - CALENDAR STYLES
   ========================================== */

/* Daily Streak Button - Home Page */
.daily-streak-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 16px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.daily-streak-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5);
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
}

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

.daily-streak-btn .fire-icon {
    font-size: 1.4rem;
    animation: fireFlicker 0.5s ease-in-out infinite alternate;
}

.daily-streak-btn .btn-text {
    flex: 1;
    text-align: center;
}

.daily-streak-btn .streak-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    min-width: 30px;
    text-align: center;
}

/* Streak Notification Toast */
.streak-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 12px 20px;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.4);
    animation: slideDownStreak 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDownStreak {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.streak-notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 600px;
    width: 100%;
}

.streak-notification .streak-icon {
    font-size: 28px;
    animation: fireFlicker 0.5s ease-in-out infinite alternate;
}

@keyframes fireFlicker {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.streak-notification .streak-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.streak-notification .streak-text strong {
    font-size: 1rem;
}

.streak-notification .streak-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.streak-claim-btn {
    background: white;
    color: #f57c00;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.streak-claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.streak-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.streak-close-btn:hover {
    opacity: 1;
}

/* Modal Styles - Compacto estilo calendário */
#daily-streak-modal .modal-content {
    max-width: 520px;
    background: linear-gradient(180deg, #1a237e 0%, #0d1b3e 50%, #0d47a1 100%);
    border: 3px solid rgba(255, 152, 0, 0.5);
    padding: 18px;
    max-height: 85vh;
    overflow-y: auto;
}

.streak-modal-header {
    text-align: center;
    margin-bottom: 12px;
}

.streak-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(255, 152, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.streak-modal-title .fire-icon {
    font-size: 1.4rem;
    animation: fireFlicker 0.5s ease-in-out infinite alternate;
}

.streak-modal-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

/* Streak Stats Bar - Compacto */
.streak-stats-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.streak-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(255, 152, 0, 0.3);
    min-width: 80px;
}

.streak-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff9800;
    display: block;
    text-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
}

.streak-stat-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

/* Calendar Grid - Formato calendário compacto */
#streak-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding: 5px;
}

/* Day Card Base - Compacto */
.streak-day-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    min-height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.streak-day-number {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    position: absolute;
    top: 3px;
    left: 4px;
}

.streak-day-icon {
    font-size: 1rem;
    margin: 2px 0;
}

.streak-day-reward {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.1;
    max-width: 95%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.streak-day-status {
    font-size: 0.65rem;
    margin-top: 2px;
}

/* Locked State */
.streak-day-card.locked {
    opacity: 0.5;
    filter: grayscale(50%);
}

.streak-day-card.locked .streak-day-icon {
    filter: grayscale(100%);
}

/* Claimed State */
.streak-day-card.claimed {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(46, 125, 50, 0.4) 100%);
    border-color: rgba(76, 175, 80, 0.5);
}

.streak-day-card.claimed .streak-day-status {
    color: #4caf50;
}

/* Available State */
.streak-day-card.available {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 87, 34, 0.3) 100%);
    border-color: rgba(255, 152, 0, 0.6);
    cursor: pointer;
    animation: availablePulse 2s ease-in-out infinite;
}

@keyframes availablePulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }
    50% { 
        box-shadow: 0 0 20px 5px rgba(255, 152, 0, 0.3);
    }
}

.streak-day-card.available:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: #ff9800;
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.4);
}

.streak-day-card.available .streak-day-status {
    color: #ff9800;
    animation: starSpin 2s linear infinite;
}

@keyframes starSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Special Day (Day 30) - Compacto */
.streak-day-card.special {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.3) 0%, rgba(233, 30, 99, 0.3) 100%);
    border-color: rgba(233, 30, 99, 0.6);
    min-height: 55px;
}

.streak-day-card.special.available {
    animation: specialPulse 1.5s ease-in-out infinite;
}

@keyframes specialPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.4), 0 0 30px rgba(156, 39, 176, 0.3);
    }
    50% { 
        box-shadow: 0 0 30px 10px rgba(233, 30, 99, 0.4), 0 0 50px rgba(156, 39, 176, 0.5);
    }
}

.streak-day-card.special .streak-day-icon {
    font-size: 1.2rem;
}

.streak-day-card.special .streak-day-reward {
    font-size: 0.55rem;
    font-weight: 600;
}

.streak-special-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(90deg, #ffd700, #ffab00);
    color: #000;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 0.45rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Claiming Animation */
.streak-day-card.claiming {
    pointer-events: none;
    animation: claimingPulse 0.5s ease-in-out infinite;
}

@keyframes claimingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.95); }
}

/* Reward Overlay */
.streak-reward-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.streak-reward-popup {
    background: linear-gradient(180deg, #1565c0 0%, #0d47a1 100%);
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 400px;
    width: 90%;
}

.streak-reward-popup.special {
    background: linear-gradient(180deg, #9c27b0 0%, #6a1b9a 100%);
    border-color: rgba(255, 215, 0, 0.6);
}

@keyframes popIn {
    from { 
        transform: scale(0.5);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

.reward-header {
    margin-bottom: 15px;
}

.reward-header .reward-star {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
    animation: starBounce 1s ease-in-out infinite;
}

@keyframes starBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(10deg); }
}

.reward-header h3 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.reward-day {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.reward-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    animation: itemSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.reward-item:nth-child(1) { animation-delay: 0.1s; }
.reward-item:nth-child(2) { animation-delay: 0.2s; }
.reward-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes itemSlideIn {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.reward-item .reward-icon {
    font-size: 1.8rem;
}

.reward-item .reward-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.reward-item.gems .reward-amount {
    color: #81d4fa;
}

.reward-item.coins .reward-amount {
    color: #ffd54f;
}

.reward-item.creature .reward-amount {
    color: #ce93d8;
}

.reward-close-btn {
    min-width: 150px;
}

/* Streak Button in Header/Home */
.streak-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 8px 16px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.streak-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.streak-btn .streak-fire {
    font-size: 1.2rem;
}

.streak-btn .streak-count {
    font-weight: 700;
}

.streak-btn.has-reward {
    animation: streakBtnPulse 2s ease-in-out infinite;
}

@keyframes streakBtnPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(255, 152, 0, 0.6); }
}

/* Home Section Streak Card */
.home-streak-card {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 87, 34, 0.2) 100%);
    border: 2px solid rgba(255, 152, 0, 0.4);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.home-streak-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 152, 0, 0.7);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.2);
}

.home-streak-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.home-streak-header .fire-icon {
    font-size: 1.8rem;
}

.home-streak-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.home-streak-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-streak-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff9800;
}

.home-streak-status {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.home-streak-status.can-claim {
    color: #4caf50;
    font-weight: 600;
}

.home-streak-card.has-reward {
    animation: streakCardPulse 2s ease-in-out infinite;
    border-color: rgba(76, 175, 80, 0.6);
}

@keyframes streakCardPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px 5px rgba(76, 175, 80, 0.4);
    }
}

/* Responsive Design - Compacto */
@media (max-width: 768px) {
    #streak-calendar-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 5px;
    }

    .streak-day-card {
        padding: 5px 3px;
        min-height: 50px;
    }

    .streak-day-icon {
        font-size: 0.9rem;
    }

    .streak-day-reward {
        font-size: 0.45rem;
    }

    .streak-day-card.special {
        grid-column: span 2;
    }

    .streak-stats-bar {
        gap: 10px;
    }

    .streak-stat {
        padding: 6px 12px;
        min-width: 70px;
    }

    .streak-stat-value {
        font-size: 1.1rem;
    }

    #daily-streak-modal .modal-content {
        padding: 12px;
        max-width: 95%;
    }

    .streak-modal-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    #streak-calendar-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }

    .streak-day-card {
        padding: 4px 2px;
        min-height: 45px;
    }

    .streak-day-number {
        font-size: 0.5rem;
    }

    .streak-day-icon {
        font-size: 0.8rem;
    }

    .streak-day-reward {
        display: none;
    }

    .streak-day-card.special {
        grid-column: span 2;
    }

    .streak-day-card.special .streak-day-reward {
        display: block;
        font-size: 0.45rem;
    }

    .streak-stats-bar {
        flex-direction: row;
        gap: 8px;
    }

    .streak-stat {
        flex: 1;
        min-width: auto;
    }

    .streak-notification-content {
        flex-wrap: wrap;
        gap: 10px;
    }

    .streak-notification .streak-text {
        order: 2;
        flex-basis: 100%;
    }

    .streak-claim-btn {
        order: 3;
        flex: 1;
    }

    .streak-reward-popup {
        padding: 20px;
    }

    .reward-header h3 {
        font-size: 1.2rem;
    }
}
