/* assets/css/style.css - Custom Styling & Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Space Grotesk', var(--font-sans);
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .font-heading {
    font-family: var(--font-heading);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.4);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.7);
}

/* Glassmorphism & Modern Card Effects */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.8);
}
.dark .glass-panel {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(55, 65, 81, 0.6);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}
.dark .glass-nav {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

/* Gradients */
.gradient-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #2563eb 100%);
}
.gradient-accent {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}
.gradient-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(243, 244, 246, 0.7) 100%);
}
.dark .gradient-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.8) 100%);
}

/* Card hover animation */
.card-hover {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.1);
}
.dark .card-hover:hover {
    box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.5);
}

/* 3D Flip Card for Flashcards */
.flip-card {
    perspective: 1000px;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
}
.flip-card-back {
    transform: rotateY(180deg);
}

/* Video Container 16:9 */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
}
.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Fullscreen Player Mode */
#videoPlayerContainer:fullscreen {
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}
#videoPlayerContainer:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#videoPlayerContainer:fullscreen .video-responsive,
#videoPlayerContainer:-webkit-full-screen .video-responsive {
    width: 100vw;
    height: 100vh;
    padding-bottom: 0;
    border-radius: 0;
}
#videoPlayerContainer:fullscreen iframe,
#videoPlayerContainer:-webkit-full-screen iframe {
    width: 100vw;
    height: 100vh;
}

/* Custom Theater Mode */
.modal-theater-mode {
    max-width: 96vw !important;
    width: 96vw !important;
}

/* Pulse animation for voice recognition */
@keyframes mic-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}
.mic-recording {
    animation: mic-pulse 1.4s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Audio Waveform Equalizer Animation */
.audio-wave {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}
.audio-wave span {
    display: inline-block;
    width: 3px;
    height: 100%;
    background-color: currentColor;
    border-radius: 9999px;
    animation: wave-bar 1.2s ease-in-out infinite;
}
.audio-wave span:nth-child(1) { animation-delay: 0.1s; }
.audio-wave span:nth-child(2) { animation-delay: 0.35s; }
.audio-wave span:nth-child(3) { animation-delay: 0.2s; }
.audio-wave span:nth-child(4) { animation-delay: 0.45s; }

@keyframes wave-bar {
    0%, 100% {
        height: 4px;
        transform: scaleY(0.4);
    }
    50% {
        height: 16px;
        transform: scaleY(1);
    }
}

/* Shimmer Highlight Effect */
.shimmer-badge {
    position: relative;
    overflow: hidden;
}
.shimmer-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 80%
    );
    transform: rotate(30deg);
    animation: shimmer 3.5s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* Floating Audio Status Pill */
#floatingAudioIndicator {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow Border & Badge */
.glow-emerald {
    box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.35);
}
.glow-indigo {
    box-shadow: 0 0 20px -3px rgba(79, 70, 229, 0.35);
}
.glow-amber {
    box-shadow: 0 0 20px -3px rgba(245, 158, 11, 0.35);
}

/* Print Certificate Styling */
@media print {
    body * {
        visibility: hidden;
    }
    #certificateContent, #certificateContent * {
        visibility: visible;
    }
    #certificateContent {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 24px;
        box-shadow: none;
        border: 6px solid #4f46e5 !important;
    }
    .no-print {
        display: none !important;
    }
}

/* Accordion Model Component */
.accordion-item {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-header {
    cursor: pointer;
    user-select: none;
}
.accordion-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-item.active .accordion-chevron {
    transform: rotate(180deg);
}
.accordion-item.active {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}
.dark .accordion-item.active {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}
.accordion-body {
    animation: fadeIn 0.25s ease-out;
}
.accordion-item:not(.active) .accordion-body {
    display: none;
}


