* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Page content hidden until ready */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
    opacity: 0;
    transition: opacity 0.1s ease;
}

body.page-ready {
    opacity: 1;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.breadcrumb-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    min-width: max-content;
}

/* Hide scrollbar but keep functionality */
.breadcrumb::-webkit-scrollbar {
    height: 3px;
}

.breadcrumb::-webkit-scrollbar-track {
    background: transparent;
}

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

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

.breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb-separator {
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.breadcrumb-current {
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =====================
   UNIFIED PAGE HEADER
   ===================== */
.page-header-unified {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    flex-shrink: 0;
}

.page-header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-header-title h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.page-header-title span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border-radius: 25px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.06);
}

.page-header-user:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.1);
    color: #fff;
}

.page-header-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.page-header-username {
    font-size: 0.85rem;
    font-weight: 500;
}

.page-header-role {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    background: rgba(255, 152, 0, 0.15);
    color: #FF9800;
    border-radius: 10px;
    font-weight: 600;
}

.page-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.page-header-btn.btn-settings {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.08);
}

.page-header-btn.btn-settings:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.page-header-btn.btn-logout {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    border-color: rgba(255,255,255,0.08);
}

.page-header-btn.btn-logout:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}

.page-header-btn.btn-primary {
    background: linear-gradient(135deg, var(--primary-color, #4CAF50), #45a049);
    color: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.25);
}

.page-header-btn.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.35);
}

/* Mobile responsive header */
@media (max-width: 600px) {
    .page-header-inner {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .page-header-title h1 {
        font-size: 1rem;
    }
    
    .page-header-username {
        display: none;
    }
    
    .page-header-btn span {
        display: none;
    }
}

.header-controls {
    display: none;
    align-items: center;
    gap: 10px;
}

.back-to-semester {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.back-to-semester:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-3px);
}

.course-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin: 8px 0 20px 0;
    line-height: 1.3;
}

.admin-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.admin-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

/* Modern Rounded Flags */
.language-selector {
    display: flex;
    gap: 8px;
    visibility: hidden;
}

.language-selector.loaded {
    visibility: visible;
}

.lang-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    background-size: cover;
    background-position: center;
}

.lang-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.lang-btn:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

.lang-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.lang-btn.active {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3), 0 4px 15px rgba(0,0,0,0.3);
    transform: scale(1.1);
}

