/* AICoach.my Brand Guide - CSS Custom Properties */
:root {
    --navy: #0A2540;
    --navy-light: #1E3A5F;
    --gold: #D4AF37;
    --gold-light: #F4E4C1;
    --gray: #64748B;
    --gray-light: #F1F5F9;
    --white: #FFFFFF;
    --text: #1E293B;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Focus states for accessibility - Brand Guide */
*:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Update Notification Banner */
.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideDown 0.3s ease-out;
    border-bottom: 3px solid var(--gold);
}

.update-banner.hidden {
    display: none;
}

.update-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.update-icon {
    font-size: 1.5rem;
    animation: rotate 2s linear infinite;
}

.update-message {
    font-weight: 600;
    font-size: 1rem;
}

.update-button {
    background: var(--gold);
    color: var(--navy);
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.update-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
    background: #C19A2E;
}

.update-button:active {
    transform: translateY(0);
}

.dismiss-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dismiss-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

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

/* Mobile responsive for update banner */
@media (max-width: 768px) {
    .update-banner {
        padding: 10px 15px;
    }

    .update-content {
        gap: 10px;
    }

    .update-message {
        font-size: 0.9rem;
        flex-basis: 100%;
        text-align: center;
    }

    .update-icon {
        font-size: 1.2rem;
    }

    .update-button {
        padding: 6px 16px;
        font-size: 0.85rem;
    }

    .dismiss-button {
        padding: 4px 10px;
        font-size: 0.85rem;
    }
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* Mobile: Stack items vertically */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .header-container h1 {
        font-size: 2rem !important;
        text-align: center;
        justify-content: center;
    }

    .header-logo {
        height: 2rem;
    }
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 2.5rem;
    width: auto;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* User controls in header */
.header-container .user-state {
    position: relative;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Welcome Section */
.welcome-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.welcome-content {
    padding: 40px 30px;
    text-align: center;
}

.welcome-content h2 {
    color: var(--text);
    margin-bottom: 15px;
    font-size: 2rem;
    font-weight: 700;
}

.welcome-content > p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-card {
    background: #f8f9fc;
    padding: 30px 20px;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--text);
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.feature-card h3 span {
    font-weight: bold;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

.access-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.95rem;
}

.info-icon {
    font-size: 1.2rem;
}

.contact-note {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.contact-note p {
    color: #6b7280;
    font-size: 0.95rem;
}

.contact-note a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.contact-note a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Authentication Section */
.auth-section {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.login-state {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.25);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Ensure Google Sign-In button has proper styling */
.g_id_signin {
    width: 100% !important;
    min-height: 40px !important;
}

#g_id_onload {
    min-width: 200px;
}

.login-state p {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.user-state {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 25px;
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Header user info override */
.header-container .user-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    color: white;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--gold);
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.help-btn {
    background: #25D366;
    color: white;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-right: 6px;
    display: inline-block;
}

.help-btn:hover {
    background: #20BA5A;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.refresh-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-right: 6px;
}

.refresh-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Motivational Quote Banner */
.quote-banner {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--white) 100%);
    color: var(--navy);
    padding: 0;
    margin: 20px 0 30px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    display: none;
    position: relative;
    overflow: hidden;
}

.quote-banner.show {
    display: block;
}

.quote-banner.visible {
    opacity: 1;
    transform: translateY(0);
}

.quote-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
}

.quote-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

.quote-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quote-link {
    color: inherit;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 4px;
}

.quote-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quote-link:active {
    transform: translateY(0);
}

/* Quote banner responsive design */
@media (max-width: 768px) {
    .quote-banner {
        margin: 15px 0 20px 0;
        border-radius: 8px;
    }
    
    .quote-content {
        padding: 14px 16px;
    }
    
    .quote-icon {
        font-size: 20px;
        margin-right: 12px;
    }
    
    .quote-text {
        font-size: 14px;
    }
}

/* Controls - Hidden by default until authenticated */
.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-container {
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.filter-container {
    min-width: 150px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* Loading state */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error state */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-state h3 {
    margin-bottom: 10px;
}

.retry-button {
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background: rgba(255,255,255,0.3);
}

/* Recordings container */
.recordings-container, .slides-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.recordings-header, .slides-header, .sessions-header {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recordings-header h2, .slides-header h2, .sessions-header h2 {
    margin: 0;
    color: var(--text);
}

.recording-count, .slides-count, .sessions-count {
    background: var(--gold);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 12px;
}

/* User Profile Information */
.user-profile-info {
    background: rgba(255, 255, 255, 0.9);
    margin: 0 20px 10px 20px;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.profile-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    line-height: 1.2;
}

.profile-name {
    font-weight: 600;
    color: var(--text);
}

.profile-name:after {
    content: " • ";
    color: var(--gray);
    font-weight: 300;
}

.profile-group {
    font-weight: 500;
    color: var(--gold);
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 12px;
}

.profile-group:after {
    content: " • ";
    color: var(--gray);
    font-weight: 300;
    background: transparent;
    border: none;
    padding: 0;
}

.profile-level {
    font-weight: 500;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid rgba(40, 167, 69, 0.2);
    font-size: 12px;
}

.profile-level:after {
    content: " • ";
    color: var(--gray);
    font-weight: 300;
    background: transparent;
    border: none;
    padding: 0;
}

.profile-period {
    color: var(--gray);
    font-weight: 400;
    font-style: italic;
    font-size: 12px;
}

/* Tab Navigation - Chrome Style */
.tab-navigation {
    margin: 0 0 0 0;
    padding: 0 20px;
    background: transparent;
    border-bottom: none;
    position: relative;
}

.tab-buttons {
    display: flex;
    gap: 3px;
    margin: 0;
    padding: 0;
}

.tab-button {
    padding: 12px 24px 10px 24px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    min-width: 120px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-1px);
}

.tab-button.active {
    background: white;
    color: #2d3748;
    font-weight: 600;
    border-color: #e2e8f0;
    border-bottom: 1px solid white;
    z-index: 1;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.tab-button.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    opacity: 0.5;
}

.tab-button.disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    transform: none;
}

.tab-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 8px 8px 8px;
    min-height: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-panel {
    display: none;
    padding: 0;
}

.tab-panel.active {
    display: block;
}

.tab-panel .controls {
    padding: 20px 20px 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin: 0;
}

.tab-panel .recordings-container,
.tab-panel .no-results {
    padding: 20px;
}

/* Slides placeholder */
.slides-placeholder {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.slides-placeholder h2 {
    color: var(--text);
    margin: 0 0 15px 0;
    font-size: 1.8rem;
}

.slides-placeholder p {
    font-size: 1.1rem;
    margin: 0 0 25px 0;
}

.coming-soon {
    display: inline-block;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    color: #8b4513;
    border: 2px solid #e07b39;
}

/* User guide */
.user-guide {
    background: linear-gradient(135deg, #F0F7FF 0%, var(--gray-light) 50%, #FFF9F0 100%);
    color: var(--navy);
    padding: 20px 30px;
    margin-bottom: 20px;
    border-radius: 12px;
    border-left: 4px solid #4c51bf;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.user-guide h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.user-guide p {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
}

.user-guide strong {
    font-weight: 600;
    color: #e2e8f0;
}

/* Enhanced tip box styling */
.passcode-tip {
    margin-top: 15px;
    padding: 15px;
    background: #ffffff;
    color: #1a365d;
    border: 2px solid #4299e1;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
    text-align: center;
    position: relative;
    animation: tip-glow 3s ease-in-out infinite;
}

.passcode-tip strong {
    color: #2b6cb0;
    font-weight: 700;
}

@keyframes tip-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(66, 153, 225, 0.5);
    }
}

/* Recording, Slide, and Session items */
.recording-item, .slide-item, .session-item {
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.recording-item:hover, .slide-item:hover, .session-item:hover {
    background: #f8f9fa;
}

.recording-item:last-child, .slide-item:last-child, .session-item:last-child {
    border-bottom: none;
}

.recording-header, .slide-header, .session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.recording-info h3, .slide-info h3, .session-info h3 {
    margin: 0 0 5px 0;
    color: var(--text);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recording-meta, .slide-meta, .session-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--gray);
    flex-wrap: wrap;
}

.recording-summary {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
}

.recording-summary p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.recording-actions, .slide-actions, .session-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}


.action-button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

.watch-now {
    background: var(--gold);
    color: white;
}

.watch-now:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.view-slides {
    background: #f59e0b;
    color: white;
}

.view-slides:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.watch-slides {
    background: #8b5cf6;
    color: white;
}

.watch-slides:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.copy-passcode {
    background: #28a745;
    color: white;
}

.copy-passcode:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}


