/* Sticky Footer */
html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* School Registration Styling */
.plan-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.plan-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.plan-card.selected {
    border-color: #007bff;
    background-color: #f8f9ff;
}

#schoolFields {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #e3f2fd;
}

/* Bootstrap Dropdown Z-Index Fix */
.dropdown-menu {
    z-index: 9999 !important;
}

.btn-group .dropdown-menu {
    z-index: 9999 !important;
}

/* Allow containers to expand for dropdowns */
.card-body,
.meeting-controls {
    overflow: visible !important;
}

/* Sticky Footer */
footer {
    margin-top: auto;
}
.custom-file-input::-webkit-file-upload-button {
    visibility: hidden;
}
.custom-file-input::before {
    content: 'Choose File';
    display: inline-block;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    outline: none;
    white-space: nowrap;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
    transition: background 0.3s, transform 0.2s;
    cursor: pointer;
    margin-right: 10px;
}
.custom-file-input:hover::before {
    background: var(--gradient-secondary);
    color: #fff;
    transform: scale(1.04);
}
.custom-file-input:active::before {
    background: var(--primary-color);
    color: #fff;
    transform: scale(0.98);
}
.custom-file-input:focus::before {
    outline: 2px solid var(--primary-color);
}
.custom-file-input {
    color: #667eea;
    font-size: 1rem;
}
/* Remove default file input text for consistency */
.custom-file-input::-ms-browse {
    border: none;
    background: none;
}
/* For Firefox */
.custom-file-input::-moz-focus-inner {
    border: 0;
    padding: 0;
}
/* Luna Virtual Classroom Custom Styles */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Enhanced Hero Section */
.hero-section {
    background: var(--gradient-primary);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="30" cy="30" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="20" r="0.8" fill="rgba(255,255,255,0.08)"/><circle cx="70" cy="40" r="0.6" fill="rgba(255,255,255,0.06)"/><circle cx="90" cy="15" r="0.7" fill="rgba(255,255,255,0.07)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

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

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 0 5px;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Enhanced Cards */
.feature-icon {
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-radius: 15px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Button Enhancements */
.btn {
    transition: all 0.3s ease;
    border-radius: 10px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

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

.pulse-animation {
    animation: pulse 2s infinite;
}

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

/* Statistics Counter */
.stats-counter {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* CTA Section */
.cta-section {
    background: var(--gradient-secondary);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="0,0 100,20 100,100 0,80" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat;
    background-size: cover;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-elements .shape {
    position: absolute;
    opacity: 0.1;
    animation: floating 8s ease-in-out infinite;
}

.floating-elements .shape:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.floating-elements .shape:nth-child(2) {
    top: 60%;
    right: 20%;
    animation-delay: 3s;
}

.floating-elements .shape:nth-child(3) {
    bottom: 20%;
    left: 60%;
    animation-delay: 6s;
}

@keyframes floating {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.1;
    }
    33% { 
        transform: translateY(-30px) rotate(120deg); 
        opacity: 0.2;
    }
    66% { 
        transform: translateY(30px) rotate(240deg); 
        opacity: 0.05;
    }
}

/* Feature Badge Animations */
.badge {
    transition: all 0.3s ease;
}

.card:hover .badge {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Loading Animations */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .stats-counter {
        font-size: 2rem;
    }
    
    .testimonial-card {
        margin-bottom: 2rem;
    }
    
    .floating-elements .shape {
        display: none;
    }
}

/* Accessibility Improvements */
.btn:focus,
.card:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Video Grid Styles */
.video-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    min-height: 200px;
}

.participant-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video overlay styles moved to inline styles in meeting.html template */

.video-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.speaker-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* Chat Styles */
.chat-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

/* --- Student Dashboard: Mobile Polish (≤576px) --- */
@media (max-width: 576px) {
    /* Header: stack title and actions neatly */
    .container-fluid .row:first-child .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .container-fluid .row:first-child .d-flex.justify-content-between.align-items-center h2.fw-bold {
        font-size: 1.35rem;
        margin-bottom: 2px;
    }
    .container-fluid .row:first-child .d-flex.justify-content-between.align-items-center p.text-muted {
        font-size: 0.9rem;
    }
    .container-fluid .row:first-child .d-flex.gap-2 {
        flex-wrap: wrap;
        gap: 8px;
    }
    .container-fluid .row:first-child .d-flex.gap-2 > a.btn,
    .container-fluid .row:first-child .d-flex.gap-2 > button.btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 150px;
    }

    /* Cards: tighter paddings for small screens */
    .card .card-header { padding: 10px 12px; }
    .card .card-body { padding: 12px; }

    /* Quick stats blocks: ensure clear spacing */
    .card .card-body .d-flex.justify-content-between.align-items-center i { font-size: 1.4rem; }

    /* Live Sessions alert: readable, stacked */
    #liveSessionsAlert .alert {
        padding: 10px 12px;
    }
    #liveSessionsAlert .alert > .d-flex.align-items-center {
        flex-wrap: wrap;
        row-gap: 6px;
    }
    #liveSessionsAlert .alert .btn {
        width: 100%;
        margin-top: 8px;
    }

    /* Primary action buttons: comfortable touch targets */
    .btn.btn-lg { font-size: 1rem; padding: 12px; }

    /* See More button full-width for easy tapping */
    #seeMoreActivityBtn { width: 100%; }

    /* Subscriptions and other modals: utilize full screen height */
    #browseSubscriptionsModal .modal-dialog,
    #mySubscriptionsModal .modal-dialog,
    #myCoursesModal .modal-dialog,
    #classesTodayModal .modal-dialog,
    #enrolledCoursesModal .modal-dialog,
    #studyHoursModal .modal-dialog,
    #assignmentsDueModal .modal-dialog,
    #studentAssignmentsModal .modal-dialog {
        max-width: 100%;
        margin: 0;
    }
    #browseSubscriptionsModal .modal-content,
    #mySubscriptionsModal .modal-content,
    #myCoursesModal .modal-content,
    #classesTodayModal .modal-content,
    #enrolledCoursesModal .modal-content,
    #studyHoursModal .modal-content,
    #assignmentsDueModal .modal-content,
    #studentAssignmentsModal .modal-content {
        height: 100dvh;
        border-radius: 0;
    }
    #browseSubscriptionsModal .modal-body,
    #mySubscriptionsModal .modal-body,
    #myCoursesModal .modal-body,
    #classesTodayModal .modal-body,
    #enrolledCoursesModal .modal-body,
    #studyHoursModal .modal-body,
    #assignmentsDueModal .modal-body,
    #studentAssignmentsModal .modal-body {
        overflow: auto;
    }
    /* Subscriptions container: taller on phones */
    #subscriptionsContainer { max-height: 70vh; }

    /* Tighter spacing in lists */
    .list-group-item { padding: 10px 12px; }

    /* Student Dashboard specific refinements */
    #studentDashboard .card .card-body { padding: 12px; }
    #studentDashboard .card h6.card-title { font-size: 0.95rem; }
    #studentDashboard .card h3 { font-size: 1.35rem; }
    #studentDashboard .row.g-4 { row-gap: 0.75rem !important; }
    #studentDashboard .teacher-section { border-radius: 10px; padding: 8px 10px; }
    #studentDashboard #seeAllUpcomingBtn { margin-left: 8px; }

    /* Offcanvas Quick Actions */
    .offcanvas-quick-actions { width: 86vw; max-width: 420px; }
    .offcanvas-quick-actions .list-group-item { border: 0; padding: 14px 8px; }
    .offcanvas-quick-actions .list-group-item i { width: 22px; text-align: center; }
    .offcanvas-quick-actions .offcanvas-footer { color: #6c757d; }
}

