
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Montserrat', sans-serif;
            background: #0a0a0a;
            color: #ffffff;
            overflow-x: hidden;
            position: relative;
        }

        /* ============================================
           ANIMATED BACKGROUND
        ============================================ */
        .animated-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
        }

        .blob {
            position: absolute;
            width: 500px;
            height: 500px;
            border-radius: 50%;
            background: radial-gradient(circle, #3B444B 0%, transparent 70%);
            filter: blur(100px);
            opacity: 0.3;
            animation: morph 20s ease-in-out infinite;
        }

        .blob:nth-child(1) {
            top: 10%;
            left: 10%;
            animation-delay: 0s;
        }

        .blob:nth-child(2) {
            top: 60%;
            right: 10%;
            animation-delay: 5s;
        }

        .blob:nth-child(3) {
            bottom: 10%;
            left: 50%;
            animation-delay: 10s;
        }

        @keyframes morph {
            0%, 100% {
                border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
                transform: translate(0, 0) rotate(0deg);
            }
            25% {
                border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
                transform: translate(50px, 50px) rotate(90deg);
            }
            50% {
                border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
                transform: translate(-50px, 100px) rotate(180deg);
            }
            75% {
                border-radius: 60% 40% 60% 40% / 70% 30% 50% 60%;
                transform: translate(100px, -50px) rotate(270deg);
            }
        }

        /* ============================================
           MAIN CONTAINER
        ============================================ */
        .main-container {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* ============================================
           HEADER / NAVIGATION
        ============================================ */
        .header {
            padding: 1.5rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            backdrop-filter: blur(20px);
            background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
            position: sticky;
            top: 0;
            z-index: 100;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .logo {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.8rem;
            letter-spacing: 3px;
            color: #3B444B;
        }

        .stats-bar {
            display: flex;
            gap: 1.5rem;
            align-items: center;
            flex-wrap: wrap;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.2rem;
            min-width: 60px;
        }

        .stat-label {
            font-size: 0.65rem;
            letter-spacing: 1.5px;
            opacity: 0.6;
            text-transform: uppercase;
        }

        .stat-value {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.5rem;
            color: #3B444B;
        }

        /* ============================================
           LEARNING INTERFACE
        ============================================ */
        .learning-interface {
            flex: 1;
            display: grid;
            grid-template-columns: 320px 1fr;
            gap: 1.5rem;
            padding: 1.5rem 2rem;
            max-width: 1800px;
            margin: 0 auto;
            width: 100%;
            align-items: start;
        }

        /* ============================================
           AVATAR SECTION - LEFT (STICKY)
        ============================================ */
        .avatar-section {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            position: sticky;
            top: 100px;
            height: fit-content;
        }

        .avatar-container {
            position: relative;
            aspect-ratio: 1;
            background: linear-gradient(135deg, rgba(59, 68, 75, 0.1) 0%, rgba(10, 10, 10, 0.8) 100%);
            border-radius: 25px;
            border: 1px solid rgba(59, 68, 75, 0.2);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .avatar-canvas {
            width: 100%;
            height: 100%;
            position: relative;
        }

        /* SVG Avatar - Animated */
        .avatar-svg {
            width: 80%;
            height: 80%;
            margin: auto;
            display: block;
        }

        .avatar-head {
            transform-origin: center;
            animation: float 3s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .avatar-eyes {
            animation: blink 4s infinite;
        }

        @keyframes blink {
            0%, 95%, 100% { opacity: 1; }
            96%, 98% { opacity: 0; }
        }

        /* Avatar Status */
        .avatar-status {
            position: absolute;
            bottom: 1rem;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(59, 68, 75, 0.95);
            backdrop-filter: blur(10px);
            padding: 0.6rem 1.2rem;
            border-radius: 25px;
            font-size: 0.8rem;
            letter-spacing: 1.5px;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            white-space: nowrap;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #4CAF50;
            animation: pulse-dot 2s infinite;
            flex-shrink: 0;
        }

        @keyframes pulse-dot {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(1.2); }
        }

        /* Audio Visualizer */
        .audio-visualizer {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            height: 35px;
            padding: 0.5rem;
            background: rgba(59, 68, 75, 0.1);
            border-radius: 15px;
        }

        .audio-bar {
            width: 4px;
            height: 10px;
            background: #3B444B;
            border-radius: 2px;
            animation: audio-wave 0.8s ease-in-out infinite;
        }

        .audio-bar:nth-child(1) { animation-delay: 0s; }
        .audio-bar:nth-child(2) { animation-delay: 0.1s; }
        .audio-bar:nth-child(3) { animation-delay: 0.2s; }
        .audio-bar:nth-child(4) { animation-delay: 0.3s; }
        .audio-bar:nth-child(5) { animation-delay: 0.4s; }

        @keyframes audio-wave {
            0%, 100% { height: 10px; }
            50% { height: 35px; }
        }

        /* Controls - Improved Layout */
        .avatar-controls {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .control-btn {
            padding: 0.9rem 1.2rem;
            background: rgba(59, 68, 75, 0.15);
            border: 2px solid rgba(59, 68, 75, 0.3);
            border-radius: 15px;
            color: #fff;
            font-family: 'Montserrat', sans-serif;
            font-size: 0.85rem;
            font-weight: 600;
            letter-spacing: 1px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .control-btn:hover:not(:disabled) {
            background: rgba(59, 68, 75, 0.3);
            border-color: #3B444B;
            transform: translateY(-2px);
        }

        .control-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .control-btn.primary {
            background: #3B444B;
            border-color: #3B444B;
        }

        .control-btn.primary:hover {
            background: #4a5562;
        }

        /* Auto-next toggle - Integrated better */
        .auto-next-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.8rem;
            padding: 0.9rem 1.2rem;
            background: rgba(59, 68, 75, 0.15);
            border: 2px solid rgba(59, 68, 75, 0.3);
            border-radius: 15px;
            transition: all 0.3s ease;
        }

        .auto-next-toggle:hover {
            background: rgba(59, 68, 75, 0.25);
            border-color: #3B444B;
        }

        .toggle-switch {
            position: relative;
            width: 44px;
            height: 24px;
            display: inline-block;
            flex-shrink: 0;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(59, 68, 75, 0.3);
            border-radius: 24px;
            transition: 0.3s;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background: white;
            border-radius: 50%;
            transition: 0.3s;
        }

        .toggle-switch input:checked + .toggle-slider {
            background: #4CAF50;
        }

        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(20px);
        }

        .toggle-label {
            font-size: 0.85rem;
            font-weight: 600;
            letter-spacing: 1px;
            color: rgba(255, 255, 255, 0.8);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
        }

        .toggle-label i {
            color: #3B444B;
        }

        /* ============================================
           CHAT SECTION - RIGHT
        ============================================ */
        .chat-section {
            display: flex;
            flex-direction: column;
            background: rgba(13, 13, 18, 0.6);
            border-radius: 25px;
            border: 1px solid rgba(59, 68, 75, 0.2);
            overflow: hidden;
            backdrop-filter: blur(20px);
            height: calc(100vh - 180px);
            max-height: 850px;
        }

        .chat-header {
            padding: 1.5rem 2rem;
            border-bottom: 1px solid rgba(59, 68, 75, 0.2);
            background: rgba(0, 0, 0, 0.3);
        }

        .material-info h2 {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.6rem;
            letter-spacing: 2.5px;
            color: #3B444B;
            margin-bottom: 0.3rem;
        }

        .material-info p {
            font-size: 0.85rem;
            opacity: 0.7;
        }

        .chat-messages {
            flex: 1;
            padding: 1.5rem 2rem;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 1.2rem;
            scroll-behavior: smooth;
        }

        /* Custom Scrollbar */
        .chat-messages::-webkit-scrollbar {
            width: 6px;
        }

        .chat-messages::-webkit-scrollbar-track {
            background: rgba(59, 68, 75, 0.1);
            border-radius: 10px;
        }

        .chat-messages::-webkit-scrollbar-thumb {
            background: #3B444B;
            border-radius: 10px;
        }

        /* Message Bubbles */
        .message {
            display: flex;
            gap: 0.8rem;
            animation: messageSlideIn 0.5s ease;
            max-width: 100%;
        }

        @keyframes messageSlideIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .message.avatar-message {
            flex-direction: row;
        }

        .message.student-message {
            flex-direction: row-reverse;
        }

        .message-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3B444B, #4a5562);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            flex-shrink: 0;
        }

        .message-content {
            flex: 1;
            min-width: 0;
        }

        .message-bubble {
            padding: 1rem 1.3rem;
            border-radius: 18px;
            line-height: 1.6;
            position: relative;
            word-wrap: break-word;
        }

        .avatar-message .message-bubble {
            background: rgba(59, 68, 75, 0.2);
            border: 1px solid rgba(59, 68, 75, 0.3);
            border-bottom-left-radius: 5px;
        }

        .student-message .message-bubble {
            background: rgba(76, 175, 80, 0.15);
            border: 1px solid rgba(76, 175, 80, 0.3);
            border-bottom-right-radius: 5px;
            text-align: right;
        }

        .message-feedback {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.9rem;
            background: rgba(76, 175, 80, 0.2);
            border-radius: 15px;
            font-size: 0.8rem;
            margin-top: 0.5rem;
        }

        .message-feedback.incorrect {
            background: rgba(244, 67, 54, 0.2);
        }

        .message-time {
            font-size: 0.7rem;
            opacity: 0.5;
            margin-top: 0.4rem;
        }

        /* Chat Input - Better organized */
        .chat-input-container {
            padding: 1.5rem 2rem;
            border-top: 1px solid rgba(59, 68, 75, 0.2);
            background: rgba(0, 0, 0, 0.3);
        }

        .input-mode-toggle {
            display: flex;
            background: rgba(59, 68, 75, 0.2);
            border: 2px solid rgba(59, 68, 75, 0.3);
            border-radius: 50px;
            padding: 0.3rem;
            gap: 0.3rem;
            margin-bottom: 1rem;
        }

        .mode-btn {
            flex: 1;
            padding: 0.7rem 1.2rem;
            background: transparent;
            border: none;
            border-radius: 50px;
            color: rgba(255, 255, 255, 0.6);
            font-family: 'Montserrat', sans-serif;
            font-size: 0.85rem;
            font-weight: 600;
            letter-spacing: 1px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .mode-btn.active {
            background: #3B444B;
            color: #fff;
        }

        .mode-btn:hover:not(.active) {
            color: #fff;
            background: rgba(59, 68, 75, 0.1);
        }

        .input-wrapper {
            display: flex;
            gap: 0.8rem;
            align-items: center;
        }

        .chat-input {
            flex: 1;
            padding: 1rem 1.3rem;
            background: rgba(59, 68, 75, 0.1);
            border: 2px solid rgba(59, 68, 75, 0.3);
            border-radius: 25px;
            color: #fff;
            font-family: 'Montserrat', sans-serif;
            font-size: 0.95rem;
            outline: none;
            transition: all 0.3s ease;
        }

        .chat-input:focus {
            border-color: #3B444B;
            background: rgba(59, 68, 75, 0.15);
        }

        .send-btn, .voice-btn {
            width: 52px;
            height: 52px;
            border-radius: 50%;
            border: none;
            color: #fff;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .send-btn {
            background: #3B444B;
        }

        .send-btn:hover:not(:disabled) {
            background: #4a5562;
            transform: scale(1.1) rotate(15deg);
        }

        .send-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .voice-btn {
            background: rgba(59, 68, 75, 0.2);
            border: 2px solid rgba(59, 68, 75, 0.3);
            color: #3B444B;
        }

        .voice-btn:hover {
            background: #3B444B;
            color: #fff;
        }

        .voice-btn.recording {
            background: #F44336;
            border-color: #F44336;
            color: #fff;
            animation: pulse-recording 1s infinite;
        }

        @keyframes pulse-recording {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        /* ============================================
           UPLOAD MODAL - Improved
        ============================================ */
        .upload-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(20px);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .upload-modal.active {
            display: flex;
        }

        .upload-container {
            background: linear-gradient(135deg, #0d0d12 0%, #0a0a0a 100%);
            border: 1px solid rgba(59, 68, 75, 0.3);
            border-radius: 25px;
            padding: 2.5rem;
            max-width: 600px;
            width: 100%;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
        }

        .close-modal {
            position: absolute;
            top: 1.2rem;
            right: 1.2rem;
            width: 40px;
            height: 40px;
            background: rgba(59, 68, 75, 0.15);
            border: 1px solid rgba(59, 68, 75, 0.3);
            border-radius: 50%;
            color: #3B444B;
            font-size: 1.1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .close-modal:hover {
            background: #3B444B;
            color: #fff;
            transform: rotate(90deg);
        }

        .upload-header h2 {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 2.2rem;
            letter-spacing: 3px;
            color: #3B444B;
            margin-bottom: 0.8rem;
        }

        .upload-header p {
            opacity: 0.7;
            margin-bottom: 1.8rem;
            font-size: 0.9rem;
        }

        .upload-tabs {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.8rem;
            margin-bottom: 1.8rem;
        }

        .upload-tab {
            padding: 1rem;
            background: rgba(59, 68, 75, 0.1);
            border: 2px solid rgba(59, 68, 75, 0.2);
            border-radius: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .upload-tab.active {
            background: #3B444B;
            border-color: #3B444B;
        }

        .upload-tab i {
            display: block;
            font-size: 1.8rem;
            margin-bottom: 0.5rem;
        }

        .upload-tab div {
            font-size: 0.85rem;
            font-weight: 600;
        }

        .drop-zone {
            border: 2px dashed rgba(59, 68, 75, 0.5);
            border-radius: 20px;
            padding: 2.5rem 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 1.5rem;
        }

        .drop-zone:hover, .drop-zone.dragover {
            border-color: #3B444B;
            background: rgba(59, 68, 75, 0.1);
        }

        .drop-zone i {
            font-size: 2.5rem;
            color: #3B444B;
            margin-bottom: 1rem;
        }

        .drop-zone h3 {
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }

        .drop-zone p {
            font-size: 0.85rem;
            opacity: 0.7;
        }

        .submit-btn {
            width: 100%;
            padding: 1.1rem;
            background: #3B444B;
            border: none;
            border-radius: 50px;
            color: #fff;
            font-family: 'Montserrat', sans-serif;
            font-size: 0.95rem;
            font-weight: 600;
            letter-spacing: 2px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.8rem;
        }

        .submit-btn:hover {
            background: #4a5562;
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(59, 68, 75, 0.5);
        }

        /* Loading State */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(20px);
            z-index: 2000;
            display: none;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 2rem;
        }

        .loading-overlay.active {
            display: flex;
        }

        .loader {
            width: 70px;
            height: 70px;
            border: 4px solid rgba(59, 68, 75, 0.3);
            border-top-color: #3B444B;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .loading-text {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.4rem;
            letter-spacing: 3px;
            color: #3B444B;
        }

        /* ============================================
   VOICE RECORDING PANEL - Better positioned
   ============================================ */

.voice-recording-panel {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(59, 68, 75, 0.98), rgba(74, 85, 98, 0.98));
    border-radius: 25px;
    padding: 1.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    min-width: 450px;
    max-width: 90vw;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.voice-recording-panel.active {
    display: flex;
    animation: slideUpFade 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    color: #fff;
}

.recording-status i {
    font-size: 1.1rem;
    animation: pulse-icon 1.5s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.waveform-container {
    width: 100%;
    height: 70px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.8rem;
    position: relative;
    overflow: hidden;
}

.waveform-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.wave-bar {
    width: 4px;
    min-height: 8px;
    height: 8px;
    background: linear-gradient(180deg, #4CAF50, #66BB6A);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.live-transcript {
    width: 100%;
    min-height: 50px;
    max-height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 0.8rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-y: auto;
    position: relative;
}

.live-transcript::-webkit-scrollbar {
    width: 4px;
}

.live-transcript::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.live-transcript::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.transcript-interim {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.transcript-final {
    color: #fff;
}

.transcript-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.speech-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.speech-indicator.active {
    opacity: 1;
    animation: pulse-indicator 1s ease-in-out infinite;
}

@keyframes pulse-indicator {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    50% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
}

.voice-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    width: 100%;
}

.voice-control-btn {
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.voice-control-btn.stop {
    background: #F44336;
    color: #fff;
}

.voice-control-btn.stop:hover {
    background: #D32F2F;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.4);
}

.voice-control-btn.send {
    background: #4CAF50;
    color: #fff;
}

.voice-control-btn.send:hover:not(:disabled) {
    background: #45A049;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
}

.voice-control-btn.send:disabled {
    background: rgba(76, 175, 80, 0.3);
    cursor: not-allowed;
    transform: none;
}

.language-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 0.4rem 0.9rem;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.language-selector:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.voice-error-toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.98), rgba(211, 47, 47, 0.98));
    color: #fff;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    gap: 0.8rem;
    animation: slideDown 0.5s ease;
}

.voice-error-toast.show {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.voice-error-toast i {
    font-size: 1.3rem;
}

/* ============================================
   AVATAR SVG ANIMATIONS
============================================ */

.avatar-svg {
    width: 100%;
    height: 100%;
}

.bg-pulse {
    animation: bgPulse 3s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.05); }
}

.robot-head {
    transform-origin: 150px 150px;
    animation: robotFloat 4s ease-in-out infinite;
}

@keyframes robotFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.antenna {
    transform-origin: 150px 70px;
    animation: antennaBounce 2s ease-in-out infinite;
}

@keyframes antennaBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.antenna-light {
    animation: antennaPulse 1.5s ease-in-out infinite;
}

@keyframes antennaPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.antenna-glow {
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { 
        opacity: 0.8; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.3);
    }
}

.eyes {
    animation: eyeBlink 5s infinite;
}

@keyframes eyeBlink {
    0%, 90%, 100% { opacity: 1; }
    93%, 96% { opacity: 0.1; }
}

.eyelid-left, .eyelid-right {
    transition: height 0.1s ease;
}

.iris-left, .pupil-left,
.iris-right, .pupil-right {
    animation: eyeLook 8s ease-in-out infinite;
}

@keyframes eyeLook {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, 2px); }
    75% { transform: translate(2px, 2px); }
}

.iris-left, .iris-right {
    animation: irisGlow 2s ease-in-out infinite;
}

@keyframes irisGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.mouth-state {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mouth-state.active {
    opacity: 1;
}

.wave-line {
    animation: waveMove 0.8s ease-in-out infinite;
}

@keyframes waveMove {
    0%, 100% { 
        stroke-dashoffset: 0;
        opacity: 1;
    }
    50% { 
        stroke-dashoffset: 10;
        opacity: 0.7;
    }
}

.sound-wave-left, .sound-wave-right {
    animation: soundWave 1s ease-in-out infinite;
}

@keyframes soundWave {
    0%, 100% { 
        height: 30px;
        opacity: 0.6;
    }
    50% { 
        height: 40px;
        opacity: 1;
    }
}

.ear-panels {
    animation: earMove 3s ease-in-out infinite;
}

@keyframes earMove {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

#svga-group-mouth-single-move {
    transition: transform 0.1s ease-in-out;
}

#svga-group-mouth-single-move, 
#svga-group-eyebrows-left-move, 
#svga-group-eyebrows-right-move {
    transform-box: view-box !important;
    transform-origin: 100px 132px !important;
}

#svga-group-mouth-single-move, 
#svga-group-eyebrows-left-move, 
#svga-group-eyebrows-right-move,
#svga-group-eyes-left-move,
#svga-group-eyes-right-move {
    will-change: transform;
    transform-box: fill-box;
    transform-origin: center;
}

#svga-group-mouth-single-move {
    transform-origin: 100px 132px !important;
    transform-box: view-box !important;
    will-change: transform;
}

#mouth-bottom, #mouth-top {
    transition: transform 0.1s ease-out;
}