/* Session-specific styles */
.register-button.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.register-button.primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.register-button.primary.disabled,
.register-button.primary:disabled {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.register-button.primary.disabled:hover,
.register-button.primary:disabled:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    transform: none;
    box-shadow: none;
}

.calendar-button.disabled,
.calendar-button:disabled {
    background: #94a3b8;
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.calendar-button.disabled:hover,
.calendar-button:disabled:hover {
    background: #94a3b8;
    transform: none;
    box-shadow: none;
}

.view-calendar.secondary {
    background: #6b7280;
    color: white;
}

.view-calendar.secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.join-meeting {
    background: var(--gold);
    color: white;
}

.join-meeting:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.view-calendar {
    background: #6c757d;
    color: white;
}

.view-calendar:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Calendar sync styles */
.calendar-sync-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 20px 0;
    padding: 0 20px;
}

.sync-calendar-button {
    background: var(--gold);
    color: var(--navy);
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.sync-calendar-button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sync-calendar-button.disabled,
.sync-calendar-button:disabled {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.sync-calendar-button.disabled:hover,
.sync-calendar-button:disabled:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    transform: none;
    box-shadow: none;
}

.calendar-button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.calendar-button:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--gold);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 20px;
}

.calendar-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}

.calendar-option {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.calendar-option h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1.1rem;
}