.chat-message.own {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
}

.chat-message.other {
    background-color: #e9ecef;
    color: #333;
}

.chat-message .sender {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.chat-message .timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Broadcast Message Styles */
.chat-message.broadcast-message {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    color: #333;
    border: 2px solid #f39c12;
    margin: 10px 0;
    max-width: 100%;
    animation: broadcastPulse 2s ease-in-out;
}

.broadcast-sender {
    color: #d68910 !important;
    font-weight: 700;
}

.broadcast-text {
    font-weight: 600;
    margin-top: 5px;
}

.broadcast-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    animation: slideDown 0.5s ease-out;
}

@keyframes broadcastPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(243, 156, 18, 0.6);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Participant List Styles */
.participant-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.participant-item:last-child {
    border-bottom: none;
}

.participant-item.hand-raised {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 10px;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.participant-role {
    font-size: 0.8rem;
    color: #666;
}

.participant-status {
    font-size: 0.7rem;
    color: #999;
}

/* Control Buttons */
.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.control-btn:hover {
    transform: scale(1.1);
}

.control-btn.active {
    background-color: var(--danger-color) !important;
    color: white !important;
}

.control-btn.muted {
    background-color: var(--danger-color);
    color: white;
}

/* Whiteboard Styles */
.whiteboard-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 600px;
    background: white;
    cursor: crosshair;
    border-radius: 8px;
    z-index: 10;
    display: none;
}