/* Flag Designs - Using actual flag images */
.flag-en {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0v30h60V0z'/%3E%3C/clipPath%3E%3CclipPath id='b'%3E%3Cpath d='M30 15h30v15zv15H0zH0V0zV0h30z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M0 0v30h60V0z' fill='%23012169'/%3E%3Cpath d='M0 0l60 30m0-30L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0 0l60 30m0-30L0 30' clip-path='url(%23b)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.flag-es {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 750 500'%3E%3Cpath fill='%23c60b1e' d='M0 0h750v500H0z'/%3E%3Cpath fill='%23ffc400' d='M0 125h750v250H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.flag-el {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 18'%3E%3Cpath fill='%230d5eaf' d='M0 0h27v18H0z'/%3E%3Cpath fill='%23fff' d='M0 2h27v2H0zm0 4h27v2H0zm0 4h27v2H0zm0 4h27v2H0zm0 4h27v2H0z'/%3E%3Cpath fill='%230d5eaf' d='M0 0h10v10H0z'/%3E%3Cpath fill='%23fff' d='M0 4h10v2H0zM4 0h2v10H4z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.flag-ar {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 6'%3E%3Cpath fill='%23007a3d' d='M0 0h12v2H0z'/%3E%3Cpath fill='%23fff' d='M0 2h12v2H0z'/%3E%3Cpath fill='%23000' d='M0 4h12v2H0z'/%3E%3Cpath fill='%23ce1126' d='M0 0l4 3-4 3z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.flag-it {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Cpath fill='%23009246' d='M0 0h1v2H0z'/%3E%3Cpath fill='%23fff' d='M1 0h1v2H1z'/%3E%3Cpath fill='%23ce2b37' d='M2 0h1v2H2z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.flag-sl {
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border-radius: 8px !important;
}

.flag-sl::before {
    content: '🤟';
}

/* German */
.flag-de {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 3'%3E%3Cpath d='M0 0h5v3H0z'/%3E%3Cpath fill='%23D00' d='M0 1h5v2H0z'/%3E%3Cpath fill='%23FFCE00' d='M0 2h5v1H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* French */
.flag-fr {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Cpath fill='%23002395' d='M0 0h1v2H0z'/%3E%3Cpath fill='%23fff' d='M1 0h1v2H1z'/%3E%3Cpath fill='%23ed2939' d='M2 0h1v2H2z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Portuguese */
.flag-pt {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 400'%3E%3Cpath fill='%23006600' d='M0 0h240v400H0z'/%3E%3Cpath fill='%23ff0000' d='M240 0h360v400H240z'/%3E%3Ccircle fill='%23ffff00' cx='240' cy='200' r='80'/%3E%3Ccircle fill='%23006600' cx='240' cy='200' r='60'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Dutch */
.flag-nl {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Cpath fill='%2321468B' d='M0 0h9v6H0z'/%3E%3Cpath fill='%23fff' d='M0 0h9v4H0z'/%3E%3Cpath fill='%23AE1C28' d='M0 0h9v2H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Polish */
.flag-pl {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath fill='%23fff' d='M0 0h16v10H0z'/%3E%3Cpath fill='%23dc143c' d='M0 5h16v5H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Russian */
.flag-ru {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Cpath fill='%23fff' d='M0 0h9v3H0z'/%3E%3Cpath fill='%230039A6' d='M0 2h9v2H0z'/%3E%3Cpath fill='%23D52B1E' d='M0 4h9v2H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Ukrainian */
.flag-uk {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%230057B7' d='M0 0h12v4H0z'/%3E%3Cpath fill='%23FFD700' d='M0 4h12v4H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Romanian */
.flag-ro {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Cpath fill='%23002B7F' d='M0 0h1v2H0z'/%3E%3Cpath fill='%23FCD116' d='M1 0h1v2H1z'/%3E%3Cpath fill='%23CE1126' d='M2 0h1v2H2z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Bulgarian */
.flag-bg {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 3'%3E%3Cpath fill='%23fff' d='M0 0h5v1H0z'/%3E%3Cpath fill='%2300966E' d='M0 1h5v1H0z'/%3E%3Cpath fill='%23D62612' d='M0 2h5v1H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Czech */
.flag-cs {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 4'%3E%3Cpath fill='%23fff' d='M0 0h6v2H0z'/%3E%3Cpath fill='%23d7141a' d='M0 2h6v2H0z'/%3E%3Cpath fill='%2311457e' d='M0 0l3 2-3 2z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Swedish */
.flag-sv {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath fill='%23006AA7' d='M0 0h16v10H0z'/%3E%3Cpath fill='%23FECC00' d='M5 0h2v10H5zM0 4h16v2H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Norwegian */
.flag-no {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 16'%3E%3Cpath fill='%23ba0c2f' d='M0 0h22v16H0z'/%3E%3Cpath fill='%23fff' d='M6 0h4v16H6zM0 6h22v4H0z'/%3E%3Cpath fill='%2300205b' d='M7 0h2v16H7zM0 7h22v2H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Finnish */
.flag-fi {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 11'%3E%3Cpath fill='%23fff' d='M0 0h18v11H0z'/%3E%3Cpath fill='%23003580' d='M5 0h3v11H5zM0 4h18v3H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Albanian */
.flag-sq {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 980 700'%3E%3Cpath fill='%23e41e20' d='M0 0h980v700H0z'/%3E%3Cpath d='M477.4 147.8l-23.7 32.3 12.8-3-7.5 35.9-21.9-17.8 7.5 14-34.7-10.8 28.2 22.4-12.1 1.3 28.4 32.1-37.4-18.6 8.2 11.4-27.2 1.3 25.2 14.7-36.8 7.5 30.3 8.2-9.5 10.8 27.8-2.1-27.1 21.2 14.6-3.6-16.5 34.6 29.2-29.2-1.4 15.3 28.5-23.1-11.2 37.8 14.6-9.5-2.1 27.8 10.8-9.5 8.2 30.3 7.5-36.8 14.7 25.2 1.3-27.2 11.4 8.2-18.6-37.4 32.1 28.4 1.3-12.1 22.4 28.2-10.8-34.7 14 7.5-17.8-21.9 35.9-7.5-3 12.8 32.3-23.7-27.8-27.8 32.3 23.7-3-12.8 35.9 7.5-21.9 17.8 7.5-14-34.7 10.8 28.2-22.4-12.1-1.3 28.4-32.1-37.4 18.6 8.2-11.4-27.2-1.3 25.2-14.7-36.8-7.5 30.3-8.2-9.5-10.8 27.8 2.1-27.1-21.2 14.6 3.6-16.5-34.6 29.2 29.2-1.4-15.3 28.5 23.1-11.2-37.8 14.6 9.5-2.1-27.8 10.8 9.5 8.2-30.3 7.5 36.8 14.7-25.2 1.3 27.2 11.4-8.2-18.6 37.4 32.1-28.4 1.3 12.1 22.4-28.2-10.8 34.7 14-7.5-17.8 21.9 35.9 7.5-3-12.8 32.3 23.7z' fill='%23000'/%3E%3C/svg%3E");
    background-size: 140%;
    background-position: center;
}

/* Turkish */
.flag-tr {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Cpath fill='%23e30a17' d='M0 0h1200v800H0z'/%3E%3Ccircle fill='%23fff' cx='425' cy='400' r='200'/%3E%3Ccircle fill='%23e30a17' cx='475' cy='400' r='160'/%3E%3Cpath fill='%23fff' d='M583.3 400l180 58.5-111.5-153v189L583.3 400l180-58.5z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Persian/Farsi - Iran */
.flag-fa {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 630 360'%3E%3Cpath fill='%23239f40' d='M0 0h630v120H0z'/%3E%3Cpath fill='%23fff' d='M0 120h630v120H0z'/%3E%3Cpath fill='%23da0000' d='M0 240h630v120H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Hebrew - Israel */
.flag-he {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 660 480'%3E%3Cpath fill='%23fff' d='M0 0h660v480H0z'/%3E%3Cpath fill='%230038b8' d='M0 55h660v50H0zM0 375h660v50H0z'/%3E%3Cpath fill='none' stroke='%230038b8' stroke-width='24' d='M330 164l-86 150h172z M330 316l-86-150h172z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Chinese */
.flag-zh {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600'%3E%3Cpath fill='%23de2910' d='M0 0h900v600H0z'/%3E%3Cpath fill='%23ffde00' d='M225 135l-45 138.2L300 183H150l120 90.2z'/%3E%3Cpath fill='%23ffde00' d='M360 75l6.4 44-24.3-37.5 43.4 11.3-41.9 16.1zM405 135l-16.1 41.9 11.3-43.4-37.5 24.3 44-6.4zM405 225l-41.9-16.1 43.4 11.3-24.3-37.5 6.4 44zM360 285l16.1-41.9-11.3 43.4 37.5-24.3-44 6.4z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Japanese */
.flag-ja {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600'%3E%3Cpath fill='%23fff' d='M0 0h900v600H0z'/%3E%3Ccircle fill='%23bc002d' cx='450' cy='300' r='180'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Korean */
.flag-ko {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600'%3E%3Cpath fill='%23fff' d='M0 0h900v600H0z'/%3E%3Ccircle fill='%23c60c30' cx='450' cy='300' r='150'/%3E%3Cpath fill='%230047a0' d='M450 300a75 75 0 0 1 0-150 75 75 0 0 0 0 150'/%3E%3Cpath fill='%23c60c30' d='M450 300a75 75 0 0 1 0 150 75 75 0 0 0 0-150'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Hindi - India */
.flag-hi {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600'%3E%3Cpath fill='%23FF9933' d='M0 0h900v200H0z'/%3E%3Cpath fill='%23fff' d='M0 200h900v200H0z'/%3E%3Cpath fill='%23138808' d='M0 400h900v200H0z'/%3E%3Ccircle cx='450' cy='300' r='55' fill='none' stroke='%23000080' stroke-width='6'/%3E%3Ccircle cx='450' cy='300' r='12' fill='%23000080'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Thai */
.flag-th {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600'%3E%3Cpath fill='%23A51931' d='M0 0h900v100H0zM0 500h900v100H0z'/%3E%3Cpath fill='%23F4F5F8' d='M0 100h900v100H0zM0 400h900v100H0z'/%3E%3Cpath fill='%232D2A4A' d='M0 200h900v200H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Vietnamese */
.flag-vi {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600'%3E%3Cpath fill='%23da251d' d='M0 0h900v600H0z'/%3E%3Cpath fill='%23ff0' d='M450 150l56.6 174.3-148.2-107.6h183.2L393.4 324.3z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Indonesian */
.flag-id {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Cpath fill='%23e70011' d='M0 0h3v1H0z'/%3E%3Cpath fill='%23fff' d='M0 1h3v1H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

/* Malay - Malaysia */
.flag-ms {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 14'%3E%3Cpath fill='%23cc0000' d='M0 0h28v1H0zm0 2h28v1H0zm0 4h28v1H0zm0 2h28v1H0zm0 4h28v1H0zm0 2h28v1H0z'/%3E%3Cpath fill='%23fff' d='M0 1h28v1H0zm0 2h28v2H0zm0 4h28v1H0zm0 2h28v2H0z'/%3E%3Cpath fill='%23010066' d='M0 0h14v8H0z'/%3E%3Ccircle fill='%23fc0' cx='5.5' cy='4' r='3'/%3E%3Ccircle fill='%23010066' cx='6.5' cy='4' r='2.5'/%3E%3Cpath fill='%23fc0' d='M8 1.5l.5 1.5H10L9 4l.5 1.5L8 4.5 6.5 5.5 7 4 6 3h1.5z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

#signLangBtn {
    width: 40px;
    height: 40px;
}

#signLangBtn::after {
    display: none;
}

/* Media Type Tabs */
.media-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.media-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.media-tab:first-child {
    border-radius: 10px 0 0 0;
}

.media-tab:last-child {
    border-radius: 0 10px 0 0;
}

.media-tab:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
}

.media-tab.active {
    background: #0f0f1a;
    border-bottom: 2px solid #4CAF50;
    color: #4CAF50;
}

.media-tab .media-icon {
    font-size: 1rem;
}

/* Content Containers */
.content-container {
    display: none;
    position: relative;
}

.content-container.active {
    display: block;
}

.content-container .video-section {
    border-radius: 0 0 12px 12px;
}

/* Uniform content area */
.content-area {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.content-area-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Override for SCORM/xAPI containers - they fill the parent */
.content-area-inner.scorm-container,
.content-area-inner.xapi-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

/* Audio Player Styles */
.audio-container {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.audio-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

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

.audio-container audio {
    width: 80%;
    max-width: 500px;
    margin-top: 15px;
}

.audio-title {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 5px;
}

/* No Content Message */
.no-content-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: rgba(255,255,255,0.5);
    text-align: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.no-content-message .no-content-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.6;
}

.no-content-message p {
    font-size: 1rem;
    margin: 0;
}

/* Mobile styles for audio/no-content */
@media (max-width: 600px) {
    .audio-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .audio-title {
        font-size: 0.85rem;
    }
    
    .audio-container audio {
        width: 90%;
        margin-top: 10px;
    }
    
    .no-content-message {
        padding: 15px;
    }
    
    .no-content-message .no-content-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .no-content-message p {
        font-size: 0.8rem;
    }
}

/* PDF Viewer Styles */
.pdf-container {
    background: #2a2a3e;
}

.pdf-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
}

.pdf-placeholder .pdf-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.pdf-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pdf-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* Quiz Styles */
.quiz-container {
    background: linear-gradient(135deg, #4a3f6b 0%, #2d2448 100%);
}

.quiz-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.quiz-ms-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
    color: #fff;
}

.quiz-ms-header {
    margin-bottom: 30px;
}

.quiz-ms-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.quiz-ms-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.quiz-ms-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quiz-ms-body > p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.quiz-ms-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.quiz-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    height: 100%;
    background: linear-gradient(135deg, #4a3f6b 0%, #2d2448 100%);
}

.quiz-placeholder .quiz-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.quiz-placeholder p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
}

/* SCORM Container Styles */
.scorm-container {
    background: linear-gradient(135deg, #2d5a3f 0%, #1a3d2a 100%);
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.scorm-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    z-index: 2;
}

.scorm-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    height: 100%;
    width: 100%;
    flex: 1;
    background: linear-gradient(135deg, #2d5a3f 0%, #1a3d2a 100%);
    box-sizing: border-box;
}

.scorm-placeholder .scorm-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.scorm-placeholder p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
}

.scorm-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.scorm-status.not-started {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.scorm-status.in-progress {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.scorm-status.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.scorm-status.passed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.scorm-status.failed {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.scorm-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.scorm-launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.scorm-info {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.scorm-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.9rem;
}

.scorm-info-item .label {
    color: rgba(255,255,255,0.6);
}

.scorm-info-item .value {
    color: #fff;
    font-weight: 600;
}

.scorm-launch-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    flex: 1;
    padding: 20px;
    text-align: center;
    color: #fff;
    box-sizing: border-box;
    overflow: auto;
    background: linear-gradient(135deg, #2d5a3f 0%, #1a3d2a 100%);
}

.scorm-launch-screen .scorm-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.scorm-launch-screen h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.scorm-exit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.scorm-exit-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
}

/* xAPI Styles */
.xapi-container {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    overflow: hidden;
}

.xapi-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 2;
}

.xapi-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    flex: 1;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

.xapi-placeholder .xapi-icon,
.xapi-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.xapi-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.xapi-status.not-started {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.xapi-status.in-progress {
    background: rgba(14, 165, 233, 0.2);
    color: #0ea5e9;
}

.xapi-status.completed {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.xapi-status.passed {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.xapi-status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.xapi-launch-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    flex: 1;
    padding: 20px;
    text-align: center;
    color: #fff;
    box-sizing: border-box;
    overflow: auto;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

.xapi-launch-screen .xapi-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.xapi-launch-screen h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
}

.xapi-info {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.xapi-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.9rem;
}

.xapi-info-item .label {
    color: rgba(255,255,255,0.6);
}

.xapi-info-item .value {
    color: #fff;
    font-weight: 600;
}

.xapi-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.5);
}

.xapi-launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(14, 165, 233, 0.6);
}

.xapi-exit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.xapi-exit-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
}

.quiz-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

.quiz-launch-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #7b8eee 0%, #8a5bb2 100%);
}

/* Custom Quiz System */
.quiz-start-screen,
.quiz-question-screen,
.quiz-results-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    color: #fff;
    text-align: center;
    overflow-y: auto;
    box-sizing: border-box;
}

.quiz-start-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.quiz-start-screen h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.quiz-start-info {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.quiz-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quiz-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.quiz-stat .stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
}

.quiz-best-score {
    margin-bottom: 15px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.quiz-begin-btn {
    padding: 12px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    flex-shrink: 0;
}

.quiz-begin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

/* Question Screen */
.quiz-question-screen {
    justify-content: flex-start;
    padding: 15px 20px;
    text-align: left;
}

.quiz-progress {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.quiz-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.quiz-question-num {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
}

.quiz-points {
    background: rgba(102, 126, 234, 0.3);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #a5b4fc;
}

.quiz-question-text {
    width: 100%;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #fff;
    flex-shrink: 0;
}

.quiz-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.quiz-option:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.25);
}

.quiz-option.selected {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.quiz-option .option-marker {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
    color: #fff;
    font-size: 0.9rem;
}

.quiz-option.selected .option-marker {
    background: #667eea;
    color: #fff;
}

.quiz-option .option-text {
    flex: 1;
    font-size: 0.95rem;
    color: #fff;
}

/* Quiz Navigation */
.quiz-nav-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
    margin-top: auto;
}

.quiz-nav-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-nav-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.25);
}

.quiz-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quiz-submit-btn {
    padding: 8px 18px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.quiz-nav-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 150px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-dot.answered {
    background: rgba(102, 126, 234, 0.6);
}

.nav-dot.current {
    background: #667eea;
    transform: scale(1.3);
}

/* Results Screen */
.results-header {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.results-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.results-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.results-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.results-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}

.results-points {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
}

.results-percent {
    display: flex;
    align-items: center;
    gap: 6px;
}

.results-percent .percent-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.results-percent .percent-status {
    font-size: 0.9rem;
}

.results-percent.passed {
    color: #4CAF50;
}

.results-percent.failed {
    color: #ef5350;
}

.results-score {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 3px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
}

.score-circle.passed {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.score-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.score-status.passed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.score-status.failed {
    background: rgba(239, 83, 80, 0.2);
    color: #ef5350;
}

.results-breakdown {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    text-align: left;
    min-height: 0;
}

.results-breakdown h3 {
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.6);
}

.result-question {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-left: 3px solid;
}

.result-question.correct {
    border-left-color: #4CAF50;
}

.result-question.incorrect {
    border-left-color: #ef5350;
}

.result-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.75rem;
}

.result-num {
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

.result-status {
    font-weight: 500;
}

.result-text {
    margin-bottom: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.result-answer {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.results-actions {
    flex-shrink: 0;
    padding-top: 10px;
}

.quiz-retry-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-retry-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.quiz-continue-btn {
    padding: 12px 30px;
    background: #4CAF50;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-continue-btn:hover {
    background: #43A047;
}

.redirect-message {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 400;
}

.redirect-message strong {
    color: rgba(255,255,255,0.9);
}

.redirect-progress {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.redirect-progress::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: #4CAF50;
    border-radius: 2px;
    animation: progressFill 8s ease-out forwards;
}

@keyframes progressFill {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.redirect-countdown {
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
}

.course-complete-message {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.quiz-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.quiz-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

/* External Assessment Button (inline in video-meta) */
.external-quiz-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    margin-left: auto;
}

.external-quiz-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.external-quiz-icon {
    font-size: 0.9rem;
}

.external-quiz-text {
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 480px) {
    .external-quiz-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* Quiz Player Light Mode */
body.light-mode .quiz-start-screen,
body.light-mode .quiz-question-screen,
body.light-mode .quiz-results-screen {
    color: #1d1d1f;
}

body.light-mode .quiz-start-screen h2,
body.light-mode .quiz-question-text {
    color: #1d1d1f;
}

body.light-mode .quiz-stat .stat-value {
    color: #1d1d1f;
}

body.light-mode .quiz-stat .stat-label {
    color: #6e6e73;
}

body.light-mode .quiz-best-score {
    background: rgba(0,0,0,0.06);
    color: #1d1d1f;
}

body.light-mode .quiz-progress {
    background: rgba(0,0,0,0.1);
}

body.light-mode .quiz-question-num {
    color: #6e6e73;
}

body.light-mode .quiz-points {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

body.light-mode .quiz-option {
    background: #fff;
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

body.light-mode .quiz-option:hover {
    background: #f8f8fa;
    border-color: rgba(0,0,0,0.2);
}

body.light-mode .quiz-option.selected {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

body.light-mode .quiz-option .option-marker {
    background: rgba(0,0,0,0.08);
    color: #1d1d1f;
}

body.light-mode .quiz-option.selected .option-marker {
    background: #667eea;
    color: #fff;
}

body.light-mode .quiz-option .option-text {
    color: #1d1d1f;
}

body.light-mode .quiz-nav-buttons {
    border-top-color: rgba(0,0,0,0.1);
}

body.light-mode .quiz-nav-btn {
    background: rgba(0,0,0,0.06);
    color: #1d1d1f;
}

body.light-mode .quiz-nav-btn:hover:not(:disabled) {
    background: rgba(0,0,0,0.1);
}

body.light-mode .nav-dot {
    background: rgba(0,0,0,0.15);
}

body.light-mode .nav-dot.answered {
    background: rgba(102, 126, 234, 0.5);
}

body.light-mode .results-header h2 {
    color: #1d1d1f;
}

body.light-mode .score-value {
    color: #1d1d1f;
}

body.light-mode .score-details {
    color: #6e6e73;
}

body.light-mode .score-status.passed {
    background: rgba(76, 175, 80, 0.15);
}

body.light-mode .score-status.failed {
    background: rgba(239, 83, 80, 0.15);
}

body.light-mode .results-breakdown h3 {
    color: #6e6e73;
}

body.light-mode .result-question {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

body.light-mode .result-num,
body.light-mode .result-answer {
    color: #6e6e73;
}

body.light-mode .result-text {
    color: #1d1d1f;
}

body.light-mode .quiz-retry-btn {
    border-color: rgba(0,0,0,0.2);
    color: #1d1d1f;
}

body.light-mode .quiz-retry-btn:hover {
    background: rgba(0,0,0,0.05);
}

body.light-mode .redirect-message {
    color: #6e6e73;
}

body.light-mode .redirect-message strong {
    color: #1d1d1f;
}

body.light-mode .redirect-countdown {
    color: #6e6e73;
}

body.light-mode .course-complete-message {
    color: #6e6e73;
}

body.light-mode .result-num {
    color: #6e6e73;
}

body.light-mode .result-text {
    color: #1d1d1f;
}

body.light-mode .result-answer {
    color: #6e6e73;
}

body.light-mode .quiz-container {
    background: linear-gradient(135deg, #e8e8ed 0%, #dcdce2 100%);
}

/* Video Player Section */
.video-section {
    background: #0f0f1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    margin-bottom: 25px;
}

.play-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.video-info {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.video-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-meta .sign-lang-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    background-size: cover;
    background-position: center;
}

.video-meta .sign-lang-btn:hover {
    border-color: #4CAF50;
    transform: scale(1.1);
}

.video-meta .sign-lang-btn.active {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.current-language {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(76, 175, 80, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #4CAF50;
}

.current-language .mini-flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.duration-badge {
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* Topics Section */
.topics-section {
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 25px;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 900px) {
    .topics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .topics-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .media-tab .media-label {
        display: none;
    }

    .media-tab {
        padding: 10px 12px;
    }

    .media-tab .media-icon {
        font-size: 1.1rem;
    }
}

.topic-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    position: relative;
}

.topic-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.topic-item.active {
    background: rgba(76, 175, 80, 0.15);
    border-color: #4CAF50;
}

.topic-number {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.topic-item.active .topic-number {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.topic-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.topic-item.locked:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.03);
}

.topic-item.locked .topic-number {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
}

.available-date {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 5px;
}

.topic-item.locked .available-date {
    color: #ff9800;
}

.topic-info {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.topic-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    text-align: left;
    width: 100%;
    line-height: 1.4;
}

.topic-status {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.2rem;
    width: 24px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Auth Page */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Course Selector */
.course-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.course-selector-overlay.hidden {
    display: none;
}

.course-selector-box {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.course-selector-header {
    text-align: center;
    padding: 30px 30px 20px;
}

.course-selector-header .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.course-selector-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.course-selector-header p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.course-selector-list {
    padding: 10px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

.course-selector-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.course-selector-item:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(76, 175, 80, 0.5);
    transform: translateX(5px);
}

.course-selector-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.course-selector-info {
    flex: 1;
}

.course-selector-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.course-selector-info p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.course-selector-arrow {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.3);
}

.course-selector-empty {
    padding: 30px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

.auth-overlay.hidden {
    display: none;
}

/* Loading state - hide login form until auth check completes */
.auth-overlay .auth-box {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.auth-overlay.auth-ready .auth-box {
    opacity: 1;
}

.auth-overlay .auth-loading {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.auth-overlay.auth-ready .auth-loading {
    display: none;
}

.auth-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary-color, #4CAF50);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-box {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.auth-header h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.auth-tab:hover:not(.active) {
    color: rgba(255,255,255,0.8);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.form-group input::placeholder {
    color: rgba(255,255,255,0.3);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.auth-error, .auth-success {
    display: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 15px;
}

.auth-error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    color: #f44336;
}

.auth-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.auth-error.show, .auth-success.show {
    display: block;
}

/* User Preferences Panel */
.preferences-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preferences-modal.active {
    display: flex;
}

.preferences-box {
    background: #1a1a2e;
    border-radius: 16px;
    width: 100%;
    max-width: 620px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.preferences-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #1a1a2e;
    z-index: 1;
}

.preferences-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preferences-body {
    padding: 20px;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .theme-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 450px) {
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.theme-card {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.theme-card.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.theme-card.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.theme-preview {
    height: 60px;
    display: flex;
    flex-direction: column;
}

.theme-preview-header {
    height: 14px;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.theme-preview-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-right: 3px;
}

.theme-preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
}

.theme-preview-accent {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

.theme-preview-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.theme-preview-line {
    height: 5px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
}

.theme-preview-line:first-child {
    width: 80%;
}

.theme-preview-line:last-child {
    width: 60%;
}

.theme-name {
    padding: 8px 6px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0,0,0,0.3);
}

.preferences-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
}

.preferences-footer .btn-primary {
    padding: 10px 30px;
    font-size: 0.9rem;
}

/* Hide admin button for non-admin users */
.admin-only {
    display: none;
}

.is-admin .admin-only {
    display: block;
}

.logout-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 0 14px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

.logout-btn.show {
    display: inline-flex;
}

/* Circular logout button */
.logout-circle {
    width: 42px;
    height: 42px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    color: #f87171;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-circle::before {
    content: "⎋";
    font-size: 1.1rem;
}

.logout-circle:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}

.user-badge {
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    padding: 0 14px;
    height: 36px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-badge:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.user-badge.show {
    display: flex;
}

/* Course Settings Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.admin-panel {
    background: #1a1a2e;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

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

.admin-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.topic-config {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.topic-config:last-child {
    margin-bottom: 0;
}

/* Non-collapsible settings sections */
.topic-config.settings-config {
    padding: 20px;
}

.topic-config.settings-config .topic-config-header {
    cursor: default;
    padding: 0;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.topic-config.settings-config .topic-config-header:hover {
    background: transparent;
}

.topic-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    user-select: none;
}

.topic-config-header:hover {
    background: rgba(255,255,255,0.05);
}

.topic-config-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-config-title span {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.topic-config-toggle {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: rgba(255,255,255,0.5);
}

.topic-config.expanded .topic-config-toggle {
    transform: rotate(180deg);
}

.topic-config-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 20px;
}

.topic-config.expanded .topic-config-body {
    max-height: 2000px;
    padding: 0 20px 20px 20px;
}

.topic-config-body-inner {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
}

/* Collapsible Language Sections */
.lang-section {
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.lang-section:last-child {
    margin-bottom: 0;
}

.lang-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    user-select: none;
}

.lang-section-header:hover {
    background: rgba(255,255,255,0.05);
}

.lang-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.lang-section-title .mini-flag {
    width: 24px;
    height: 24px;
}

.lang-section-preview {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin-left: 10px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-section-toggle {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: rgba(255,255,255,0.4);
}

.lang-section.expanded .lang-section-toggle {
    transform: rotate(180deg);
}

.lang-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 15px;
}

.lang-section.expanded .lang-section-body {
    max-height: 800px;
    overflow-y: auto;
    padding: 0 15px 15px 15px;
}

.lang-section-inputs {
    display: grid;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 12px;
}

.lang-section-inputs .lang-input-row {
    grid-template-columns: 80px 1fr !important;
}

.lang-section-inputs .lang-input-row.media-row {
    grid-template-columns: 80px 1fr 1fr !important;
}

.duration-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.duration-input-group label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.duration-input-group input {
    width: 80px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
}

.lang-inputs {
    display: grid;
    gap: 12px;
}

.lang-input-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: 12px;
    align-items: center;
}

.lang-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.lang-label .mini-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.lang-input-row input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-input-row input:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.lang-input-row input::placeholder {
    color: rgba(255,255,255,0.3);
}

.admin-footer {
    padding: 20px 25px;
    background: rgba(255,255,255,0.05);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Toggle Switch */
.toggle-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 20px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 500;
}

.toggle-label .icon {
    font-size: 1.3rem;
}

.toggle-description {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.2);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4CAF50;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-input-group label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}

.date-input-group input[type="date"] {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.9rem;
}

.date-input-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-add-topic {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 2px dashed rgba(76, 175, 80, 0.5);
    background: transparent;
    color: #4CAF50;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-topic:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.btn-remove-topic {
    background: rgba(244, 67, 54, 0.2);
    border: none;
    color: #f44336;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-topic:hover {
    background: rgba(244, 67, 54, 0.3);
}

.scorm-upload-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scorm-upload-group label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* Inline SCORM upload for language sections */
.scorm-upload-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.scorm-row {
    background: rgba(76, 175, 80, 0.05);
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 5px;
}

.btn-scorm-upload {
    background: rgba(76, 175, 80, 0.2);
    border: 1px dashed rgba(76, 175, 80, 0.5);
    color: #4CAF50;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-scorm-upload:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.3);
}

.scorm-upload-status {
    font-size: 0.8rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-import-excel,
.btn-export-excel,
.btn-template-excel {
    background: rgba(255, 152, 0, 0.2);
    border: 1px dashed rgba(255, 152, 0, 0.5);
    color: #FF9800;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-import-excel:hover {
    border-color: #FF9800;
    background: rgba(255, 152, 0, 0.3);
}

.btn-export-excel {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
    color: #4CAF50;
}

.btn-export-excel:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.3);
}

.btn-template-excel {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.5);
    color: #2196F3;
}

.btn-template-excel:hover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.3);
}

.btn-reset-course {
    background: rgba(244, 67, 54, 0.2);
    border: 1px dashed rgba(244, 67, 54, 0.5);
    color: #f44336;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-reset-course:hover {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.3);
}

.save-notice {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    z-index: 2000;
    animation: slideUp 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .lang-input-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .lang-label {
        padding-bottom: 5px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .header-controls {
        order: 1;
    }

    .language-selector {
        order: 2;
    }

    .course-title {
        font-size: 1.3rem;
        text-align: center;
        margin: 15px 0;
    }

    .lang-btn {
        width: 38px;
        height: 38px;
    }

    .video-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-panel {
        max-height: 95vh;
    }

    .admin-body {
        padding: 15px;
    }
}

/* =============================================
   QUIZ ADMIN PAGE STYLES
   ============================================= */

/* Header buttons - shared across pages */
.header-btn {
    border: none;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    padding: 0 14px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-weight: 500;
}

.header-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Quiz Admin Page */
.quiz-admin-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    min-height: calc(100vh - 60px);
}

.quiz-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.quiz-admin-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.header-actions .user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 40px;
    background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2));
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 10px;
    font-size: 0.9rem;
    color: #a5b4fc;
    font-weight: 500;
}

/* Quiz navigation selectors - Modern Card Style */
.quiz-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 30px;
    padding: 0;
    background: transparent;
    border: none;
}

.quiz-nav .select-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-nav .select-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    padding-left: 4px;
}

.quiz-nav select {
    padding: 16px 50px 16px 18px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.08);
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.05);
}

.quiz-nav select:hover:not(:disabled) {
    border-color: rgba(102,126,234,0.4);
    background-color: rgba(255,255,255,0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 0 0 1px rgba(102,126,234,0.1);
}

.quiz-nav select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15), 0 8px 25px rgba(0,0,0,0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.quiz-nav select:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quiz-nav select option {
    background: #1e1e2e;
    color: #fff;
    padding: 14px;
}

.quiz-nav select option:checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Selected state indicator */
.quiz-nav select:not([value=""]):valid {
    border-color: rgba(102,126,234,0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Responsive grid */
@media (max-width: 1200px) {
    .quiz-nav {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .quiz-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .quiz-nav {
        grid-template-columns: 1fr;
    }
}

/* Quiz editor */
.quiz-editor {
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.06);
}

.quiz-editor h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #fff;
}

/* Quiz Language Tabs */
.lang-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    padding: 6px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    width: fit-content;
}

.lang-tab {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-tab:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.lang-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.lang-hint {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 24px;
    padding: 10px 14px;
    background: rgba(102,126,234,0.1);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.translation-mode-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Original text display for translations */
.original-text {
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.original-text label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.original-text .original-content {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Translation option row */
.option-row.translation-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.option-text-translation {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.option-text-translation .original-option {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    padding-left: 2px;
}

.option-text-translation input {
    width: 100%;
}

.quiz-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 24px;
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.setting-group input,
.setting-group select {
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.setting-group input:focus,
.setting-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

.setting-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    cursor: pointer;
}

/* Questions list */
.questions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.questions-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.question-card {
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s ease;
}

.question-card:hover {
    border-color: rgba(102,126,234,0.3);
    background: rgba(255,255,255,0.05);
}

.question-card.editing {
    border-color: #667eea;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.question-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}

.question-actions {
    display: flex;
    gap: 8px;
}

.question-actions button {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-edit {
    background: rgba(102, 126, 234, 0.15);
    color: #a5b4fc;
}

.btn-delete {
    background: rgba(231, 76, 60, 0.15);
    color: #f87171;
}

.btn-edit:hover { 
    background: rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

.btn-delete:hover { 
    background: rgba(231, 76, 60, 0.25);
    transform: translateY(-1px);
}

.btn-edit:disabled,
.btn-delete:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.question-text {
    font-size: 1.05rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.question-text textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    color: #fff;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    transition: all 0.2s ease;
}

.question-text textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.options-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.options-list-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.08);
    transition: all 0.2s ease;
}

.option-row:hover {
    background: rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.15);
}

.option-row:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.option-letter {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.option-letter.correct {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    box-shadow: 0 2px 8px rgba(39,174,96,0.3);
}

.option-text {
    flex: 1;
    color: rgba(255,255,255,0.9);
}

.option-text input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.option-text input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.option-text input::placeholder {
    color: rgba(255,255,255,0.4);
}

.option-correct {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.option-correct:hover {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.8);
}

.option-correct input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Question type and points */
.question-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.question-meta select,
.question-meta input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.question-meta select:focus,
.question-meta input:focus {
    outline: none;
    border-color: #667eea;
}

.question-meta input[type="number"] {
    width: 80px;
}

.question-meta span {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

/* Add question button */
.add-question-btn {
    width: 100%;
    padding: 18px;
    border: 2px dashed rgba(102,126,234,0.3);
    border-radius: 14px;
    background: rgba(102,126,234,0.05);
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.add-question-btn:hover {
    border-color: #667eea;
    color: #fff;
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* Add option button */
.add-option-btn {
    padding: 10px 18px;
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.add-option-btn:hover {
    border-color: #667eea;
    color: #a5b4fc;
    background: rgba(102,126,234,0.1);
}

.remove-option-btn {
    padding: 6px 12px;
    background: rgba(231, 76, 60, 0.15);
    color: #f87171;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.remove-option-btn:hover {
    background: rgba(231, 76, 60, 0.25);
}

/* Save bar */
.save-bar {
    position: sticky;
    bottom: 20px;
    background: linear-gradient(135deg, rgba(30,30,45,0.95), rgba(20,20,35,0.98));
    backdrop-filter: blur(10px);
    padding: 18px 28px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.3), 0 4px 20px rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(255,255,255,0.08);
}

.save-bar-info {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    font-weight: 500;
}

.save-bar > div {
    display: flex;
    gap: 12px;
}

.save-bar button {
    padding: 12px 28px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.5);
}

.btn-cancel {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-cancel:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* Import info box */
.import-info {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.import-info h4 {
    margin-bottom: 10px;
    color: #667eea;
}

.import-info code {
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Dropzone for file upload */
.dropzone {
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.02);
}

.dropzone:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.dropzone.dragover {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.dropzone-content {
    pointer-events: none;
}

.dropzone .dropzone-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.dropzone p {
    margin: 0;
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

.dropzone .dropzone-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

/* Import status message */
.import-status {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.import-status.success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.import-status.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.import-status.loading {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #a5b4fc;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.5);
}

.empty-state .icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}

.empty-state p {
    color: rgba(255,255,255,0.4);
    font-size: 0.95rem;
}

/* Preview mode */
.preview-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    color: #333;
}

.preview-question {
    margin-bottom: 25px;
}

.preview-question h4 {
    margin-bottom: 15px;
    color: #333;
}

.preview-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.preview-option:hover {
    background: #f5f5f5;
}

.preview-option.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* No topic selected state */
.no-selection {
    text-align: center;
    padding: 100px 30px;
    background: rgba(255,255,255,0.02);
    border-radius: 16px;
    border: 2px dashed rgba(255,255,255,0.08);
}

.no-selection .icon {
    font-size: 4rem;
    margin-bottom: 24px;
    opacity: 0.5;
}

.no-selection h2 {
    font-size: 1.4rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 12px;
    font-weight: 600;
}

.no-selection p {
    color: rgba(255,255,255,0.4);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

.no-selection h2 {
    margin-bottom: 10px;
    color: rgba(255,255,255,0.8);
}

.no-selection p {
    color: rgba(255,255,255,0.5);
}

/* Quiz Admin Light Mode */
body.light-mode .quiz-nav .select-label {
    color: rgba(0,0,0,0.45);
}

body.light-mode .quiz-nav select {
    border-color: rgba(0,0,0,0.1);
    background: linear-gradient(145deg, #fff, #f8f9fa);
    color: #1d1d1f;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

body.light-mode .quiz-nav select:hover:not(:disabled) {
    border-color: rgba(102,126,234,0.4);
    background: linear-gradient(145deg, #fff, #f5f5f7);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08), 0 0 0 1px rgba(102,126,234,0.1);
}

body.light-mode .quiz-nav select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1), 0 8px 25px rgba(0,0,0,0.08);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

body.light-mode .quiz-nav select option {
    background: #fff;
    color: #1d1d1f;
}

body.light-mode .quiz-editor {
    background: #fff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

body.light-mode .quiz-settings {
    background: #f8f9fa;
    border-bottom-color: rgba(0,0,0,0.1);
}

body.light-mode .setting-group label {
    color: #6e6e73;
}

body.light-mode .setting-group input,
body.light-mode .setting-group select {
    border-color: rgba(0,0,0,0.12);
    background: #fff;
    color: #1d1d1f;
}

body.light-mode .setting-group input:focus,
body.light-mode .setting-group select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

body.light-mode .question-card {
    background: #f8f9fa;
    border-color: rgba(0,0,0,0.08);
}

body.light-mode .question-card:hover {
    border-color: rgba(102,126,234,0.3);
    background: #fff;
}

body.light-mode .question-text textarea {
    border-color: rgba(0,0,0,0.12);
    background: #fff;
    color: #1d1d1f;
}

body.light-mode .question-text textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

body.light-mode .option-row {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}

body.light-mode .option-row:hover {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.12);
}

body.light-mode .option-row:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

body.light-mode .option-letter {
    background: rgba(0,0,0,0.08);
    color: #1d1d1f;
}

body.light-mode .option-text {
    color: #1d1d1f;
}

body.light-mode .option-text input {
    border-color: rgba(0,0,0,0.12);
    background: #fff;
    color: #1d1d1f;
}

body.light-mode .option-text input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

body.light-mode .option-text input::placeholder {
    color: rgba(0,0,0,0.4);
}
    color: #1d1d1f;
}

body.light-mode .option-text input:focus {
    border-color: #667eea;
}

body.light-mode .option-correct {
    color: #6e6e73;
}

body.light-mode .option-correct:hover {
    background: rgba(0,0,0,0.05);
    color: #1d1d1f;
}

body.light-mode .question-meta select,
body.light-mode .question-meta input {
    border-color: rgba(0,0,0,0.12);
    background: #fff;
    color: #1d1d1f;
}

body.light-mode .question-meta select:focus,
body.light-mode .question-meta input:focus {
    border-color: #667eea;
}

body.light-mode .add-question-btn {
    border-color: rgba(102,126,234,0.25);
    background: rgba(102,126,234,0.03);
    color: #6e6e73;
}

body.light-mode .add-question-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

body.light-mode .add-option-btn {
    border-color: rgba(0,0,0,0.15);
    color: #6e6e73;
}

body.light-mode .add-option-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102,126,234,0.05);
}

body.light-mode .lang-tabs {
    background: rgba(0,0,0,0.04);
}

body.light-mode .lang-tab {
    color: #6e6e73;
}

body.light-mode .lang-tab:hover {
    background: rgba(0,0,0,0.06);
    color: #1d1d1f;
}

body.light-mode .lang-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

body.light-mode .lang-hint {
    background: rgba(102,126,234,0.08);
    color: #6e6e73;
}

body.light-mode .save-bar {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,249,250,0.98));
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 -4px 30px rgba(0,0,0,0.08), 0 4px 20px rgba(102, 126, 234, 0.1);
}

body.light-mode .save-bar-info {
    color: #6e6e73;
}

body.light-mode .btn-cancel {
    background: rgba(0,0,0,0.05);
    color: #6e6e73;
    border-color: rgba(0,0,0,0.1);
}

body.light-mode .btn-cancel:hover {
    background: rgba(0,0,0,0.08);
    color: #1d1d1f;
}

body.light-mode .no-selection {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.08);
}

body.light-mode .empty-state {
    color: #8e8e93;
}

body.light-mode .empty-state h3 {
    color: #6e6e73;
}

body.light-mode .empty-state p {
    color: #8e8e93;
}

body.light-mode .no-selection h2 {
    color: #1d1d1f;
}

body.light-mode .no-selection p {
    color: #6e6e73;
}

body.light-mode .no-selection .icon {
    opacity: 0.4;
}

body.light-mode .header-btn {
    background: rgba(0,0,0,0.05);
    color: #1d1d1f;
}

body.light-mode .header-btn:hover {
    background: rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

body.light-mode .header-actions .user-badge {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border: 1px solid rgba(102,126,234,0.2);
    color: #667eea;
}

body.light-mode .quiz-admin-header {
    border-bottom-color: rgba(0,0,0,0.08);
}

body.light-mode .quiz-admin-header h1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .logout-btn {
    background: rgba(0,0,0,0.08);
    color: #333;
}

body.light-mode .logout-btn:hover {
    background: rgba(0,0,0,0.12);
}

body.light-mode .logout-circle {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

body.light-mode .logout-circle:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Mobile Quiz Styles */
@media (max-width: 600px) {
    .quiz-start-screen,
    .quiz-question-screen,
    .quiz-results-screen {
        padding: 3px;
    }
	.quiz-progress {
		margin-bottom: 1px;
	}
	.quiz-header {
		margin-bottom: 2px
	}
	
    .quiz-start-screen h2 {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    
    .quiz-start-info {
        gap: 12px;
        margin-bottom: 10px;
    }
    
    .quiz-stat .stat-value {
        font-size: 0.8rem;
    }
    
    .quiz-stat .stat-label {
        font-size: 0.5rem;
    }
    
    .quiz-best-score {
        font-size: 0.6rem;
        padding: 6px 12px;
        margin-bottom: 10px;
    }
    
    .quiz-begin-btn {
        padding: 10px 30px;
        font-size: 0.7rem;
    }
    
    .quiz-question-screen {
        padding: 5px;
    }
    
    .quiz-question-num {
        font-size: 0.7rem;
    }
    
    .quiz-points {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .quiz-question-text {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
    
    .quiz-options {
        gap: 6px;
    }
    
    .quiz-option {
        padding: 2px 3px;
        font-size: 0.4rem;
    }
    
    .quiz-nav {
        padding-top: 2px;
        gap: 2px;
		margin-top: 2px;
    }
    
    .quiz-nav button {
		padding-top: 3px;
        padding: 2px 4px;
        font-size: 0.8rem;
    }
    
    .results-header-row {
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    
    .results-label {
        font-size: 0.5rem;
    }
    
    .results-points {
        font-size: 0.5rem;
    }
    
    .results-percent .percent-value {
        font-size: 0.6rem;
    }
    
    .results-percent .percent-status {
        font-size: 0.5rem;
    }
    
    .results-breakdown {
        margin-bottom: 8px;
    }
    
    .results-breakdown h3 {
        font-size: 0.5rem;
        margin-bottom: 6px;
    }
    
    .result-question {
        padding: 6px 8px;
        margin-bottom: 5px;
    }
    
    .result-header {
        font-size: 0.4rem;
        margin-bottom: 3px;
    }
    
    .result-text {
        font-size: 0.5rem;
        margin-bottom: 3px;
    }
    
    .result-answer {
        font-size: 0.5rem;
    }
    
    .results-actions {
        padding-top: 6px;
    }
    
    .quiz-retry-btn,
    .quiz-continue-btn {
        padding: 8px 16px;
        font-size: 0.6rem;
    }
}

/* =====================
   QUICK MODE STYLES
   ===================== */

.quick-mode-btn {
    background: linear-gradient(135deg, #ff6b6b, #feca57) !important;
    color: #000 !important;
}

.quick-mode-btn:hover {
    background: linear-gradient(135deg, #ee5a5a, #fdba45) !important;
}

/* Quick Mode Settings in Course Settings */
.quick-mode-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 107, 107, 0.3);
}

.quick-mode-section-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ff6b6b;
    margin-bottom: 12px;
}

.quick-quiz-config {
    background: rgba(255, 107, 107, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
}

.quick-quiz-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.quick-quiz-config > input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.quick-quiz-options {
    display: grid;
    gap: 8px;
}

.quick-quiz-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-quiz-option-row label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    min-width: 35px;
    cursor: pointer;
}

.quick-quiz-option-row input[type="radio"] {
    accent-color: #ff6b6b;
}

.quick-quiz-option-row input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 0.85rem;
}

.quick-quiz-option-row input[type="text"]:focus {
    outline: none;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.quick-settings-body {
    padding: 0;
}

.quick-settings-body .toggle-section {
    margin: 0;
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-settings-body .toggle-section:last-child {
    border-bottom: none;
}

/* Quick Mode mobile adjustments */
@media (max-width: 768px) {
    .quick-quiz-option-row {
        flex-wrap: wrap;
    }
    
    .quick-quiz-option-row label {
        min-width: 30px;
    }
    
    .quick-quiz-option-row input[type="text"] {
        width: 100%;
        flex: none;
    }
}

.quick-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 9999;
    display: none;
    flex-direction: column;
}

.quick-mode-overlay.active {
    display: flex;
}

.quick-mode-header {
    display: none;
}

/* Floating close button */
.quick-mode-overlay > .quick-mode-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.quick-mode-overlay > .quick-mode-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Floating progress badge */
.quick-mode-progress-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 50;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Old header close button - now using floating button above */

.quick-mode-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.quick-mode-topic-num {
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.quick-mode-topic-title {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-mode-progress {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.quick-mode-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    outline: none;
    border: none;
}

.quick-mode-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.quick-mode-slide.prev {
    transform: translateY(-100%);
    opacity: 0;
}

.quick-mode-slide.current {
    transform: translateY(0);
    opacity: 1;
}

.quick-mode-slide.next {
    transform: translateY(100%);
    opacity: 0;
}

.quick-mode-video-wrapper {
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

.quick-mode-video-wrapper video,
.quick-mode-video-wrapper iframe {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    outline: none;
}

.quick-mode-video-wrapper video:focus,
.quick-mode-video-wrapper iframe:focus {
    outline: none;
    border: none;
}

/* Touch overlay for swipe navigation on mobile */
.quick-mode-touch-overlay {
    display: none;
}

@media (max-width: 768px) {
    .quick-mode-touch-overlay {
        display: block;
        position: absolute;
        top: 70px; /* Leave space for close button */
        left: 0;
        right: 80px; /* Leave space for nav buttons on right */
        bottom: 180px; /* Leave space for quiz button and nav */
        z-index: 5;
        background: transparent;
        pointer-events: auto;
    }
}

/* TikTok-style mute toggle icon */
.quick-mode-mute-toggle {
    position: absolute;
    bottom: 200px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.quick-mode-mute-toggle svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.quick-mode-mute-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
}

.quick-mode-mute-toggle:active {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(0.95);
}

.quick-mode-mute-toggle.muted {
    background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 480px) {
    .quick-mode-mute-toggle {
        bottom: 190px;
        right: 15px;
        width: 52px;
        height: 52px;
    }
    
    .quick-mode-mute-toggle svg {
        width: 26px;
        height: 26px;
    }
}

.quick-mode-nav {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 30;
}

.quick-nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    padding: 12px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.quick-nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.quick-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Quick Quiz Overlay */
.quick-quiz-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 20px;
}

.quick-quiz-overlay.active {
    display: flex;
}

.quick-quiz-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.quick-quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    font-weight: 700;
    font-size: 1.1rem;
}

.quick-quiz-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

.quick-quiz-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.quick-quiz-question {
    margin-bottom: 25px;
}

.quick-quiz-question:last-child {
    margin-bottom: 0;
}

.quick-quiz-question-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.quick-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-quiz-option:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.quick-quiz-option.selected {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.quick-quiz-option.correct {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}

.quick-quiz-option.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
}

.quick-quiz-option input {
    display: none;
}

.quick-quiz-option-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.quick-quiz-option.selected .quick-quiz-option-marker {
    background: #667eea;
    border-color: #667eea;
}

.quick-quiz-option.correct .quick-quiz-option-marker {
    background: #4CAF50;
    border-color: #4CAF50;
}

.quick-quiz-option.incorrect .quick-quiz-option-marker {
    background: #f44336;
    border-color: #f44336;
}

.quick-quiz-option-text {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
}

.quick-quiz-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
}

.quick-quiz-footer .btn {
    min-width: 150px;
}

.quick-quiz-result {
    text-align: center;
    padding: 30px;
}

.quick-quiz-result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.quick-quiz-result-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.quick-quiz-result-score {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
}

/* Quiz Trigger Button */
.quick-quiz-trigger {
    position: absolute;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: #fff;
    padding: 15px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 30;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.quick-quiz-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

/* Mobile adjustments for Quick Mode */
@media (max-width: 768px) {
    .quick-mode-nav {
        position: absolute;
        right: 10px;
        bottom: 80px;
        top: auto;
        transform: none;
    }
    
    .quick-nav-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    
    .quick-quiz-trigger {
        bottom: 80px;
        right: 10px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .quick-mode-topic-title {
        max-width: 120px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .quick-mode-header {
        padding: 12px 15px;
    }
    
    .quick-mode-close {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .quick-mode-topic-num {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .quick-mode-topic-title {
        max-width: 100px;
        font-size: 0.85rem;
    }
    
    .quick-quiz-content {
        max-height: 90vh;
        border-radius: 15px;
    }
    
    .quick-quiz-header {
        padding: 15px;
        font-size: 1rem;
    }
    
    .quick-quiz-body {
        padding: 15px;
    }
    
    .quick-quiz-question-text {
        font-size: 0.95rem;
    }
    
    .quick-quiz-option {
        padding: 12px 14px;
    }
}

/* =====================
   COURSE SETTINGS MOBILE
   ===================== */
@media (max-width: 768px) {
    .topic-config {
        margin-bottom: 15px;
    }
    
    .topic-config.settings-config {
        padding: 15px;
    }
    
    .topic-config-header {
        padding: 15px;
    }
    
    .topic-config-title {
        font-size: 1rem;
    }
    
    .lang-input-row {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
    
    .lang-section-inputs .lang-input-row {
        grid-template-columns: 1fr !important;
    }
    
    .lang-section-inputs .lang-input-row.media-row {
        grid-template-columns: 1fr !important;
    }
    
    .lang-label {
        margin-bottom: 4px;
    }
    
    .lang-section-preview {
        display: none;
    }
    
    .admin-footer {
        flex-direction: column;
        padding: 15px;
    }
    
    .admin-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .topic-config.settings-config {
        padding: 12px;
    }
    
    .topic-config-header {
        padding: 12px;
    }
    
    .topic-config-title {
        font-size: 0.9rem;
    }
    
    .topic-config-title span {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .lang-section-header {
        padding: 10px 12px;
    }
    
    .lang-section-title {
        font-size: 0.85rem;
    }
    
    .lang-input-row input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .duration-input-group {
        flex-wrap: wrap;
    }
    
    .duration-input-group input {
        width: 70px;
        padding: 6px 8px;
    }
}

/* Video Variant Tabs */
.video-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: var(--bg2, rgba(255,255,255,0.05));
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.video-tabs::-webkit-scrollbar {
    display: none;
}

.video-tab-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-tab-btn:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
}

.video-tab-btn.active {
    background: var(--primary, #3b82f6);
    color: white;
    border-color: var(--primary, #3b82f6);
}
