/* Milestone Screen Styles */
.milestone-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.milestone-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

.milestone-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.milestone-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.milestone-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.milestone-message {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.milestone-level {
    font-size: 4rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin: 1rem 0;
    animation: scaleIn 0.5s ease-out 0.6s both;
}

.milestone-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.milestone-btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.milestone-btn-primary {
    background: white;
    color: #667eea;
}

.milestone-btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.milestone-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.milestone-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001; /* Above the overlay (10000) */
}

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

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode support */
.dark-mode .milestone-overlay {
    background: rgba(0, 0, 0, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .milestone-container {
        padding: 2rem 1.5rem;
    }

    .milestone-title {
        font-size: 2rem;
    }

    .milestone-message {
        font-size: 1.1rem;
    }

    .milestone-level {
        font-size: 3rem;
    }

    .milestone-buttons {
        flex-direction: column;
    }

    .milestone-btn {
        width: 100%;
    }
}

