/* 
 * Exam Report AI - Custom Styles
 * Premium animations and effects
 */

/* Base resets and improvements */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animation utilities */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out both;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out both;
}

.animate-bounce-in {
    animation: bounceIn 0.6s ease-out both;
}

/* Stagger animations for lists */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Glassmorphism effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Premium shadows */
.shadow-premium {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-glow-blue {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

.shadow-glow-violet {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

/* Interactive states */
.interactive {
    transition: all 0.3s ease;
}

.interactive:hover {
    transform: translateY(-2px);
}

.interactive:active {
    transform: translateY(0);
}

/* Loading states */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Progress bar animation */
.progress-animate {
    animation: growWidth 1.2s ease-out forwards;
}

@keyframes growWidth {
    from { width: 0; }
    to { width: var(--target-width, 100%); }
}

/* Pulse ring animation for badges */
.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid currentColor;
    animation: pulseRing 2s ease-out infinite;
    opacity: 0;
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Modal transitions */
.modal-enter {
    opacity: 0;
    transform: scale(0.95);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-exit {
    opacity: 1;
    transform: scale(1);
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Toast notifications */
.toast-enter {
    transform: translateY(100%) translateX(-50%);
    opacity: 0;
}

.toast-enter-active {
    transform: translateY(0) translateX(-50%);
    opacity: 1;
}

/* Radar chart custom styles */
.radar-label {
    font-size: 10px;
    fill: rgba(255, 255, 255, 0.7);
}

/* Score counter styles */
.score-counter {
    font-variant-numeric: tabular-nums;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .hide-mobile {
        display: none;
    }
    
    /* Reduce animation intensity on mobile */
    .animate-float {
        animation-duration: 4s;
    }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Form input focus states */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Number input spinner removal */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Print styles for shareable content */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .print-section {
        break-inside: avoid;
    }
}