#mouth-hole {
    transform-origin: 100px 138px;
    transform-box: view-box;
}

#svga-group-humanwrap-move {
    transition: transform 0.2s ease-in-out;
    will-change: transform;
}

        /* ============================================
           RESPONSIVE - Mobile First
        ============================================ */
        
        /* Large Tablets */
        @media (max-width: 1200px) {
            .learning-interface {
                grid-template-columns: 280px 1fr;
                gap: 1.2rem;
            }
            
            .avatar-section {
                top: 90px;
            }
        }

        /* Tablets */
        @media (max-width: 1024px) {
            .learning-interface {
                grid-template-columns: 1fr;
                padding: 1rem;
            }

            .avatar-section {
                position: relative;
                top: 0;
                max-width: 400px;
                margin: 0 auto;
                order: -1;
            }

            .chat-section {
                height: calc(100vh - 300px);
                min-height: 500px;
            }
        }

        /* Mobile Landscape & Small Tablets */
        @media (max-width: 768px) {
            .header {
                padding: 1rem 1.5rem;
                gap: 0.8rem;
            }

            .logo {
                font-size: 1.5rem;
            }

            .stats-bar {
                gap: 1rem;
                width: 100%;
                justify-content: space-around;
            }

            .stat-item {
                min-width: auto;
            }

            .stat-label {
                font-size: 0.6rem;
            }

            .stat-value {
                font-size: 1.3rem;
            }

            .avatar-section {
                max-width: 100%;
                gap: 1rem;
            }

            .avatar-container {
                border-radius: 20px;
            }

            .avatar-status {
                font-size: 0.75rem;
                padding: 0.5rem 1rem;
            }

            .chat-section {
                border-radius: 20px;
                height: calc(100vh - 250px);
            }

            .chat-header {
                padding: 1.2rem 1.5rem;
            }

            .material-info h2 {
                font-size: 1.4rem;
            }

            .material-info p {
                font-size: 0.8rem;
            }

            .chat-messages {
                padding: 1.2rem 1.5rem;
                gap: 1rem;
            }

            .message-avatar {
                width: 38px;
                height: 38px;
                font-size: 1.1rem;
            }

            .message-bubble {
                padding: 0.9rem 1.1rem;
                font-size: 0.9rem;
            }

            .chat-input-container {
                padding: 1.2rem 1.5rem;
            }

            .mode-btn {
                padding: 0.6rem 1rem;
                font-size: 0.8rem;
            }

            .chat-input {
                padding: 0.9rem 1.1rem;
                font-size: 0.9rem;
            }

            .send-btn, .voice-btn {
                width: 48px;
                height: 48px;
                font-size: 1rem;
            }

            .voice-recording-panel {
                min-width: 90%;
                max-width: 95%;
                padding: 1.3rem 1.5rem;
                bottom: 1.5rem;
            }

            .waveform-container {
                height: 60px;
            }

            .voice-controls {
                gap: 0.6rem;
            }

            .voice-control-btn {
                padding: 0.8rem 1.2rem;
                font-size: 0.85rem;
            }

            .language-selector {
                position: relative;
                top: auto;
                right: auto;
                margin-bottom: 0.8rem;
                width: 100%;
                text-align: center;
            }

            .upload-container {
                padding: 2rem 1.5rem;
                border-radius: 20px;
            }

            .upload-header h2 {
                font-size: 1.9rem;
            }

            .upload-tabs {
                gap: 0.6rem;
            }

            .upload-tab {
                padding: 0.8rem;
            }

            .upload-tab i {
                font-size: 1.5rem;
            }

            .upload-tab div {
                font-size: 0.75rem;
            }
        }

        /* Mobile Portrait */
        @media (max-width: 480px) {
            .header {
                padding: 1rem;
            }

            .logo {
                font-size: 1.3rem;
            }

            .stats-bar {
                gap: 0.5rem;
            }

            .stat-label {
                font-size: 0.55rem;
                letter-spacing: 1px;
            }

            .stat-value {
                font-size: 1.2rem;
            }

            .learning-interface {
                padding: 0.8rem;
                gap: 1rem;
            }

            .avatar-status {
                font-size: 0.7rem;
                padding: 0.4rem 0.8rem;
                letter-spacing: 1px;
            }

            .status-dot {
                width: 6px;
                height: 6px;
            }

            .control-btn {
                padding: 0.8rem 1rem;
                font-size: 0.8rem;
            }

            .auto-next-toggle {
                padding: 0.8rem 1rem;
                gap: 0.6rem;
            }

            .toggle-switch {
                width: 40px;
                height: 22px;
            }

            .toggle-slider:before {
                height: 16px;
                width: 16px;
            }

            .toggle-switch input:checked + .toggle-slider:before {
                transform: translateX(18px);
            }

            .toggle-label {
                font-size: 0.8rem;
            }

            .chat-header {
                padding: 1rem 1.2rem;
            }

            .material-info h2 {
                font-size: 1.2rem;
            }

            .material-info p {
                font-size: 0.75rem;
            }

            .chat-messages {
                padding: 1rem 1.2rem;
            }

            .message-avatar {
                width: 35px;
                height: 35px;
                font-size: 1rem;
            }

            .message-bubble {
                padding: 0.8rem 1rem;
                font-size: 0.85rem;
            }

            .message-feedback {
                padding: 0.3rem 0.7rem;
                font-size: 0.75rem;
            }

            .chat-input-container {
                padding: 1rem 1.2rem;
            }

            .input-mode-toggle {
                margin-bottom: 0.8rem;
            }

            .mode-btn {
                padding: 0.6rem 0.8rem;
                font-size: 0.75rem;
            }

            .mode-btn span {
                display: none;
            }

            .chat-input {
                padding: 0.8rem 1rem;
                font-size: 0.85rem;
            }

            .send-btn, .voice-btn {
                width: 44px;
                height: 44px;
                font-size: 0.95rem;
            }

            .voice-recording-panel {
                padding: 1.2rem;
                bottom: 1rem;
                min-width: 95%;
            }

            .recording-status {
                font-size: 0.85rem;
            }

            .waveform-container {
                height: 50px;
            }

            .live-transcript {
                min-height: 45px;
                max-height: 100px;
                padding: 0.7rem 0.9rem;
                font-size: 0.85rem;
            }

            .voice-control-btn {
                padding: 0.7rem 1rem;
                font-size: 0.8rem;
            }

            .upload-container {
                padding: 1.8rem 1.2rem;
            }

            .upload-header h2 {
                font-size: 1.7rem;
            }

            .upload-header p {
                font-size: 0.85rem;
            }

            .upload-tabs {
                grid-template-columns: 1fr;
                gap: 0.5rem;
            }

            .upload-tab {
                display: grid;
                grid-template-columns: auto 1fr;
                align-items: center;
                gap: 1rem;
                padding: 0.8rem 1rem;
                text-align: left;
            }

            .upload-tab i {
                font-size: 1.8rem;
                margin-bottom: 0;
            }

            .upload-tab div {
                font-size: 0.85rem;
            }

            .drop-zone {
                padding: 2rem 1rem;
            }

            .drop-zone i {
                font-size: 2rem;
            }

            .drop-zone h3 {
                font-size: 1rem;
            }

            .drop-zone p {
                font-size: 0.8rem;
            }

            .submit-btn {
                padding: 1rem;
                font-size: 0.9rem;
            }
        }

        /* Extra Small Devices */
        @media (max-width: 360px) {
            .header {
                padding: 0.8rem;
            }

            .logo {
                font-size: 1.2rem;
            }

            .stat-value {
                font-size: 1.1rem;
            }

            .avatar-status {
                font-size: 0.65rem;
                padding: 0.35rem 0.7rem;
            }

            .chat-section {
                height: calc(100vh - 220px);
            }
        }

            .logo {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 2rem;
            letter-spacing: 3px;
            color: #3B444B;
        }

        .nav-links {
            display: flex;
            gap: 2rem;
            align-items: center;
        }

        .nav-link {
            color: rgba(255, 255, 255, 0.6);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            letter-spacing: 1px;
            transition: color 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-link:hover,
        .nav-link.active {
            color: #3B444B;
        }

        .user-menu {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .avatar-circle {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3B444B, #4a5562);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.2rem;
            letter-spacing: 2px;
        }


        /* ✅ Smooth mouth animations */
#svga-group-mouth-single-move {
    will-change: transform;
}

#mouth-hole {
    transition: opacity 0.1s ease-out, transform 0.1s ease-out !important;
}

