/**
 * Celebration System Styles
 * Provides engaging visual feedback for completed sessions
 */

/* Animate.css CDN imports for animations */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

/* Celebration Modal Styles */
.celebration-content {
    border-radius: 15px;
    border: 2px solid var(--bs-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.celebration-header {
    margin-bottom: 2rem;
}

.celebration-message {
    color: var(--bs-warning);
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
}

/* Score Display Circle */
.score-display {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 4px solid;
}

.score-circle.excellent {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
    animation: pulse 2s infinite;
}

.score-circle.good {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    border-color: #17a2b8;
}

.score-circle.average {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    border-color: #ffc107;
}

.score-circle.needs-improvement {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    border-color: #6f42c1;
}

.score-percentage {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.score-label {
    font-size: 0.9rem;
    color: white;
    opacity: 0.9;
}

/* Session Summary */
.session-summary {
    margin-bottom: 2rem;
}

.summary-item {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-5px);
}

.summary-item h5 {
    margin: 0.5rem 0;
    color: var(--bs-light);
    font-weight: 600;
}

/* Badge System */
.badges-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.badge-earned {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.badge-earned:hover {
    transform: scale(1.05);
}

.badge-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.badge-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.25rem;
}

.badge-description {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.2;
}

/* User Badge Display (for dashboard/profile) */
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(111, 66, 193, 0.1);
    border: 1px solid rgba(111, 66, 193, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

.user-badge:hover {
    background: rgba(111, 66, 193, 0.2);
    transform: translateY(-2px);
}

.user-badge .badge-icon {
    font-size: 1.2rem;
}

.user-badge .badge-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--bs-light);
}

/* Celebration Actions */
.celebration-actions {
    margin-top: 2rem;
}

.celebration-actions .btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.celebration-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    animation: confetti-fall 3s ease-out forwards;
}

.confetti:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    background: #ff6b6b;
}

.confetti:nth-child(2) {
    left: 20%;
    animation-delay: 0.1s;
    background: #4ecdc4;
}

.confetti:nth-child(3) {
    left: 30%;
    animation-delay: 0.2s;
    background: #45b7d1;
}

.confetti:nth-child(4) {
    left: 40%;
    animation-delay: 0.3s;
    background: #96ceb4;
}

.confetti:nth-child(5) {
    left: 50%;
    animation-delay: 0.4s;
    background: #feca57;
}

.confetti:nth-child(6) {
    left: 60%;
    animation-delay: 0.5s;
    background: #ff9ff3;
}

.confetti:nth-child(7) {
    left: 70%;
    animation-delay: 0.6s;
    background: #54a0ff;
}

.confetti:nth-child(8) {
    left: 80%;
    animation-delay: 0.7s;
    background: #5f27cd;
}

.confetti:nth-child(9) {
    left: 90%;
    animation-delay: 0.8s;
    background: #00d2d3;
}

.confetti:nth-child(10) {
    left: 95%;
    animation-delay: 0.9s;
    background: #ff9f43;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .celebration-message {
        font-size: 1.5rem;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-percentage {
        font-size: 1.5rem;
    }
    
    .badges-container {
        flex-direction: column;
        align-items: center;
    }
    
    .badge-earned {
        min-width: 100px;
        padding: 0.75rem;
    }
    
    .celebration-actions .btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .summary-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .celebration-content {
        margin: 1rem;
    }
    
    .modal-body {
        padding: 2rem 1rem !important;
    }
    
    .celebration-message {
        font-size: 1.25rem;
    }
    
    .score-circle {
        width: 80px;
        height: 80px;
    }
    
    .score-percentage {
        font-size: 1.25rem;
    }
    
    .badges-section {
        padding: 1rem;
    }
}

/* Dark theme compatibility */
@media (prefers-color-scheme: dark) {
    .celebration-content {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .badge-earned {
        border: 3px solid white;
    }
    
    .score-circle {
        border-width: 5px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .confetti {
        animation-duration: 1s;
    }
    
    .score-circle.excellent {
        animation: none;
    }
    
    .animate__animated {
        animation-duration: 0.5s !important;
    }
}