.whiteboard-canvas {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border-radius: 8px;
    display: block;
}

.whiteboard-tools {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 20;
    max-width: 280px;
}

.tool-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.tool-group:last-child {
    margin-bottom: 0;
}

.tool-btn {
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.tool-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tool-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-right: 5px;
    white-space: nowrap;
}

.size-display {
    font-size: 11px;
    color: #666;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

#colorPicker {
    width: 45px;
    height: 35px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

#colorPicker:hover {
    border-color: var(--primary-color);
}

#sizeSlider, #eraserSizeSlider {
    width: 80px;
    margin: 0 5px;
}

/* Custom slider styles */
#sizeSlider::-webkit-slider-thumb,
#eraserSizeSlider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#sizeSlider::-moz-range-thumb,
#eraserSizeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Poll Styles */
.poll-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.poll-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.poll-option:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

.poll-option.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.poll-results {
    margin-top: 15px;
}

.poll-result-bar {
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.poll-result-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.5s ease;
}

.poll-result-text {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--success-color);
}

.product-price.free {
    color: var(--info-color);
}

/* Recording Controls */
.recording-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--danger-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr !important;
        height: 300px;
    }
    
    .hero-section {
        min-height: 400px;
        text-align: center;
    }
    
    .chat-container {
        height: 300px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin: 0 2px;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* --- Marketplace Modal & Form Enhancements --- */
.modal-content {
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.15), 0 1.5px 8px rgba(0,0,0,0.04);
    animation: fadeIn 0.5s cubic-bezier(.4,0,.2,1);
    border: none;
}

.modal-header, .modal-footer {
    border: none;
    background: linear-gradient(90deg, #f8f9fa 60%, #e9ecef 100%);
    border-radius: 18px 18px 0 0;
}

.modal-title {
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.2px;
    margin-bottom: 4px;
    transition: color 0.3s;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e0e6f7;
    box-shadow: 0 1px 4px rgba(102,126,234,0.04);
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 1.05rem;
    background: #f8faff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102,126,234,0.12);
    background: #fff;
}

.input-group-text {
    background: #e9ecef;
    border-radius: 0 10px 10px 0;
    border: 1.5px solid #e0e6f7;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-primary, .btn-outline-primary {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
    position: relative;
    overflow: hidden;
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
}

.btn-primary:hover, .btn-outline-primary:hover {
    background: var(--gradient-secondary);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 16px rgba(118,75,162,0.13);
}

.btn:active {
    transform: scale(0.98);
}

.modal-footer .btn-primary {
    min-width: 120px;
}

/* Animate form fields in modal */
#createProductModal .modal-body > .row, #createProductModal .modal-body > .mb-3, #createProductModal .modal-body > div {
    animation: slideUp 0.5s cubic-bezier(.4,0,.2,1);
    animation-fill-mode: both;
}

/* Session video cards (multi-session) */
#sessionVideosContainer .card {
    border-radius: 12px;
    background: #f8faff;
    border: 1.5px solid #e0e6f7;
    box-shadow: 0 1px 6px rgba(102,126,234,0.06);
    transition: box-shadow 0.3s, border-color 0.3s;
    margin-bottom: 10px;
    animation: fadeIn 0.4s;
}
#sessionVideosContainer .card:hover {
    box-shadow: 0 4px 16px rgba(102,126,234,0.13);
    border-color: var(--primary-color);
}