.avatar-canvas.speaking #svga-group-mouth-single-move {
    transform-origin: 100px 138px;
}
/* ============================================
   FORM STYLING
============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-label i {
    color: #3B444B;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(13, 13, 18, 0.6);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(59, 68, 75, 0.3);
    border-radius: 15px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.form-input:hover {
    border-color: rgba(59, 68, 75, 0.5);
    background: rgba(13, 13, 18, 0.7);
}

.form-input:focus {
    border-color: #3B444B;
    background: rgba(13, 13, 18, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 68, 75, 0.15);
    transform: translateY(-1px);
}

/* Language Select Wrapper */
.language-select-wrapper {
    position: relative;
}

.language-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 3rem; /* Space for arrow */
    font-weight: 600;
}

.language-select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 1rem;
    font-weight: 500;
}

.language-select:hover {
    background: rgba(59, 68, 75, 0.2);
}

.language-select:focus {
    background: rgba(59, 68, 75, 0.25);
}

/* Custom Select Arrow */
.select-arrow {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #3B444B;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.language-select:focus ~ .select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #4a5562;
}

/* Textarea styling (if needed) */
textarea.form-input {
    min-height: 150px;
    resize: vertical;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .form-label {
        font-size: 0.9rem;
    }

    .form-input {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .select-arrow {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-label {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .form-label i {
        font-size: 1rem;
    }

    .form-input {
        padding: 0.85rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
}








/* Music Recording Panel */
.music-recording-panel {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(59, 68, 75, 0.98), rgba(74, 85, 98, 0.98));
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 600px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.music-recording-panel.active {
    display: flex;
    animation: slideUpFade 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.recording-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recording-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.recording-timer {
    font-family: 'Bebas Neue', monospace;
    font-size: 1.5rem;
    color: #4CAF50;
    letter-spacing: 2px;
}

/* Waveform Canvas */
.waveform-canvas {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Music Controls */
.music-controls {
    display: flex;
    gap: 1rem;
}

.music-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #fff;
}

.music-btn.record {
    background: linear-gradient(135deg, #F44336, #E53935);
}

.music-btn.stop {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.music-btn.playback {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.music-btn.submit {
    background: linear-gradient(135deg, #4CAF50, #45A049);
}

.music-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Analysis Results */
.analysis-results {
    background: rgba(59, 68, 75, 0.2);
    border: 1px solid rgba(59, 68, 75, 0.3);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.analysis-results h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #3B444B;
}

.score-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-label {
    min-width: 120px;
    font-size: 0.9rem;
    font-weight: 600;
}

.score-bar {
    flex: 1;
    height: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 10px;
    transition: width 1s ease;
}

.score-value {
    min-width: 50px;
    text-align: right;
    font-weight: 700;
    color: #4CAF50;
}

.score-overall {
    text-align: center;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    margin-top: 0.5rem;
}

.score-value-big {
    font-size: 2rem;
    font-weight: 700;
    color: #4CAF50;
    font-family: 'Bebas Neue', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .music-recording-panel {
        min-width: 90%;
        padding: 1.5rem;
    }

    .music-controls {
        flex-direction: column;
    }

    .waveform-canvas {
        height: 100px;
    }
}



/* Dodaj u glavni CSS */

/* Limit Reached Modal */
.limit-reached-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.limit-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.limit-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(13, 13, 18, 0.95), rgba(20, 20, 30, 0.95));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(244, 67, 54, 0.3);
    border-radius: 30px;
    padding: 3rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.limit-modal-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    border-radius: 50%;
 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
  
}

.limit-modal-content h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
   
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.limit-modal-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.limit-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.limit-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.limit-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.limit-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
   
    letter-spacing: 1px;
}

.limit-modal-buttons {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.limit-modal-buttons .btn {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
}

.btn-premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
}


/* ============================================
   HISTORY BANNER
============================================ */
.history-banner {
    background: linear-gradient(135deg, rgba(59, 68, 75, 0.15), rgba(59, 68, 75, 0.25));
    border: 1px solid rgba(59, 68, 75, 0.3);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: slideDown 0.5s ease;
}

.history-banner i {
    font-size: 2rem;
    color: #3B444B;
    flex-shrink: 0;
}

.history-banner > div {
    flex: 1;
}

.history-banner strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: #3B444B;
    display: block;
    margin-bottom: 0.25rem;
}

.history-banner p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

.start-new-btn {
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #3B444B, #4a5562);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.start-new-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 68, 75, 0.4);
}

/* History Separator */
.history-separator {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.history-separator::before,
.history-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(59, 68, 75, 0.3), transparent);
}

.history-separator::before {
    left: 0;
}

.history-separator::after {
    right: 0;
}

.history-separator span {
    background: rgba(13, 13, 18, 0.8);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(59, 68, 75, 0.3);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .history-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .start-new-btn {
        width: 100%;
        justify-content: center;
    }
}






/* ✅ EDITABLE TRANSCRIPT STYLES */
.transcript-container {
    position: relative;
    width: 100%;
}

.live-transcript-editable {
    width: 100%;
    min-height: 150px;
    padding: 1.5rem;
    background: rgba(59, 68, 75, 0.4);
    border: 2px solid rgba(59, 68, 75, 0.3);
    border-radius: 15px;
    color: rgb(247, 244, 239);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
}

.live-transcript-editable:focus {
    background: rgba(59, 68, 75, 0.15);
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.live-transcript-editable::placeholder {
    color: rgba(59, 68, 75, 0.4);
    font-style: italic;
}

/* Interim text (dok korisnik govori) */
.live-transcript-editable.interim {
    border-color: #4CAF50;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: #4CAF50;
    }
    50% {
        border-color: #66BB6A;
    }
}

/* Transcript hint (poruka ispod textarea) */
.transcript-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 10px;
    font-size: 0.85rem;
    color: #4CAF50;
}

.transcript-hint i {
    font-size: 0.9rem;
}











/* Dodaj u main.css */

#mouth-cavity,
#mouth-hole {
    transition: opacity 0.06s ease-out, transform 0.06s ease-out;
    opacity: 0;
}

/* Smooth transitions za lips */
.avatar-canvas svg path[id*="mouth"] {
    transition: transform 0.04s ease-out;
    transform-origin: center center;
}