.calendar-option ol, .calendar-option p {
    margin: 12px 0;
    color: #6c757d;
    line-height: 1.5;
}

.calendar-option li {
    margin-bottom: 6px;
}

.calendar-url-container {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    align-items: center;
}

.calendar-url-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: monospace;
    background: white;
}

.copy-url-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.copy-url-btn:hover {
    background: #4b5563;
}

.instructions-details {
    margin-top: 16px;
}

.instructions-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 8px;
}

.app-instructions {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
}

.app-instructions div {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

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

.session-description {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--gray);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.upcoming {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.today {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.past {
    background: #f5f5f5;
    color: #757575;
}

.past-session {
    opacity: 0.7;
}

.past-session .session-info h3 {
    color: var(--gray);
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Enhanced Video Access Modal */
#videoAccessModal .modal-body {
    padding: 30px;
}

.video-access-steps {
    margin-bottom: 30px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 12px;
    border-left: 4px solid var(--gold);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gold);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 18px;
}

.step-content p {
    margin: 0 0 15px 0;
    color: #4a5568;
    line-height: 1.5;
}

.passcode-display {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.passcode-display code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: var(--gold);
    background: none;
    padding: 0;
    letter-spacing: 1px;
}

.copy-btn {
    background: var(--gold);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #5a67d8;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.action-button.primary {
    background: var(--gold);
    color: var(--navy);
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
}

.action-button.primary:hover {
    background: #C19A2E;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.action-button.secondary {
    background: transparent;
    color: var(--gray);
    border: 2px solid var(--gray-light);
    padding: 14px 40px;
    font-size: 16px;
    border-radius: 5px;
}

.action-button.secondary:hover {
    background: var(--gray-light);
    color: var(--navy);
}

/* Toast notification - Persistent at top */
.toast {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc3545;
    color: white;
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    transform: translateY(-100%);
    opacity: 0;
    z-index: 1000;
    font-weight: 500;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Toast variants */
.toast.success {
    background: #28a745;
}

.toast.info {
    background: #17a2b8;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

.toast.error {
    background: #dc3545;
}

/* Close button for persistent messages */
.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    font-weight: bold;
    float: right;
    cursor: pointer;
    margin-left: 15px;
    opacity: 0.8;
}

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

/* Video guide toggle styles */
.guide-toggle {
    margin: 10px 0;
}

.toggle-btn {
    background: var(--gold);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.toggle-btn:hover {
    background: #5a6fd8;
}

.guide-steps {
    margin-top: 10px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid var(--gold);
}

.step {
    margin: 8px 0;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
}

.step:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.step strong {
    color: #1a202c;
    font-weight: 600;
}

.step kbd {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid #cbd5e0;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-logo {
        height: 1.8rem;
    }
    
    /* Mobile responsive modal */
    #videoAccessModal .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    #videoAccessModal .modal-body {
        padding: 20px;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 0 15px 0;
    }
    
    .passcode-display {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-button.primary,
    .action-button.secondary {
        width: 100%;
        text-align: center;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .recordings-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .recording-item {
        padding: 15px 20px;
    }
    
    .recording-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .recording-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .action-button {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .recording-actions, .slide-actions, .session-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100% !important;
        justify-content: center;
    }
    
    .register-button, .calendar-button {
        width: 100% !important;
        margin: 0;
        justify-content: center;
        min-height: 48px;
        padding: 12px 20px;
    }
    
    /* Mobile auth positioning */
    .auth-section {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 20px;
    }
    
    .user-info {
        gap: 6px;
        padding: 4px 8px;
    }

    /* Header user info mobile override */
    .header-container .user-info {
        padding: 6px 10px;
    }
    
    .user-name {
        font-size: 12px;
    }
    
    .help-btn,
    .refresh-btn,
    .logout-btn {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    /* Calendar sync mobile styles */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .calendar-url-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .calendar-url-container input {
        font-size: 12px;
    }
    
    .sync-calendar-button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .calendar-button {
        padding: 8px 12px;
        font-size: 14px;
        min-width: auto;
    }
    
    .calendar-sync-container {
        margin-top: 12px;
    }
}

/* NotebookLM Media Summary Styles */

/* Audio and Video Summary Action Buttons */
.action-button.audio-summary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
}

.action-button.audio-summary:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
}

.action-button.video-summary {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
}

.action-button.video-summary:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    transform: translateY(-2px);
}

/* Explainer Video Buttons */
.action-button.video-explainer {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
}

.action-button.video-explainer:hover {
    background: linear-gradient(135deg, #d35400, #c0392b);
    transform: translateY(-2px);
}

.action-button.video-explainer-chinese {
    background: linear-gradient(135deg, #c0392b, #8b0000);
    color: white;
    border: none;
}

.action-button.video-explainer-chinese:hover {
    background: linear-gradient(135deg, #8b0000, #6b0000);
    transform: translateY(-2px);
}

/* Media Modal Styles */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.media-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.media-modal-content.video-modal {
    max-width: 1000px;
}

.media-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.media-player {
    padding: 30px;
    background: #f8f9fa;
}

.media-player audio,
.media-player video {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    outline: none;
}

.media-player audio:focus,
.media-player video:focus {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.media-description {
    padding: 20px 30px 30px;
    background: white;
    color: var(--gray);
}

.media-description p {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
}

.media-description p:first-child {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

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

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

/* Mobile Media Modal Styles */
@media (max-width: 768px) {
    .media-modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 20px;
    }
    
    .media-header {
        padding: 16px 20px;
    }
    
    .media-header h3 {
        font-size: 1.1rem;
    }
    
    .close-modal {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
    
    .media-player {
        padding: 20px;
    }
    
    .media-description {
        padding: 16px 20px 20px;
    }
    
    .media-description p {
        font-size: 0.9rem;
    }
    
    /* Stack action buttons vertically on mobile for better spacing */
    .recording-actions, .slide-actions, .session-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-button {
        width: 100% !important;
        margin: 0;
        justify-content: center;
    }
    
    .register-button, .calendar-button {
        width: 100% !important;
        margin: 0;
        justify-content: center;
        min-height: 48px;
        padding: 12px 20px;
    }
}

/* Animation for close button hint */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Loading indicator for media players */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--gray-light) 0%, var(--white) 100%);
    border-radius: 8px;
    color: var(--navy);
}

.loading-indicator .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-indicator p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

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

/* Application Footer Styles */
.app-footer {
    position: relative;
    margin-top: 40px;
    padding: 20px 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    overflow: hidden;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-top-line {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

/* Version Information */
.version-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.version-number {
    color: #4ade80;
    font-weight: 600;
    font-size: 13px;
    background: rgba(74, 222, 128, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.version-separator {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

.build-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.back-to-top-prominent {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.back-to-top-prominent:hover {
    color: #4ade80;
    text-decoration: none;
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.2);
    transform: translateY(-1px);
}



/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-content {
        text-align: center;
        gap: 15px;
    }

    .version-info {
        justify-content: center;
        flex-wrap: wrap;
    }

    .app-footer {
        margin-top: 30px;
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .version-info {
        font-size: 11px;
        gap: 6px;
    }

    .version-number {
        font-size: 12px;
    }

    .build-date {
        font-size: 10px;
    }

    .back-to-top-prominent {
        font-size: 12px;
        padding: 3px 6px;
    }

    .app-footer {
        margin-top: 25px;
        padding: 12px 0;
    }
}

/* iPhone Video Player Styling */
#iphoneVideoPlayer {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    background: #000;
    border-radius: 8px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#iphoneVideoPlayer::-webkit-media-controls {
    -webkit-appearance: media-controls-background;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    bottom: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

#iphoneVideoPlayer::-webkit-media-controls-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    width: 100%;
    z-index: 0;
    overflow: hidden;
    text-align: right;
    bottom: auto;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0 0 8px 8px;
}

/* Ensure video fits properly in modal on iPhone */
@media screen and (max-width: 768px) {
    #iphoneVideoPlayer {
        max-height: 70vh;
        width: 100%;
        height: auto;
    }

    .modal-dialog.modal-lg {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .modal-content {
        background: #000;
        border: none;
        border-radius: 12px;
    }

    .modal-body {
        padding: 0;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 14px;
    color: var(--gray);
    margin-right: 15px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 36px;
    text-align: center;
}

.pagination-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pagination-btn.active {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}

.pagination-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-btn:disabled:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

/* Mobile responsive pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-info {
        margin-right: 0;
        order: 2;
    }

    .pagination-controls {
        order: 1;
    }

    .pagination-btn {
        padding: 10px 14px;
        min-width: 40px;
    }
}

/* ============================================================================
   YouTube Embedded Player Modal Styles
   ============================================================================ */

/* YouTube modal content - maximized to fill viewport */
#youtubePlayerModal .modal-content {
    max-width: 98vw;
    width: 98vw;
    max-height: 95vh;
    height: 95vh;
    background: #1a1a1a;
    overflow: hidden; /* Prevent scrolling */
    display: flex;
    flex-direction: column;
}

#youtubePlayerModal .modal-header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    flex-shrink: 0; /* Don't shrink header */
}

#youtubePlayerModal .modal-header h3 {
    color: #fff;
}

#youtubePlayerModal .modal-close {
    color: #fff;
}

#youtubePlayerModal .modal-close:hover {
    background: #333;
    color: #fff;
}

/* YouTube modal body - no padding for full-width iframe */
#youtubePlayerModal .modal-body {
    padding: 0;
    background: #000;
    flex: 1; /* Fill remaining space */
    overflow: hidden;
    display: flex;
}

/* YouTube player container with 16:9 aspect ratio */
.youtube-player-container {
    width: 100%;
    flex: 1; /* Fill remaining space */
    background: #000;
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
}

/* Disable right-click on player container */
.youtube-player-container {
    pointer-events: auto;
}

/* YouTube iframe - fill container */
.youtube-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile responsive YouTube modal */
@media (max-width: 768px) {
    #youtubePlayerModal .modal-content {
        width: 95vw;
        max-width: 95vw;
        max-height: 80vh;
        border-radius: 8px;
    }

    #youtubePlayerModal .modal-header {
        padding: 12px 16px;
        flex-shrink: 0; /* Don't shrink header */
    }

    #youtubePlayerModal .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Tablet responsive YouTube modal */
@media (min-width: 769px) and (max-width: 1024px) {
    #youtubePlayerModal .modal-content {
        width: 90vw;
        max-width: 900px;
    }
}

/* ============================================================================
   Google Drive Embedded Player Modal Styles
   ============================================================================ */

/* Google Drive modal content - maximized to fill viewport */
#drivePlayerModal .modal-content {
    max-width: 98vw;
    width: 98vw;
    max-height: 95vh;
    height: 95vh;
    background: #1a1a1a;
    overflow: hidden; /* Prevent scrolling */
    display: flex;
    flex-direction: column;
}