/* Add session button */
#addSessionBtn {
    margin-top: 8px;
    background: var(--gradient-secondary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}
#addSessionBtn:hover {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.05);
}

/* File input custom style */
.form-control[type="file"] {
    padding: 8px 10px;
    background: #f8faff;
    border-radius: 10px;
    border: 1.5px solid #e0e6f7;
    transition: border-color 0.3s;
}
.form-control[type="file"]:focus {
    border-color: var(--primary-color);
}

/* Responsive modal form */
@media (max-width: 768px) {
    .modal-content {
        border-radius: 10px;
    }
    .modal-header, .modal-footer {
        border-radius: 10px 10px 0 0;
    }
    .form-control, .form-select {
        font-size: 1rem;
    }
}

/* Subtle field highlight on hover */
.form-control:hover, .form-select:hover {
    border-color: var(--primary-color);
    background: #f3f6ff;
}

/* Animate modal open */
.modal.fade .modal-dialog {
    transform: translateY(40px) scale(0.98);
    opacity: 0;
    transition: all 0.4s cubic-bezier(.4,0,.2,1);
}
.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Room-Specific Styles */
.video-stage {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Screenshare fit utility: letterbox rather than crop */
video.fit-contain {
    object-fit: contain !important;
    background-color: #000;
}
/* Ensure main stage respects contain when toggled */
.main-video.fit-contain {
    object-fit: contain !important;
}

.no-video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 400px;
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 8px;
}

.main-video-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.participant-bubbles {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.video-bubble {
    width: 120px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #fff;
    position: relative;
    background: #000;
}

.video-bubble video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bubble-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    font-size: 0.8rem;
    text-align: center;
}

.fullscreen-controls {
    position: absolute;
    top: 10px;
    right: 10px;
}

.fullscreen-btn {
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}

.fullscreen-btn:hover {
    background: rgba(0,0,0,0.7);
}

.chat-container {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

/* Mobile Styles */
.mobile-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    font-size: 0.9rem;
}

.mobile-room-info {
    font-weight: 600;
}

.mobile-time-info {
    font-size: 0.8rem;
    opacity: 0.8;
}

.mobile-end-call-container {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
}

.mobile-end-call-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #dc3545;
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 10px;
    z-index: 1000;
    justify-content: space-around;
}

.mobile-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #f8f9fa;
    color: #333;
    font-size: 1.2rem;
    position: relative;
    transition: all 0.3s ease;
}

.mobile-nav-btn:hover,
.mobile-nav-btn.active {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.badge-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
}

.mobile-overlay.show {
    display: block;
}

.mobile-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 1600;
    transition: bottom 0.3s ease;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.mobile-panel.show {
    bottom: 0;
}

.mobile-panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.mobile-panel-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
}

.mobile-panel-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    padding: 5px;
}

.mobile-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modern-btn {
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
}

body.modal-open .card:hover,
body.modal-open .btn:hover {
    /* Disable the transform that causes the layout shift */
    transform: none;
    
    /* Optional: Reset the box-shadow to its non-hover state for consistency */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Specifically reset the button's hover shadow if needed */
body.modal-open .btn:hover {
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
}

/* Specifically reset the product card's hover shadow */
body.modal-open .product-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Specifically reset the course manage card's hover shadow */
body.modal-open .course-manage-card:hover {
    box-shadow: none;
    border-color: #e9ecef;
}

/* Raised Hands Panel */
.raised-hand-item {
    transition: background-color 0.2s;
}

.raised-hand-item:hover {
    background-color: #f8f9fa;
}

.raised-hand-item .participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.question-content {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
    border-left: 4px solid #ffc107;
}

.question-content p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #495057;
}

/* Voice Recording Modal */
.voice-recording-status {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#recordingTimer {
    font-size: 1.1rem;
    font-weight: bold;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

#recordedAudio {
    border-radius: 8px;
    margin-top: 10px;
}

.recording-controls button {
    margin: 0 5px;
}