#drivePlayerModal .modal-header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    flex-shrink: 0; /* Don't shrink header */
}

#drivePlayerModal .modal-header h3 {
    color: #fff;
}

#drivePlayerModal .modal-close {
    color: #fff;
}

#drivePlayerModal .modal-close:hover {
    background: #333;
    color: #fff;
}

/* Google Drive modal body - no padding for full-width iframe */
#drivePlayerModal .modal-body {
    padding: 0;
    background: #000;
    flex: 1; /* Fill remaining space */
    overflow: hidden;
    display: flex;
}

/* Google Drive player container */
.drive-player-container {
    width: 100%;
    flex: 1; /* Fill remaining space */
    background: #000;
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
}

/* Disable right-click on player container */
.drive-player-container {
    pointer-events: auto;
}

/* Google Drive iframe - fill container */
.drive-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile responsive Google Drive modal */
@media (max-width: 768px) {
    #drivePlayerModal .modal-content {
        width: 95vw;
        max-width: 95vw;
        max-height: 80vh;
        border-radius: 8px;
    }

    #drivePlayerModal .modal-header {
        padding: 12px 16px;
        flex-shrink: 0; /* Don't shrink header */
    }

    #drivePlayerModal .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Tablet responsive Google Drive modal */
@media (min-width: 769px) and (max-width: 1024px) {
    #drivePlayerModal .modal-content {
        width: 90vw;
        max-width: 900px;
    }
}