/* Hand Raise Modal */
.nav-tabs .nav-link {
    border: none;
    background: none;
    color: #6c757d;
    padding: 10px 20px;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background: #007bff;
    color: white;
    border-radius: 8px;
}

.nav-tabs .nav-link:hover:not(.active) {
    background: #f8f9fa;
    color: #007bff;
}

.tab-content {
    border: none;
    padding: 20px 0;
}

#questionText {
    resize: vertical;
    min-height: 100px;
}

/* Screen Share Button Active State */
.btn#shareScreen.active {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn#shareScreen.active:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Enhanced Participant List for Raised Hands */
.participant-item.hand-raised {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.participant-item.hand-raised .participant-name::after {
    content: " ✋";
    color: #ffc107;
    font-size: 0.9rem;
}

/* Badge Improvements */
.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
    font-weight: 600;
}

/* Recording Indicator for Voice Messages */
.recording-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1060;
    animation: pulse 1s infinite;
}

.recording-indicator i {
    animation: pulse 2s infinite;
}

/* Mobile Responsiveness for Raised Hands */
@media (max-width: 991.98px) {
    .raised-hand-item {
        font-size: 0.9rem;
    }
    
    .raised-hand-item .participant-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .question-content {
        padding: 8px;
    }
}

/* Critical Echo Prevention - Visual indication for local video */
#localVideo {
    /* Add visual cue that this is the local (muted) video */
    border: 2px solid #28a745;
    border-radius: 8px;
}

/* Local video bubble styling */
#localVideoBubble .bubble-label {
    background-color: #28a745;
    color: white;
    font-weight: bold;
}

/* ==========================
   Recordings page styles
   (moved from templates/recordings.html)
   ========================== */

/* Page layout */
.container { max-width: 1180px; }

/* Header */
.d-flex.hdr { align-items:center; gap:12px; }

/* Recording card modern look */
.recording-card {
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff, #fbfbff);
    box-shadow: 0 6px 18px rgba(13,110,253,0.08);
    transition: transform 300ms cubic-bezier(.2,.9,.3,1), box-shadow 300ms;
    border: 1px solid rgba(13,110,253,0.06);
}
.recording-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 10px 30px rgba(18,23,40,0.08);
}
.recording-thumbnail {
    height: 220px;
    display:flex;
    align-items:center;
    justify-content:center;
    color: white;
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position:relative;
}
.recording-thumbnail::after{
    content: '';
    position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.12));
}
.recording-card .card-body { padding: 18px; }
.recording-card .card-footer { background:transparent; border-top: none; padding: 12px; }
.recording-meta { color: #6c757d; font-size: 0.9rem; }
.file-size { font-size: 0.82rem; color: #6c757d; }

/* Button style tweaks */
.btn:focus { box-shadow: 0 0 0 0.15rem rgba(13,110,253,0.12); }
.btn-primary { background: #0d6efd; border-color: #0d6efd; }
.btn-outline-secondary, .btn-outline-success { transition: all 180ms ease; }
.btn-outline-secondary:hover { transform: translateY(-2px); }

/* Advanced Features Styles */
.advanced-recording-features { position:relative; z-index:1; }
.transcript-content, .notes-content {
    max-height: 420px;
    overflow-y: auto;
    background-color: #f8f9fa;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.03);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height:1.6;
}
.transcript-text { color:#222; }
.notes-text h4, .notes-text h5, .notes-text h6 { margin-top: 1rem; margin-bottom: 0.5rem; }
.notes-text ul { margin-bottom: 1rem; padding-left: 1.2rem; }
.notes-text li { margin-bottom: 0.35rem; }
.notes-text strong { color: #0d6efd; }
.notes-text em { color: #6f42c1; }

/* Modal animations */
.modal.fade .modal-dialog { transform: translateY(12px); transition: transform 250ms cubic-bezier(.2,.9,.3,1); }
.modal.show .modal-dialog { transform: translateY(0); }

/* Buttons in cards */
.card .btn-group .btn { border-radius: 10px; }

/* Status / progress */
.progress-bar { transition: width 800ms ease; }
#statusMessage { font-size: 0.88rem; }

/* Subtle icon animation */
.icon-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%{ transform: scale(1); } 50%{ transform: scale(1.06);} 100%{ transform: scale(1);} }

/* Skeleton loader for loadingState */
.skeleton { background: linear-gradient(90deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Responsive tweaks */
@media (max-width: 768px) {
    .recording-thumbnail { height: 160px; font-size: 2.4rem; }
    .transcript-content, .notes-content { max-height: 280px; }
}

/* Export button subtle show */
#exportNotesBtn { border-radius: 8px; }

/* Improve table look in list view */
.table-hover tbody tr:hover { background: rgba(13,110,253,0.03); }

/* End recordings page styles */

/* Student Analytics Styles */
.analytics-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.analytics-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.overview-stat {
    text-align: center;
    padding: 1.5rem;
}

.overview-stat .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.overview-stat .stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-stat .stat-change {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: #28a745;
}

.stat-change.negative {
    color: #dc3545;
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

.performance-chart {
    height: 250px;
}

.analytics-tabs {
    border-bottom: 2px solid #f8f9fa;
    margin-bottom: 2rem;
}

.analytics-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.analytics-tabs .nav-link.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    background: none;
}

.analytics-tabs .nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.progress-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
}

.progress-item:last-child {
    border-bottom: none;
}

.progress-info h6 {
    margin: 0;
    color: #2c3e50;
}

.progress-info small {
    color: #6c757d;
}

.progress-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: rgba(102, 126, 234, 0.02);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-icon.class {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.activity-icon.assignment {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.activity-content h6 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
    font-size: 0.95rem;
}

.activity-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.activity-time {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-left: auto;
    flex-shrink: 0;
}

.achievement-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    color: #2d3436;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    margin: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.achievement-badge i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.goal-progress {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.goal-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#667eea 0deg, #667eea var(--progress-deg), #e9ecef var(--progress-deg), #e9ecef 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}

.goal-circle::before {
    content: '';
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: white;
    position: absolute;
}

.goal-circle .goal-text {
    position: relative;
    z-index: 1;
    font-weight: 700;
    color: #2c3e50;
}

.analytics-loading {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.analytics-error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 1rem;
}

/* Period selector */
.period-selector {
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.period-selector .btn {
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.period-selector .btn.active {
    background: #667eea;
    color: white;
}

.period-selector .btn:not(.active) {
    background: transparent;
    color: #6c757d;
}

.period-selector .btn:not(.active):hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* Broadcast Message Styles for Breakout Rooms */
.broadcast-message-section {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 600px;
}

.broadcast-carousel {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 2px solid #FF8C00;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
    animation: broadcastGlow 2s ease-in-out infinite alternate;
}

.broadcast-message-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.broadcast-header {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    padding: 8px 15px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.broadcast-content {
    padding: 15px;
    background: white;
    color: #333;
    font-size: 16px;
    line-height: 1.4;
    border-radius: 0 0 8px 8px;
}

.broadcast-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 140, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.broadcast-controls:hover {
    background: rgba(255, 140, 0, 1);
    transform: translateY(-50%) scale(1.1);
}

.broadcast-prev {
    left: -15px;
}

.broadcast-next {
    right: -15px;
}

.broadcast-indicator {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.broadcast-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.broadcast-close:hover {
    opacity: 1;
}

@keyframes broadcastGlow {
    0% {
        box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
    }
    100% {
        box-shadow: 0 12px 35px rgba(255, 140, 0, 0.6);
    }
}

/* Responsive analytics */
@media (max-width: 768px) {
    .analytics-header {
        padding: 1.5rem 0;
    }
    
    .overview-stat .stat-value {
        font-size: 2rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .activity-item {
        padding: 0.75rem;
    }
    
    .activity-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .goal-circle {
        width: 100px;
        height: 100px;
    }
    
    .goal-circle::before {
        width: 75px;
        height: 75px;
    }
    
    .broadcast-message-section {
        width: 95%;
        top: 80px;
    }
    
    .broadcast-controls {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* ==========================
   BREAKOUT ROOM OVERLAY UI STYLES
   ========================== */

/* Breakout Video Stage with Full Video Coverage */
.breakout-video-stage {
    position: relative;
    min-height: 500px;
    height: 60vh;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

/* Floating Participant Bubbles at Bottom of Video */
.breakout-participant-bubbles {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.breakout-video-bubble {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.8);
    background: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.breakout-video-bubble:hover {
    transform: scale(1.1);
    border-color: #007bff;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.breakout-video-bubble video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.breakout-bubble-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    white-space: nowrap;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Overlaid Chat Panel */
.breakout-chat-overlay {
    position: absolute;
    right: 15px;
    width: 350px;
    height: 60%;
    max-height: 70vh;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 15;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.breakout-chat-overlay.collapsed {
    height: 50px;
    max-height: 50px;
}

.breakout-chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breakout-chat-header h6 {
    margin: 0;
    flex-grow: 1;
    font-size: 0.9rem;
}

.breakout-chat-toggle {
    background: none;
    border: none;
    color: white;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.breakout-chat-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.breakout-chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(0, 0, 0, 0.25);
}

.breakout-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 0;
}

.breakout-chat-messages .chat-message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    color: white;
    font-size: 0.85rem;
}

.breakout-chat-messages .chat-message.system {
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.breakout-chat-input {
    flex-shrink: 0;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.breakout-chat-input .input-group {
    margin: 0;
}

.breakout-chat-input .form-control {
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: white;
}

.breakout-chat-input .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.breakout-chat-input .btn {
    font-size: 0.85rem;
}

/* Compact collapsed pill at bottom-right */
.breakout-chat-overlay.collapsed {
    height: 48px;
    max-height: 48px;
    width: 140px;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.breakout-chat-overlay.collapsed .breakout-chat-header {
    background: transparent;
    border-bottom: none;
    padding: 0 6px;
}

.breakout-chat-overlay.collapsed h6 { display: none; }

/* Group Members Info Panel - Top Right Corner */
.breakout-members-info {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.breakout-info-header {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Video Fullscreen Button */
.video-fullscreen-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 12;
}

.video-fullscreen-btn .btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.video-fullscreen-btn .btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.video-fullscreen-btn .btn:focus {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Hide fullscreen button when in fullscreen mode */
.breakout-video-stage:fullscreen .video-fullscreen-btn,
.breakout-video-stage:-webkit-full-screen .video-fullscreen-btn,
.breakout-video-stage:-moz-full-screen .video-fullscreen-btn {
    bottom: 80px;
}

/* Fullscreen styles */
.breakout-video-stage:fullscreen,
.breakout-video-stage:-webkit-full-screen,
.breakout-video-stage:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    background: #000;
}

.breakout-video-stage:fullscreen .main-video,
.breakout-video-stage:-webkit-full-screen .main-video,
.breakout-video-stage:-moz-full-screen .main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Chat overlay adjustments for fullscreen */
.breakout-video-stage:fullscreen .breakout-chat-overlay,
.breakout-video-stage:-webkit-full-screen .breakout-chat-overlay,
.breakout-video-stage:-moz-full-screen .breakout-chat-overlay {
    height: calc(100vh - 30px);
    width: 400px;
}

.breakout-video-stage:fullscreen .breakout-chat-overlay.collapsed,
.breakout-video-stage:-webkit-full-screen .breakout-chat-overlay.collapsed,
.breakout-video-stage:-moz-full-screen .breakout-chat-overlay.collapsed {
    height: 50px;
}

/* ========================================
   MEETING ROOM STYLES
   ======================================== */

/* Meeting-specific enhancements for professional appearance */
.meeting-container .control-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.meeting-container .control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.meeting-container .video-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.meeting-container .video-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.meeting-container .video-btn.danger {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
    color: #dc3545;
}

.meeting-container .video-btn.danger:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.6);
    color: #fff;
}

.meeting-container .chat-message {
    animation: slideInFromBottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.meeting-container .participant-video.speaking {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(40, 167, 69, 0.6);
    }
}

/* Meeting-specific scrollbar styling */
.meeting-container .chat-messages::-webkit-scrollbar {
    width: 6px;
}

.meeting-container .chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.meeting-container .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.meeting-container .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== MEETING STYLES ===== */
/* Additional styles for professional meeting interface */

.meeting-container {
    --meeting-primary: #667eea;
    --meeting-secondary: #764ba2;
    --meeting-success: #28a745;
    --meeting-danger: #dc3545;
    --meeting-warning: #ffc107;
    --meeting-info: #17a2b8;
}

/* Custom scrollbar for meeting components */
.meeting-container ::-webkit-scrollbar {
    width: 6px;
}

.meeting-container ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.meeting-container ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.meeting-container ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Enhanced video quality for meetings */
.meeting-container video {
    image-rendering: optimizeQuality;
    object-fit: cover;
}

/* Meeting status indicators */
.meeting-status-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--meeting-success);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse-online 2s infinite;
}

.meeting-status-offline {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #6c757d;
    border-radius: 50%;
    margin-right: 8px;
}

@keyframes pulse-online {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Meeting toast notifications */
.meeting-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    min-width: 300px;
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--meeting-primary);
    animation: slideInToast 0.3s ease;
}

.meeting-toast.success { border-left-color: var(--meeting-success); }
.meeting-toast.error { border-left-color: var(--meeting-danger); }
.meeting-toast.warning { border-left-color: var(--meeting-warning); }

@keyframes slideInToast {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Meeting loading states */
.meeting-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    gap: 10px;
}

.meeting-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Meeting participant animations */
.participant-joining {
    animation: fadeInParticipant 0.5s ease;
}

.participant-leaving {
    animation: fadeOutParticipant 0.3s ease;
}

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

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

/* Meeting responsive adjustments */
@media (max-width: 1200px) {
    .meeting-main {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 900px) {
    .meeting-header {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .meeting-title {
        font-size: 18px;
    }
    
    .meeting-controls {
        gap: 8px;
    }
    
    .control-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .meeting-main {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    /* Mobile video overlay styles are handled by inline styles in meeting.html */
    
    .meeting-container .video-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .participants-grid {
        gap: 10px;
    }
    
    .participant-video {
        min-width: 100px;
        height: 75px;
    }
}

/* Meeting accessibility improvements */
.meeting-container button:focus,
.meeting-container input:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.meeting-container .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Meeting high contrast mode support */
@media (prefers-contrast: high) {
    .meeting-container {
        --meeting-primary: #0066cc;
        --meeting-secondary: #004499;
    }
    
    .sidebar {
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .control-btn, .video-btn {
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
}

/* Meeting reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .meeting-container * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Meeting dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .meeting-toast {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }
}

/* ===== SUBSCRIPTION PAGE STYLING ===== */

/* Hero Section */
.subscription-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

/* Main Subscription Card */
.subscription-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
    margin-top: -2rem;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Teacher Avatar */
.teacher-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: -50px auto 1.5rem;
    position: relative;
}

/* Price Badge */
.price-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.price-badge.free {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
}

/* Class Information Section */
.class-info {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    font-size: 1.1rem;
}

/* Subscription Button */
.subscribe-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.subscribe-btn:disabled {
    opacity: 0.7;
    transform: none;
}

/* Login Prompt */
.login-prompt {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

/* Already Subscribed State */
.already-subscribed {
    background: linear-gradient(135deg, #55efc4 0%, #81ecec 100%);
    border: none;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.dashboard-btn {
    background: white;
    color: #00b894;
    border: 2px solid #00b894;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dashboard-btn:hover {
    background: #00b894;
    color: white;
    transform: translateY(-2px);
}

/* Feature Highlight */
.feature-highlight {
    background: white;
    border-left: 4px solid #667eea;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

/* School Badge */
.school-badge {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Payment Method Options */
.payment-option {
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #667eea !important;
    background: #f8f9ff;
}

input[type="radio"]:checked ~ .form-check-label .payment-option {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Checkout Modal Detail Items */
.detail-item {
    border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
    border-bottom: none;
}

/* Form Control Focus */
.subscription-page .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .subscription-hero {
        padding: 2rem 0;
    }
    
    .subscription-card {
        margin: 1rem;
        margin-top: -1rem;
        max-width: none;
    }
    
    .teacher-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin: -40px auto 1rem;
    }
    
    .container-fluid[style*="max-width: 80%"] {
        max-width: 95% !important;
        padding: 0 15px;
    }
}