/* --- TharnLMS Upgraded Stylesheet --- */
.certificate-source-note{max-width:760px;margin:14px auto 62px;padding:10px 14px;border-radius:10px;color:#5b6474;background:#f8fafc;font-size:11px;line-height:1.55;text-align:center}
/* --- NEW THEME: Academic Blue (Default) --- */
:root {
    /* Default to Academic Blue theme variables */
    --primary-grad: linear-gradient(145deg, #4a90e2 0%, #50e3c2 100%);
    --success-grad: linear-gradient(135deg, #28a745 0%, #218838 100%);
    --danger-grad: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    --coin-grad: linear-gradient(45deg, #ffc107, #e0a800);
    --text-light: #1a2b48; /* Dark navy text for light background */
    --text-muted: #526c89; /* Desaturated blue-grey text */
    --bg-glass-1: #ffffff; /* White cards */
    --bg-glass-2: #f8f9fa; /* Slightly off-white for hover */
    --border-glass: #dee2e6; /* Light grey border */
    --shadow-color: rgba(0, 0, 0, 0.1); /* Softer shadow */
    --body-bg: #f0f4f8; /* Light blueish-grey main background */
    --primary-text-color: #ffffff; /* Text color for on-primary backgrounds */
}

body.theme-academic-blue {
    --primary-grad: linear-gradient(145deg, #4a90e2 0%, #50e3c2 100%);
    --success-grad: linear-gradient(135deg, #28a745 0%, #218838 100%);
    --danger-grad: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    --coin-grad: linear-gradient(45deg, #ffc107, #e0a800);
    --text-light: #1a2b48;
    --text-muted: #526c89;
    --bg-glass-1: #ffffff;
    --bg-glass-2: #f8f9fa;
    --border-glass: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --body-bg: #f0f4f8;
    --primary-text-color: #ffffff; /* CHANGED: White text on buttons for better contrast */
}

body.theme-dark {
    --primary-grad: linear-gradient(145deg, #6e7fe8 0%, #764ba2 100%);
    --success-grad: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-grad: linear-gradient(135deg, #f5564e 0%, #fe8c00 100%);
    --coin-grad: linear-gradient(45deg, #ffd32a, #ff9f43);
    --text-light: #f0f2ff;
    --text-muted: #c5cae9;
    --bg-glass-1: rgba(255, 255, 255, 0.08);
    --bg-glass-2: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.15);
    --shadow-color: rgba(25, 28, 66, 0.3);
    --body-bg: var(--primary-grad);
}

body.theme-hacker {
    --primary-grad: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    --success-grad: linear-gradient(135deg, #00ff87, #6fffb4);
    --coin-grad: linear-gradient(45deg, #00ff87, #6fffb4);
    --text-light: #00ff87;
    --text-muted: #6fffb4;
    --bg-glass-1: rgba(0, 255, 135, 0.05);
    --bg-glass-2: rgba(0, 255, 135, 0.03);
    --border-glass: rgba(0, 255, 135, 0.1);
    --shadow-color: rgba(0,0,0,0.5);
    --body-bg: #0a0c0f;
    font-family: 'Courier New', Courier, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Leelawadee UI', Tahoma, 'Segoe UI', Arial, sans-serif;
    background: var(--body-bg); color: var(--text-light);
    line-height: 1.6; min-height: 100vh;
    transition: background 0.5s ease, color 0.5s ease;
}
.hidden { display: none !important; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- UPDATED AUTH PAGE STYLES --- */
#auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--body-bg); /* Use main theme background */
    padding: 20px;
}
.auth-card {
    width: 90%;
    max-width: 380px;
    /* Use styles from the main .card theme */
    background: var(--bg-glass-1);
    border: 1px solid var(--border-glass);
    box-shadow: 0 10px 40px var(--shadow-color);
    color: var(--text-light);
    border-radius: 20px;
    padding: 30px;
}
#auth-page .section-title {
    /* Match the inner logo style */
    color: var(--text-light);
    text-shadow: none;
}
.auth-form input {
    width: 100%; padding: 12px 18px; margin-bottom: 15px; border-radius: 25px;
    border: 1px solid var(--border-glass); /* Use theme border */
    background: var(--bg-glass-2); /* Use theme secondary background */
    color: var(--text-light); /* Use theme text color */
    font-size: 16px;
    transition: all 0.3s ease;
}
.auth-form input:focus {
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
    border-color: #80bdff;
    background: #ffffff;
}
.auth-form input::placeholder { color: var(--text-muted); opacity: 1; }
.auth-buttons { display: flex; gap: 10px; margin-top: 10px; }
.auth-buttons .btn { flex-grow: 1; }
.social-login{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.auth-divider{grid-column:1/-1;display:flex;align-items:center;gap:10px;color:var(--text-muted);font-size:.88rem}.auth-divider::before,.auth-divider::after{content:"";height:1px;background:var(--border-glass);flex:1}.social-auth{background:var(--card-bg);border:1px solid var(--border-glass);color:var(--text-color)}.oauth-identity-list{display:flex;flex-direction:column;gap:9px;margin:12px 0 20px}.oauth-identity{display:grid;grid-template-columns:40px 1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--border-glass);border-radius:11px}.oauth-identity>i{font-size:22px;text-align:center}.oauth-identity small{display:block;color:var(--text-muted);margin-top:3px}@media(max-width:560px){.social-login{grid-template-columns:1fr}.auth-divider{grid-column:1}.oauth-identity{grid-template-columns:32px 1fr}.oauth-identity .btn{grid-column:1/-1}}
#auth-error { color: #dc3545; margin-top: 15px; text-align: center; font-weight: 500; }

#auth-switch-links a {
    color: var(--text-muted); /* Use theme muted color */
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    text-shadow: none; /* Remove shadow */
}

#auth-switch-links a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

.btn {
    padding: 10px 20px; border-radius: 25px; border: none; cursor: pointer;
    font-weight: 600; font-size: 15px; text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary { background: var(--primary-grad); color: var(--primary-text-color); }
.btn-success { background: var(--success-grad); color: white; }
.btn-danger { background: var(--danger-grad); color: white; }
.btn-secondary {
    background: var(--bg-glass-2);
    color: var(--text-light);
    border: 1px solid var(--border-glass);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px var(--shadow-color); }
.btn:active { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.header {
    background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px);
    padding: 8px 24px; display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid var(--border-glass);
}
.logo { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.nav-menu { display: flex; gap: 8px; align-items: center; }
.nav-btn {
    padding: 8px 15px; background: transparent; border: 1px solid transparent;
    border-radius: 20px; color: var(--text-muted); cursor: pointer; transition: all 0.3s ease;
    font-size: 14px; text-decoration: none; font-weight: 500;
}
/* FIXED: More robust rule for nav icons */
.nav-btn .fas {
    margin-right: 6px;
    display: inline-block !important;
    vertical-align: middle;
}
.nav-btn.active { background: var(--primary-grad); color: var(--primary-text-color); border-color: transparent; }
.nav-btn:hover:not(.active) { background: var(--bg-glass-2); color: var(--text-light); }

.user-info { display: flex; align-items: center; gap: 12px; }
.user-profile { font-size: 13px; display: flex; align-items: center; }
#user-email { font-weight: 500; }

.tharncoin-balance {
    background: var(--coin-grad); padding: 6px 15px; border-radius: 20px;
    font-weight: 700; display: flex; align-items: center; gap: 8px;
    color: #212529; text-shadow: 1px 1px 2px rgba(255,255,255,0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 0; cursor: pointer; font: inherit; transition: transform 0.2s, box-shadow 0.2s;
}
.tharncoin-balance:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(0,0,0,0.2); }
.tharncoin-balance:focus-visible { outline: 3px solid rgba(255,255,255,0.8); outline-offset: 2px; }
.lang-switcher { display: flex; gap: 5px; }
.lang-switcher .nav-btn { font-size: 14px; padding: 8px; width: 36px; height: 36px; text-align: center; line-height: 1; }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.page { display: none; animation: fadeIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.card {
    background: var(--bg-glass-1); border-radius: 20px; padding: 24px;
    border: 1px solid var(--border-glass);
    margin-bottom: 20px; box-shadow: 0 10px 40px var(--shadow-color);
}
.section-title { font-size: 26px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }

.shop-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.shop-item { background: var(--bg-glass-2); border-radius: 16px; padding: 20px; text-align: center; border: 1px solid transparent; transition: all 0.3s ease; display: flex; flex-direction: column; }
.shop-item:hover { transform: translateY(-5px); box-shadow: 0 12px 25px var(--shadow-color); background: var(--bg-glass-1); }
.shop-item.purchased { border-color: var(--coin-grad); }
.shop-item-icon { font-size: 44px; margin-bottom: 15px; }
.shop-item p { color: var(--text-muted); font-size: 14px; flex-grow: 1; margin-bottom: 15px; }
.shop-item .btn { width: 100%; margin-top: auto; }

.leaderboard-list, .user-list { display: flex; flex-direction: column; gap: 10px; }
.leaderboard-item, .user-item { display: flex; align-items: center; background: var(--bg-glass-2); padding: 12px 20px; border-radius: 12px; font-size: 16px; transition: background 0.3s; }
.leaderboard-item:hover, .user-item:hover { background: var(--bg-glass-1); }
.leaderboard-item.is-user { border: 2px solid; border-image-slice: 1; border-image-source: var(--coin-grad); background: var(--bg-glass-1); }
.leaderboard-rank { font-weight: 700; font-size: 18px; width: 50px; color: var(--text-muted); }
.leaderboard-item.is-user .leaderboard-rank { color: var(--text-light); }
.leaderboard-name, .user-email { flex-grow: 1; font-weight: 500; }
.leaderboard-score, .user-role { font-weight: 700; }
.user-role { text-transform: capitalize; padding: 4px 10px; font-size: 12px; border-radius: 10px; }
.user-role-admin { background-color: #e84393; color: white; }
.user-role-teacher { background-color: #0984e3; color: white; }
.user-role-student { background-color: #00b894; color: white; }

.daily-streak .stat-number { color: #ff793f; }

.courses-grid, .achievements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.course-card { background: var(--bg-glass-1); border-radius: 16px; overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 1px solid var(--border-glass); display: flex; flex-direction: column; }
.course-card-clickable { cursor: pointer; }
.course-card-clickable:hover { transform: translateY(-8px); box-shadow: 0 20px 40px var(--shadow-color); }
.course-thumbnail { height: 140px; background: var(--primary-grad); display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--primary-text-color); }
.course-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.course-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.course-description { font-size: 14px; color: var(--text-muted); margin-bottom: 15px; line-height: 1.5; flex-grow: 1; }
.course-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; }
.course-footer { margin-top: auto; }
.progress-bar { width: 100%; height: 8px; background: rgba(0, 0, 0, 0.1); border-radius: 4px; margin-bottom: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--success-grad); transition: width 0.5s ease; border-radius: 4px; }
.completed-badge {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    background: var(--success-grad);
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
}

.learning-layout { display: grid; grid-template-columns: 1fr 350px; gap: 20px; align-items: start; }
.video-section { background: var(--bg-glass-1); border-radius: 16px; padding: 15px; position: sticky; top: 80px; }
.video-container { position: relative; width: 100%; padding-top: 56.25%; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 15px; }
#video-player { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.side-panel { background: var(--bg-glass-1); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; max-height: calc(100vh - 100px); }

#video-unmute-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); color: white;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    cursor: pointer; z-index: 2; font-size: 18px; text-align: center; padding: 20px;
    opacity: 1; transition: opacity 0.3s ease;
}
#video-unmute-overlay.hidden { opacity: 0; pointer-events: none; }
#video-unmute-overlay i { font-size: 48px; margin-bottom: 15px; }

#transcript-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.transcript-controls { margin-bottom: 10px; flex-shrink: 0; }
.transcript-lang-select { width: 100%; padding: 8px; border-radius: 8px; background: var(--bg-glass-2); color: var(--text-light); border: 1px solid var(--border-glass); }
#transcript-container { flex-grow: 1; overflow-y: auto; padding-right: 10px; }
.transcript-line { padding: 10px; border-radius: 8px; margin-bottom: 5px; cursor: pointer; transition: background-color 0.3s; }
.transcript-line:hover { background-color: var(--bg-glass-2); }
.transcript-line.active { background-color: rgba(74, 144, 226, 0.15); font-weight: 600; }

.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 12, 28, 0.7); backdrop-filter: blur(10px);
    z-index: 2000; display: none; justify-content: center; align-items: center;
    animation: modalFadeIn 0.3s; padding: 20px;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-backdrop.show { display: flex; }
.modal-content {
    background: var(--bg-glass-1); border: 1px solid var(--border-glass);
    padding: 30px; border-radius: 16px; width: 100%; max-width: 600px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal-content.large { max-width: 900px; }
.modal-footer, .confirm-modal-buttons { margin-top: 25px; text-align: right; }
.confirm-modal-buttons { display: flex; justify-content: center; gap: 15px; }

.wallet-modal-content { max-width: 560px; }
.wallet-modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.wallet-modal-header p { color: var(--text-muted); margin-top: 5px; }
.wallet-balance-card { background: var(--coin-grad); color: #212529; border-radius: 16px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.wallet-balance-card strong { font-size: 30px; }
.wallet-transaction-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; overflow-y: auto; }
.wallet-transaction { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--bg-glass-2); border: 1px solid var(--border-glass); border-radius: 12px; padding: 12px 14px; }
.wallet-transaction-info { min-width: 0; }
.wallet-transaction-info strong, .wallet-transaction-info small { display: block; }
.wallet-transaction-info small { color: var(--text-muted); margin-top: 3px; }
.wallet-transaction-amount { font-size: 17px; font-weight: 700; white-space: nowrap; }
.wallet-transaction-amount.credit { color: #39d98a; }
.wallet-transaction-amount.debit { color: #ff6b6b; }

/* --- NEW QUIZ STYLES --- */
#quiz-section {
    max-width: 700px;
    margin: 20px auto;
    background: var(--bg-glass-1);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 10px 40px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

#quiz-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

#quiz-progress-container {
    flex-grow: 1;
    height: 10px;
    background-color: var(--bg-glass-2);
    border-radius: 5px;
    overflow: hidden;
}

#quiz-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary-grad);
    border-radius: 5px;
    transition: width 0.4s ease-in-out;
}

#quiz-counter {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

#quiz-card-container {
    position: relative;
    min-height: 300px; /* Adjust as needed */
}

.quiz-card {
    width: 100%;
    text-align: center;
}

.quiz-card.animate-in {
    animation: slideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.quiz-card.animate-out {
    animation: slideOut 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

.quiz-question {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.5;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.quiz-option {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-glass-2);
    border: 2px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 16px;
    text-align: left;
}

.quiz-option:hover:not(:disabled) {
    background: var(--bg-glass-1);
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.1);
}

.quiz-option.correct {
    background: var(--success-grad);
    border-color: transparent;
    color: white;
    font-weight: 600;
}

.quiz-option.incorrect {
    background: var(--danger-grad);
    border-color: transparent;
    color: white;
}

.quiz-option:disabled {
    cursor: not-allowed;
}

#quiz-feedback-actions {
    margin-top: 25px;
    text-align: center;
    min-height: 50px;
}

#quiz-feedback-actions .feedback-text {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s;
}
#quiz-feedback-actions .feedback-text.correct {
    background-color: rgba(40, 167, 69, 0.1);
}
#quiz-feedback-actions .feedback-text.incorrect {
     background-color: rgba(220, 53, 69, 0.1);
}
#quiz-feedback-actions .feedback-text strong {
    font-size: 18px;
    margin-right: 10px;
}

/* --- END NEW QUIZ STYLES --- */

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group textarea {
    width: 100%; padding: 10px 15px; border-radius: 8px;
    border: 1px solid var(--border-glass); background: var(--bg-glass-2);
    color: var(--text-light); font-size: 14px;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; }
.stat-card { background: var(--bg-glass-1); border-radius: 12px; padding: 20px; text-align: center; }
.stat-number { font-size: 32px; font-weight: 700; margin-bottom: 5px; color: #4a90e2; }
.stat-label { font-size: 14px; color: var(--text-muted); }

.achievement-card, .completed-course-card {
    background: var(--bg-glass-1); border-radius: 12px; padding: 20px;
    display: flex; align-items: center; gap: 20px;
    border: 1px solid var(--border-glass); transition: all 0.4s ease; margin-bottom: 15px;
}
.achievement-card { opacity: 0.6; filter: grayscale(80%); }
.achievement-card.unlocked, .completed-course-card { opacity: 1; filter: grayscale(0%); }
.achievement-card.unlocked { border-left: 5px solid #ffc107; }
.completed-course-card { border-left: 5px solid; border-image-slice: 1; border-image-source: var(--success-grad); }
.achievement-icon { font-size: 40px; color: #ffc107; flex-shrink: 0; width: 45px; text-align: center; }
.completed-course-card .achievement-icon { color: var(--text-light); }
.achievement-details { flex-grow: 1; }
.achievement-title { font-weight: bold; font-size: 18px; }
.achievement-desc { font-size: 14px; color: var(--text-muted); }

.achievement-progress { margin-top: 15px; }
.achievement-progress-text { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; display: block; text-align: right; }
.achievement-progress-bar { width: 100%; height: 6px; background: rgba(0, 0, 0, 0.1); border-radius: 3px; overflow: hidden; }
.achievement-progress-fill { height: 100%; background: var(--primary-grad); border-radius: 3px; transition: width 0.5s ease; }
.achievement-card.unlocked .achievement-progress { display: none; }
.btn-share-achievement { margin-top: 15px; padding: 6px 15px; font-size: 13px; }

.notification {
    position: fixed; top: 80px; right: 20px; background: white; color: #333;
    padding: 15px 20px; border-radius: 8px; box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    z-index: 10000; transform: translateX(calc(100% + 30px));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid #4a90e2; max-width: 320px;
}
.notification.show { transform: translateX(0); }
.notification.success { border-left-color: #28a745; }
.notification.error { border-left-color: #dc3545; }
.notification.achievement { border-left-color: #ffc107; }

.analytics-consent { position: fixed; z-index: 12000; left: 50%; bottom: 18px; width: min(920px, calc(100% - 28px)); transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.24); border-radius: 18px; background: rgba(10,24,48,.97); color: #fff; box-shadow: 0 20px 60px rgba(4,13,30,.34); backdrop-filter: blur(18px); }
.analytics-consent.hidden { display: none; }
body:has(.analytics-consent:not(.hidden)) { padding-bottom: 170px; }
.analytics-consent strong { display: block; margin-bottom: 5px; font-size: 16px; }
.analytics-consent p { margin: 0; max-width: 610px; color: #d8e5f6; font-size: 13px; line-height: 1.55; }
.analytics-consent a { color: #76e4d6; font-weight: 700; }
.analytics-consent-actions { display: flex; flex: 0 0 auto; gap: 9px; }
@media (max-width: 700px) { body:has(.analytics-consent:not(.hidden)) { padding-bottom: 270px; } .analytics-consent { align-items: stretch; flex-direction: column; bottom: 10px; padding: 16px; } .analytics-consent-actions { display: grid; grid-template-columns: 1fr 1fr; } .analytics-consent-actions .btn { white-space: normal; } }

.filter-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.search-wrapper { position: relative; flex-grow: 1; min-width: 250px; }
.search-wrapper i { position: absolute; top: 50%; left: 18px; transform: translateY(-50%); color: var(--text-muted); }
#search-input { width: 100%; padding: 10px 15px 10px 45px; border-radius: 20px; border: 1px solid var(--border-glass); background: var(--bg-glass-1); color: var(--text-light); font-size: 14px; outline: none; transition: all 0.3s ease; }
#search-input::placeholder { color: var(--text-muted); }
#search-input:focus { background: white; box-shadow: 0 0 15px rgba(74, 144, 226, 0.2); border-color: #80bdff; }
.category-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.category-btn { padding: 8px 16px; border: 1px solid var(--border-glass); background: transparent; color: var(--text-light); border-radius: 20px; cursor: pointer; transition: all 0.3s ease; }
.category-btn:hover { background: var(--bg-glass-2); }
.category-btn.active { background: var(--primary-grad); color: var(--primary-text-color); font-weight: bold; border-color: transparent; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state i { font-size: 52px; margin-bottom: 20px; opacity: 0.6; }

#certificate-modal-backdrop { z-index: 2001; }
#certificate-modal-content.certificate-v2-container {
    font-family: 'Leelawadee UI', Tahoma, serif; background-color: #f4f6f9;
    background-image:
        linear-gradient(45deg, rgba(0, 57, 114, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0, 57, 114, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0, 57, 114, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0, 57, 114, 0.05) 75%);
    background-size: 20px 20px; color: #1a2b48; padding: 0;
    border: 1px solid #d4af37; max-width: 850px; box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    position: relative; overflow: hidden;
}
.cert-v2-border { border: 10px solid #003972; padding: 25px; }
.cert-v2-header { text-align: center; margin-bottom: 20px; }
.cert-v2-header .logo { font-size: 24px; font-weight: 700; color: #003972; display: flex; align-items: center; justify-content: center; gap: 10px; }
.cert-v2-header h2 {
    font-family: 'Leelawadee UI', Tahoma, serif; font-size: 38px; color: #d4af37;
    text-transform: uppercase; letter-spacing: 2px; margin-top: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
.cert-v2-body { text-align: center; margin: 30px 0; }
.cert-v2-body p { margin: 8px 0; font-size: 18px; color: #334e68; }
#cert-v2-user-name {
    font-size: 32px; font-weight: 600; color: #003972;
    border-bottom: 2px solid #d4af37; display: inline-block;
    padding-bottom: 5px; margin: 10px 0;
}
#cert-v2-course-name { font-style: normal; font-weight: 600; font-size: 22px; }
.cert-v2-footer { margin-top: 40px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 10px; }
.cert-v2-verification { text-align: left; }
.cert-v2-verification .qr-placeholder {
    width: 80px; height: 80px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3e%3crect width='100' height='100' fill='%23f4f6f9'/%3e%3crect x='10' y='10' width='20' height='20' fill='%231a2b48'/%3e%3crect x='40' y='10' width='10' height='10' fill='%231a2b48'/%3e%3crect x='60' y='10' width='30' height='10' fill='%231a2b48'/%3e%3crect x='10' y='40' width='10' height='10' fill='%231a2b48'/%3e%3crect x='30' y='30' width='10' height='20' fill='%231a2b48'/%3e%3crect x='50' y='30' width='20' height='10' fill='%231a2b48'/%3e%3crect x='80' y='20' width='10' height='30' fill='%231a2b48'/%3e%3crect x='10' y='60' width='30' height='10' fill='%231a2b48'/%3e%3crect x='50' y='50' width='10' height='20' fill='%231a2b48'/%3e%3crect x='70' y='60' width='20' height='10' fill='%231a2b48'/%3e%3crect x='10' y='80' width='10' height='10' fill='%231a2b48'/%3e%3crect x='30' y='80' width='10' height='20' fill='%231a2b48'/%3e%3crect x='50' y='80' width='40' height='10' fill='%231a2b48'/%3e%3c/svg%3e");
    background-size: contain; margin-bottom: 5px;
}
.cert-v2-verification p { font-size: 11px; color: #526c89; margin: 0; line-height: 1.3; }
.cert-v2-verification strong { font-family: 'Courier New', monospace; font-size: 12px; }
.cert-v2-seal { position: relative; width: 120px; height: 120px; display: flex; justify-content: center; align-items: center; }
.cert-v2-seal::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background: #d4af37; border-radius: 50%;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.cert-v2-seal-inner {
    position: relative; width: 80%; height: 80%; background: #003972;
    border-radius: 50%; color: #fff; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    font-size: 10px; font-weight: bold; line-height: 1.2; padding: 5px;
    text-transform: uppercase;
}
.cert-v2-seal-inner .fa-graduation-cap { font-size: 24px; margin-bottom: 5px; color: #d4af37; }

.congrats-modal-content {
    background: var(--primary-grad); color: var(--primary-text-color); padding: 40px;
    border-radius: 20px; width: 90%; max-width: 500px; text-align: center;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5); border: 1px solid var(--border-glass);
    position: relative; overflow: hidden;
}
.congrats-modal-content::before { content: '✨'; position: absolute; top: -20px; left: -20px; font-size: 80px; opacity: 0.1; transform: rotate(-20deg); }
.congrats-modal-content::after { content: '🏆'; position: absolute; bottom: -30px; right: -20px; font-size: 100px; opacity: 0.1; transform: rotate(15deg); }
.congrats-icon { font-size: 72px; animation: tada 1.5s ease infinite; margin-bottom: 15px; }
.congrats-modal-content h2 { font-size: 32px; font-weight: 700; margin-bottom: 10px; }
.congrats-modal-content p { font-size: 18px; color: var(--primary-text-color); opacity: 0.8; margin-bottom: 25px; }
.congrats-modal-content p strong { color: var(--primary-text-color); font-weight: 600; opacity: 1; }
.congrats-buttons { display: flex; justify-content: center; gap: 15px; }

@keyframes tada {
    0% {transform: scale(1);} 10%, 20% {transform: scale(0.9) rotate(-3deg);}
    30%, 50%, 70%, 90% {transform: scale(1.1) rotate(3deg);} 40%, 60%, 80% {transform: scale(1.1) rotate(-3deg);}
    100% {transform: scale(1) rotate(0);}
}

.activity-feed {
    position: fixed; bottom: 20px; left: 20px; background: var(--bg-glass-1);
    backdrop-filter: blur(10px); border: 1px solid var(--border-glass);
    border-radius: 12px; padding: 15px 20px; z-index: 9999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3); display: flex;
    align-items: center; gap: 15px; transform: translateX(-150%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 350px;
}
.activity-feed.show { transform: translateX(0); }
.activity-feed-icon { font-size: 24px; }
.activity-feed-text { font-size: 14px; }
.activity-feed-text strong { color: var(--text-light); font-weight: 600; }

.progress-stat {
    display: flex; justify-content: space-between; font-size: 14px;
    margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border-glass);
}
.progress-stat:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.progress-stat span:first-child { color: var(--text-muted); }
.progress-stat span:last-child { font-weight: 600; }

#ai-quiz-generator-content {
    display: grid; grid-template-columns: 3fr 5fr; gap: 20px;
    margin-top: 20px; overflow-y: auto; flex-grow: 1;
}
.ai-transcript-view {
    background: var(--bg-glass-2); border-radius: 8px; padding: 15px;
    height: 55vh; overflow-y: auto; font-size: 14px;
    line-height: 1.7; border: 1px solid var(--border-glass);
}
.ai-generated-quizzes { height: 55vh; overflow-y: auto; padding-right: 10px; }
.ai-quiz-item {
    background: var(--bg-glass-2); border-radius: 8px; padding: 15px;
    margin-bottom: 15px; border-left: 4px solid var(--border-glass);
}
.ai-quiz-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ai-quiz-item-header label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.ai-quiz-item-question { font-weight: 600; margin-bottom: 10px; }
.ai-quiz-item-options li { list-style: none; padding: 5px 0; font-size: 14px; }
.ai-quiz-item-options .correct-answer { color: var(--text-light); font-weight: bold; }
.ai-quiz-item-explanation {
    font-size: 13px; color: var(--text-muted); margin-top: 10px;
    padding-top: 10px; border-top: 1px dashed var(--border-glass);
}
.loader {
    width: 50px; height: 50px; border: 5px solid var(--text-muted);
    border-bottom-color: var(--text-light); border-radius: 50%;
    display: inline-block; box-sizing: border-box;
    animation: rotation 1s linear infinite; margin: 20px auto;
}
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.profile-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--primary-grad); display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: bold; color: var(--primary-text-color); flex-shrink: 0;
}
.profile-info h2 { font-size: 24px; margin: 0; }
.profile-info p { font-size: 16px; color: var(--text-muted); text-transform: capitalize; }

#profile .course-card .course-thumbnail { height: 100px; font-size: 36px; }
#profile .course-card .course-title { font-size: 16px; }
#profile .course-card .course-info { padding: 15px; }

.user-profile .nav-btn {
    background: var(--bg-glass-2); border-radius: 50%; width: 36px; height: 36px;
    padding: 0; font-size: 16px; display: inline-flex;
    align-items: center; justify-content: center; margin-left: 8px;
}
.user-profile .nav-btn .fas { margin-right: 0; }

#comments-section { margin-top: 20px; }
.comment-form { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 25px; }
.comment-form textarea {
    flex-grow: 1; border-radius: 12px; padding: 12px 18px;
    border: 1px solid var(--border-glass); background: var(--bg-glass-2);
    color: var(--text-light); font-size: 15px; resize: vertical; min-height: 50px;
}
.comment-form button { flex-shrink: 0; }
#comments-list-container { display: flex; flex-direction: column; gap: 20px; }
.comment { display: flex; gap: 15px; }
.comment-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary-grad); color: var(--primary-text-color);
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; flex-shrink: 0; font-size: 18px;
}
.comment-content { flex-grow: 1; }
.comment-header { font-size: 14px; margin-bottom: 5px; }
.comment-author { font-weight: 600; }
.comment-role { font-size: 12px; padding: 2px 8px; border-radius: 10px; margin-left: 8px; vertical-align: middle; }
.comment-timestamp { color: var(--text-muted); margin-left: 8px; }
.comment-body { background: var(--bg-glass-2); padding: 12px 18px; border-radius: 12px; font-size: 15px; line-height: 1.7; }
.comment-actions { margin-top: 8px; }
.comment-action-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 500; padding: 5px; }
.comment-action-btn:hover { color: var(--text-light); }
.replies-container { margin-top: 15px; padding-left: 55px; display: flex; flex-direction: column; gap: 15px; }
.reply-form { margin-top: 10px; }

.analytics-table-container { overflow-x: auto; }
.analytics-table {
    width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 15px;
}
.analytics-table th, .analytics-table td {
    padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-glass);
}
.analytics-table th { background-color: var(--bg-glass-2); font-weight: 600; color: var(--text-muted); }
.analytics-table tbody tr:hover { background-color: var(--bg-glass-2); }
.analytics-table td { color: var(--text-light); }

/* Scalable member administration */
.admin-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-summary-grid > div { padding: 18px; border: 1px solid var(--border-glass); border-radius: 14px; background: var(--bg-glass-2); display: flex; flex-direction: column; gap: 4px; }
.admin-summary-grid strong { font-size: 28px; color: var(--text-light); }
.admin-summary-grid span, .admin-member-table small { color: var(--text-muted); }
.admin-member-filters { display: grid; grid-template-columns: minmax(240px, 1fr) 160px 160px 90px; gap: 10px; margin-bottom: 14px; }
.admin-member-filters input, .admin-member-filters select, .admin-bulk-toolbar input, .admin-bulk-toolbar select, .admin-inline-select {
    min-height: 42px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-glass); background: var(--bg-glass-2); color: var(--text-light);
}
.admin-bulk-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 14px; border-radius: 12px; background: rgba(74, 144, 226, .12); border: 1px solid rgba(74, 144, 226, .3); }
.admin-bulk-toolbar input { flex: 1; }
.admin-member-table-wrap { overflow-x: auto; border: 1px solid var(--border-glass); border-radius: 12px; }
.admin-member-table { width: 100%; min-width: 1060px; border-collapse: collapse; }
.admin-member-table th, .admin-member-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border-glass); vertical-align: middle; }
.admin-member-table th { color: var(--text-muted); font-size: 13px; background: var(--bg-glass-2); position: sticky; top: 0; }
.admin-member-table tbody tr:hover { background: var(--bg-glass-2); }
.admin-member-table small { display: block; margin-top: 4px; white-space: nowrap; }
.admin-inline-select { min-height: 36px; padding: 6px 8px; }
.member-status-active { border-color: rgba(40, 167, 69, .5); }
.member-status-suspended, .member-status-disabled { border-color: rgba(220, 53, 69, .5); }
.admin-empty-row { text-align: center !important; padding: 40px !important; color: var(--text-muted); }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--text-muted); }
.admin-pagination div { display: flex; gap: 8px; }
.admin-audit-panel { margin-top: 20px; padding: 18px; border: 1px solid var(--border-glass); border-radius: 14px; background: var(--bg-glass-2); }
.admin-audit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.admin-audit-header h3 { margin: 0; }
.admin-audit-item { padding: 12px 0; border-bottom: 1px solid var(--border-glass); }
.admin-audit-item span { float: right; color: var(--text-muted); font-size: 12px; }
.admin-audit-item p { margin: 6px 0; }
.admin-audit-item small { color: var(--text-muted); word-break: break-word; }

/* Course Studio */
.course-status { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; margin-left: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.course-status-draft { background: rgba(108,117,125,.18); color: #88919a; }
.course-status-review { background: rgba(255,193,7,.18); color: #d39e00; }
.course-status-published { background: rgba(40,167,69,.18); color: #28a745; }
.course-status-archived { background: rgba(220,53,69,.16); color: #dc3545; }
.course-studio-modal { width: min(1180px, 96vw); max-height: 94vh; overflow-y: auto; }
.course-studio-header, .studio-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.course-studio-header h2, .course-studio-header p, .studio-section-heading h3, .studio-section-heading h4, .studio-section-heading p { margin: 4px 0; }
.course-readiness { margin: 16px 0; padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(255,193,7,.35); background: rgba(255,193,7,.1); }
.course-readiness.is-ready { border-color: rgba(40,167,69,.35); background: rgba(40,167,69,.1); }
.course-readiness ul { margin: 8px 0 0; padding-left: 22px; }
.course-readiness span { margin-left: 10px; color: var(--text-muted); }
.course-studio-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.course-studio-section { padding: 18px; margin-bottom: 18px; border: 1px solid var(--border-glass); border-radius: 14px; background: var(--bg-glass-2); }
.course-studio-section > h3 { margin-top: 0; }
.course-studio-section label { display: flex; flex-direction: column; gap: 6px; color: var(--text-muted); font-size: 13px; }
.course-studio-section input, .course-studio-section textarea, .course-studio-section select { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border-glass); border-radius: 9px; background: var(--bg-glass-1); color: var(--text-light); font: inherit; }
.course-studio-section textarea { min-height: 82px; resize: vertical; }
.studio-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; margin-bottom: 12px; }
.studio-grid.two { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.studio-wide { grid-column: span 3; }
.studio-checkbox { flex-direction: row !important; align-items: center; margin: 12px 0; }
.studio-checkbox input { width: auto; }
.studio-lesson-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.studio-lesson { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border-glass); border-radius: 11px; background: var(--bg-glass-1); }
.studio-lesson-position { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-grad); color: white; font-weight: 700; }
.studio-lesson small { display: block; margin-top: 4px; color: var(--text-muted); }
.studio-lesson > div:last-child { display: flex; gap: 6px; }
.studio-lesson-editor { border-color: rgba(74,144,226,.45); }
.studio-quiz { padding: 14px; margin: 10px 0; border: 1px solid var(--border-glass); border-radius: 11px; background: var(--bg-glass-1); }
.studio-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.studio-options label { display: grid; grid-template-columns: 24px 1fr; align-items: center; }
.studio-options input[type=radio] { width: auto; }

/* Learning ecosystem, skill tree and portfolio */
.identity-hero { display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,rgba(74,144,226,.18),rgba(121,82,179,.18)); }
.identity-hero h2,.identity-hero p { margin:4px 0; }.identity-hero>i{font-size:64px;color:var(--text-muted)}
.skill-radar-grid,.portfolio-grid,.path-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px}
.profile-skill,.portfolio-card,.path-card{border:1px solid var(--border-glass);border-radius:14px;padding:15px;background:var(--bg-glass-2)}
.profile-skill-head{display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center}.profile-skill-head>i{font-size:24px}.profile-skill-head small,.portfolio-card small,.path-card small{display:block;color:var(--text-muted);margin-top:4px}.profile-skill-head>span{font-weight:700;color:#8b5cf6}.profile-skill p{font-size:13px;color:var(--text-muted)}
.portfolio-card{display:flex;flex-direction:column;gap:9px}.portfolio-card h3,.portfolio-card p{margin:0}.portfolio-status{align-self:flex-start;padding:3px 9px;border-radius:999px;font-size:11px;text-transform:uppercase;background:rgba(108,117,125,.18)}.portfolio-approved{background:rgba(40,167,69,.18);color:#28a745}.portfolio-submitted{background:rgba(255,193,7,.18);color:#d39e00}.portfolio-revision,.portfolio-rejected{background:rgba(220,53,69,.16);color:#dc3545}.portfolio-form{padding:16px;margin:14px 0;border:1px solid var(--border-glass);border-radius:12px}.portfolio-form fieldset{border:1px solid var(--border-glass);border-radius:10px;margin-bottom:12px}
.path-card{display:grid;grid-template-columns:50px 1fr;gap:12px;align-items:center}.path-card>i{font-size:34px;text-align:center}.path-card .btn{grid-column:1/-1}.path-tree{margin-top:18px}.path-tier{margin:22px 0}.path-tier>strong{display:block;margin-bottom:10px}.path-tier>div{display:flex;gap:15px;overflow-x:auto;padding:6px}.path-node{min-width:180px;padding:15px;border:2px solid var(--border-glass);border-radius:14px;text-align:center;position:relative}.path-node i{font-size:28px}.path-node h4{margin:8px 0}.path-node small{display:block;color:var(--text-muted);margin-bottom:8px}.node-completed{border-color:#28a745;background:rgba(40,167,69,.1)}.node-available{border-color:#4a90e2;background:rgba(74,144,226,.1)}.node-locked{opacity:.55}
.ecosystem-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.eco-tab.active{background:var(--primary-grad);color:#fff}.rubric-row{display:grid;grid-template-columns:55px 140px 140px 1fr 90px 100px;gap:8px;align-items:center;margin:8px 0}.rubric-row label{flex-direction:row;align-items:center}.rubric-row label input{width:auto}.path-node-editor{display:grid;grid-template-columns:120px 1fr 1fr 1.5fr 70px 70px 1fr 90px 42px;gap:7px;align-items:center;margin:8px 0}.path-node-editor label{flex-direction:row;align-items:center}.path-node-editor label input{width:auto}.review-queue{display:flex;flex-direction:column;gap:12px}.review-card{display:grid;grid-template-columns:1fr minmax(220px,.7fr) auto;gap:14px;padding:15px;border:1px solid var(--border-glass);border-radius:12px}.review-card small{display:block;color:var(--text-muted)}.review-card textarea{min-height:90px;padding:10px;background:var(--bg-glass-2);color:var(--text-light);border:1px solid var(--border-glass);border-radius:9px}.review-card>div:last-child{display:flex;flex-direction:column;gap:6px}.course-skill-map{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px;margin-top:12px}.course-skill-map label{display:grid;grid-template-columns:24px 1fr 70px 70px;align-items:center;padding:8px;border:1px solid var(--border-glass);border-radius:9px}.course-skill-map input[type=checkbox]{width:auto}
.security-session-list{display:flex;flex-direction:column;gap:9px;margin-top:15px}.security-session{display:grid;grid-template-columns:40px 1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--border-glass);border-radius:11px}.security-session.current{border-color:rgba(40,167,69,.45);background:rgba(40,167,69,.06)}.security-session>i{font-size:22px;text-align:center}.security-session small{display:block;color:var(--text-muted);margin-top:4px}#password-reset-message{color:var(--text-muted)}
.member-role-chips{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}.member-role-chips span{padding:2px 7px;border-radius:999px;background:rgba(74,144,226,.12);color:var(--primary-color);font-size:.72rem}.admin-role-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:15px 0}.admin-role-grid label{display:grid;grid-template-columns:24px 1fr;align-items:start;padding:12px;border:1px solid var(--border-glass);border-radius:10px}.admin-role-grid label small{grid-column:2;color:var(--text-muted)}

.notification-area { position: relative; }
.notification-bell {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 16px;
}
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid var(--bg-glass-1);
}
.notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 350px;
    max-height: 400px;
    background: var(--bg-glass-1);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--shadow-color);
    z-index: 1100;
    display: flex;
    flex-direction: column;
}
.notification-panel-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
}
.notification-panel-header h4 {
    margin: 0;
    font-size: 16px;
}
.notification-list {
    overflow-y: auto;
    flex-grow: 1;
}
.notification-item {
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-glass);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.notification-item:hover {
    background-color: var(--bg-glass-2);
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item.unread {
    background-color: rgba(74, 144, 226, 0.05);
}
.notification-icon {
    font-size: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    padding-top: 2px;
}
.notification-content p {
    margin: 0;
    line-height: 1.5;
}
.notification-timestamp {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 992px) {
    .learning-layout { grid-template-columns: 1fr; }
    .side-panel { max-height: 400px; }
    .video-section { position: static; }
    #ai-quiz-generator-content { grid-template-columns: 1fr; }
    .ai-transcript-view, .ai-generated-quizzes { height: 40vh; }
}
@media (max-width: 768px) {
    .header { flex-direction: column; gap: 10px; padding: 15px; }
    .nav-menu { width: 100%; justify-content: center; flex-wrap: wrap; }
    .courses-grid, .achievements-grid { grid-template-columns: 1fr; }
    .filter-container { flex-direction: column; align-items: stretch; }
    .admin-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-member-filters { grid-template-columns: 1fr; }
    .admin-bulk-toolbar { align-items: stretch; flex-direction: column; }
    .admin-pagination { align-items: stretch; flex-direction: column; }
    .course-studio-header { align-items: flex-start; }
    .studio-grid, .studio-grid.two { grid-template-columns: 1fr; }
    .studio-wide { grid-column: span 1; }
    .studio-options { grid-template-columns: 1fr; }
    .studio-lesson { grid-template-columns: 36px 1fr; }
    .studio-lesson > div:last-child { grid-column: 2; }
    .rubric-row,.path-node-editor,.review-card{grid-template-columns:1fr}.identity-hero>i{display:none}.course-skill-map label{grid-template-columns:24px 1fr}.course-skill-level,.course-skill-weight{grid-column:2}
}
.settings-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.settings-header h2{margin:0 0 6px}.settings-header p{margin:0;color:#64748b}.settings-environment{display:flex;flex-direction:column;text-align:right}.settings-environment strong{text-transform:uppercase;color:#0f766e}.settings-environment span{font-size:13px;color:#64748b;word-break:break-all}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.settings-card{margin:0}.settings-card header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;padding-bottom:13px;border-bottom:1px solid #e2e8f0}.settings-card header>div{display:flex;align-items:center;gap:10px}.settings-card header i{font-size:22px;color:#2563eb}.settings-card h3{margin:0}.settings-card label{display:flex;flex-direction:column;gap:6px;margin:12px 0;color:#334155;font-weight:600}.settings-card input,.settings-card select{width:100%;padding:11px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font:inherit;color:#0f172a}.settings-card input:focus,.settings-card select:focus{outline:2px solid rgba(37,99,235,.2);border-color:#2563eb}.settings-switch,.settings-clear{flex-direction:row!important;align-items:center;font-weight:500!important}.settings-switch input,.settings-clear input{width:auto}.settings-clear{font-size:13px;color:#b45309!important}.settings-badge{font-size:12px;padding:4px 9px;border-radius:999px;font-weight:700}.settings-badge.ready{background:#dcfce7;color:#166534}.settings-badge.pending{background:#fef3c7;color:#92400e}.settings-mail{grid-column:1/-1}.settings-row{display:grid;grid-template-columns:2fr 1fr 1fr;gap:14px}.settings-row.two{grid-template-columns:repeat(2,1fr)}.settings-help{padding:10px 12px;border-radius:8px;background:#eff6ff;color:#1e40af;font-size:14px}.settings-test{display:flex;gap:10px}.settings-test input{flex:1}.settings-savebar{position:sticky;bottom:10px;z-index:5;margin-top:20px;padding:14px 18px;border-radius:12px;background:#0f172a;color:#fff;display:flex;justify-content:space-between;align-items:center;box-shadow:0 8px 24px rgba(15,23,42,.25)}
@media(max-width:800px){.settings-header,.settings-savebar{align-items:stretch;flex-direction:column}.settings-environment{text-align:left}.settings-grid{grid-template-columns:1fr}.settings-mail{grid-column:auto}.settings-row,.settings-row.two{grid-template-columns:1fr}.settings-test{flex-direction:column}}

/* --- Responsive course experience --- */
.course-catalog-hero{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) 230px;align-items:center;min-height:270px;margin-bottom:22px;padding:38px clamp(24px,5vw,58px);overflow:hidden;border-radius:26px;color:#fff;background:linear-gradient(125deg,#0b1739 0%,#1746a2 56%,#17a9a0 118%);box-shadow:0 24px 55px rgba(18,62,130,.22)}.course-catalog-hero:before,.course-catalog-hero:after{content:"";position:absolute;z-index:-1;border-radius:50%;border:1px solid rgba(255,255,255,.15)}.course-catalog-hero:before{width:340px;height:340px;right:-110px;top:-160px}.course-catalog-hero:after{width:190px;height:190px;right:120px;bottom:-145px}.course-catalog-copy{max-width:720px}.course-eyebrow{display:inline-flex;align-items:center;gap:8px;margin-bottom:14px;color:#99f6e4;font-size:12px;font-weight:800;letter-spacing:.13em}.course-catalog-hero h1{max-width:680px;margin:0 0 12px;font-size:clamp(29px,4.2vw,49px);line-height:1.14;letter-spacing:-.025em}.course-catalog-hero p{max-width:650px;margin:0;color:#dbeafe;font-size:clamp(15px,1.5vw,18px);line-height:1.7}.course-hero-art{position:relative;display:grid;width:190px;height:190px;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:42px;background:rgba(255,255,255,.09);transform:rotate(7deg);box-shadow:inset 0 1px rgba(255,255,255,.2);backdrop-filter:blur(12px)}.course-hero-art>i{font-size:78px;color:rgba(255,255,255,.92);transform:rotate(-7deg)}.course-hero-art span{position:absolute;right:-14px;bottom:23px;display:grid;width:58px;height:58px;place-items:center;border-radius:50%;color:#0f766e;background:#fff;box-shadow:0 12px 28px rgba(0,0,0,.25);transform:rotate(-7deg)}.course-catalog-card{padding:clamp(18px,3vw,30px)}.course-catalog-heading{margin-bottom:22px}.course-catalog-heading>div{display:flex;align-items:center;gap:10px}.courses-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:24px}.course-card{position:relative;min-width:0;border-radius:20px;background:var(--bg-glass-1);box-shadow:0 9px 26px rgba(15,23,42,.07);transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease}.course-card-clickable:hover{transform:translateY(-6px);border-color:rgba(37,99,235,.34);box-shadow:0 20px 42px rgba(15,23,42,.14)}.course-thumbnail{position:relative;height:180px;overflow:hidden;background:linear-gradient(135deg,#172554,#1d4ed8 60%,#14b8a6);font-size:58px}.course-thumbnail:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 78% 12%,rgba(255,255,255,.25),transparent 35%),linear-gradient(180deg,transparent 48%,rgba(2,6,23,.38))}.course-visual{position:relative;z-index:1;filter:drop-shadow(0 8px 14px rgba(0,0,0,.2));transition:transform .3s ease}.course-card:hover .course-visual{transform:scale(1.09) rotate(-2deg)}.course-lesson-count,.course-enrolled{position:absolute;z-index:2;display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;color:#fff;font-size:12px;font-weight:700;backdrop-filter:blur(9px)}.course-lesson-count{left:14px;bottom:13px;background:rgba(2,6,23,.64)}.course-enrolled{right:13px;top:13px;background:rgba(5,150,105,.86)}.course-info{padding:20px 20px 18px}.course-title{margin:8px 0 9px;font-size:19px;line-height:1.42;letter-spacing:-.01em}.course-description{display:-webkit-box;min-height:63px;margin-bottom:17px;overflow:hidden;-webkit-line-clamp:3;-webkit-box-orient:vertical}.course-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0;font-size:12px}.course-meta>span{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:8px;color:#425b76;background:var(--bg-glass-2)}.course-meta i{color:#2563eb}.course-footer{padding-top:13px;border-top:1px solid var(--border-glass)}.course-footer .btn{min-height:44px;border-radius:11px;font-weight:700}.course-footer .progress-bar{height:8px;margin-bottom:7px}.filter-container{padding:13px;border:1px solid var(--border-glass);border-radius:16px;background:var(--bg-glass-2)}#search-input{min-height:44px;border-radius:12px;background:var(--bg-glass-1)}.category-filters{flex-wrap:nowrap;max-width:100%;padding-bottom:2px;overflow-x:auto;scrollbar-width:thin}.category-btn{flex:0 0 auto;min-height:40px;border-radius:11px}
.learning-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.learning-back{color:#1d4ed8;border:1px solid #bfdbfe;background:#eff6ff}.learning-mode{display:inline-flex;align-items:center;gap:8px;color:#64748b;font-size:13px;font-weight:700}.learning-mode i{color:#14b8a6}.learning-content-wrapper{max-width:1600px;margin:auto}.learning-layout{grid-template-columns:minmax(0,1fr) minmax(300px,360px);gap:24px}.video-section,.side-panel{border:1px solid var(--border-glass);box-shadow:0 12px 35px rgba(15,23,42,.08)}.video-section{top:82px;padding:18px;border-radius:20px}.lesson-heading{margin-bottom:14px}.lesson-heading>span{display:block;margin-bottom:4px;color:#2563eb;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.lesson-heading h1{margin:0;font-size:clamp(20px,2.4vw,29px);line-height:1.35}.video-container{margin:0;border-radius:15px;box-shadow:0 14px 34px rgba(2,6,23,.28)}.post-video-controls{padding-top:15px}.post-video-controls .btn{width:100%;min-height:48px}.side-panel{max-height:calc(100vh - 116px);padding:20px;border-radius:20px}.transcript-heading{margin:20px 0 12px;font-size:18px}.transcript-controls select{width:100%;min-height:42px;padding:8px 12px;border:1px solid var(--border-glass);border-radius:10px;color:var(--text-light);background:var(--bg-glass-2)}#transcript-container{padding-right:5px}.transcript-line{padding:11px 12px;border-left:3px solid transparent}.transcript-line.active{border-left-color:#2563eb;background:#eff6ff;color:#1e3a8a}
@media(max-width:1100px){.course-catalog-hero{grid-template-columns:1fr 150px}.course-hero-art{width:140px;height:140px;border-radius:32px}.learning-layout{grid-template-columns:minmax(0,1fr) 310px}}
@media(max-width:900px){.learning-layout{grid-template-columns:1fr}.video-section{position:static}.side-panel{max-height:none}.transcript-line{min-height:44px}.course-catalog-hero{grid-template-columns:1fr}.course-hero-art{display:none}}
@media(max-width:600px){.course-catalog-hero{min-height:auto;margin-inline:-4px;padding:28px 22px;border-radius:20px}.course-catalog-hero h1{font-size:30px}.course-catalog-card{margin-inline:-4px;padding:17px 13px}.course-catalog-heading{align-items:flex-start;gap:10px}.course-catalog-heading .btn span{display:none}.courses-grid{gap:16px}.course-thumbnail{height:155px}.course-info{padding:17px 16px}.filter-container{padding:10px}.search-wrapper{min-width:0;width:100%}.learning-topbar{margin-bottom:12px}.learning-mode{font-size:11px}.video-section{margin-inline:-5px;padding:10px;border-radius:16px}.lesson-heading{padding:5px 4px}.video-container{border-radius:11px}.side-panel{padding:15px}.course-footer .teacher-actions{flex-direction:column}}
.course-preview-badge{position:absolute;z-index:2;right:13px;bottom:13px;display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid rgba(255,255,255,.34);border-radius:999px;color:#fff;background:rgba(180,83,9,.9);font-size:12px;font-weight:800;backdrop-filter:blur(9px)}.course-preview-note{margin:10px 0 12px;padding:9px 10px;border-left:3px solid #f59e0b;border-radius:7px;color:#92400e;background:#fffbeb;font-size:12px;line-height:1.55}
@media(max-width:1100px) and (min-width:769px){.header{flex-wrap:wrap}.header>*{min-width:0}.nav-menu{order:3;width:100%;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px}.user-info{max-width:100%;margin-left:auto;flex-wrap:wrap}.category-filters{width:100%}}

/* Learning-path gamification */
.game-catalog-summary{grid-column:1/-1;display:flex;justify-content:space-between;gap:24px;align-items:center;padding:26px 30px;border-radius:24px;color:#fff;background:linear-gradient(120deg,#172554,#312e81 55%,#6d28d9);box-shadow:0 18px 42px rgba(49,46,129,.22);overflow:hidden;position:relative}.game-catalog-summary:after{content:"";position:absolute;width:240px;height:240px;border-radius:50%;right:-70px;top:-110px;background:rgba(255,255,255,.09)}.game-kicker{font-size:.78rem;font-weight:800;letter-spacing:.12em;color:#c4b5fd}.game-catalog-summary h2{font-size:clamp(1.5rem,3vw,2.25rem);margin:7px 0}.game-catalog-summary p{margin:0;color:#e0e7ff}.game-summary-stats{display:grid;grid-template-columns:auto auto;gap:2px 12px;align-items:baseline;min-width:220px}.game-summary-stats strong{font-size:1.45rem;color:#fbbf24}.game-summary-stats span{font-size:.78rem;color:#e0e7ff}.game-path-card{border:1px solid #e0e7ff;transition:transform .2s ease,box-shadow .2s ease}.game-path-card:hover{transform:translateY(-5px);box-shadow:0 18px 38px rgba(49,46,129,.15)}.course-path-label{position:absolute;left:12px;top:12px;background:#312e81;color:#fff;border-radius:999px;padding:7px 11px;font-size:.7rem;font-weight:800;letter-spacing:.06em}.path-reward-row{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 12px}.path-reward-row span{background:#f5f3ff;color:#5b21b6;border-radius:999px;padding:5px 8px;font-size:.7rem;font-weight:700}.path-reward-row .fa-star{color:#f59e0b}.quest-hud{padding:0!important;overflow:hidden;border:1px solid #ddd6fe!important}.quest-hud-title{display:flex;justify-content:space-between;gap:12px;padding:16px 16px 8px;background:linear-gradient(135deg,#312e81,#6d28d9);color:#fff}.quest-hud-title strong{color:#fde68a}.quest-xp{display:flex;gap:8px;padding:0 16px 14px;background:linear-gradient(135deg,#312e81,#6d28d9);color:#ede9fe;font-size:.78rem}.quest-map{max-height:360px;overflow:auto;padding:16px 12px;display:flex;flex-direction:column;gap:8px;background:#fafaff}.quest-node{width:100%;border:1px solid #e5e7eb;border-radius:14px;padding:9px;display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:9px;text-align:left;background:#fff;color:#334155;cursor:pointer}.quest-node:nth-child(even){margin-left:8px;width:calc(100% - 8px)}.quest-node-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#ede9fe;color:#6d28d9}.quest-node-copy{min-width:0;display:flex;flex-direction:column}.quest-node-copy strong{font-size:.78rem}.quest-node-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quest-node.available{border-color:#a78bfa}.quest-node.active{outline:3px solid rgba(139,92,246,.18);border-color:#7c3aed}.quest-node.completed .quest-node-icon{background:#dcfce7;color:#15803d}.quest-node.locked{opacity:.55;cursor:not-allowed}.quest-stars{font-size:.66rem;letter-spacing:-1px;color:#f59e0b}.boss-gate{display:flex;align-items:center;gap:11px;margin:0;padding:15px;background:#f1f5f9;color:#64748b;border-top:1px solid #e2e8f0}.boss-gate>i{font-size:1.4rem}.boss-gate div{display:flex;flex-direction:column}.boss-gate.unlocked{background:linear-gradient(120deg,#fef3c7,#fef9c3);color:#92400e}.quest-current-stat{margin-top:14px!important}.boss-preview-notice{max-width:760px;margin:0 auto 16px;display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border:1px solid #fbbf24;border-radius:16px;background:#fffbeb;color:#92400e}.boss-preview-notice div{display:flex;flex-direction:column}.boss-preview-notice span{font-size:.85rem}.boss-emblem{width:max-content;margin:0 auto 14px;border-radius:999px;padding:8px 16px;background:#312e81;color:#fde68a;font-weight:900;letter-spacing:.1em}.boss-emblem i{margin-right:7px}@media(max-width:700px){.game-catalog-summary{align-items:flex-start;flex-direction:column;padding:22px}.game-summary-stats{min-width:0}.quest-map{max-height:290px}}
.quiz-empty-state{text-align:center;padding:36px!important}.quiz-empty-icon{font-size:2.5rem;color:#f59e0b;margin-bottom:12px}.quiz-draft-label{display:inline-flex;align-items:center;gap:7px;margin-bottom:14px;padding:6px 10px;border-radius:999px;background:#fffbeb;color:#92400e;font-size:.75rem;font-weight:800;border:1px solid #fde68a}
.quest-node-copy em{display:block;margin-top:3px;color:#7c3aed;font-size:.68rem;font-style:normal;font-weight:700}
.catalog-filter-group{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:start;gap:12px;margin-top:12px}.catalog-filter-label{display:inline-flex;align-items:center;gap:7px;padding:10px 4px;color:#334155;font-size:.82rem;font-weight:800}.grade-filters .category-btn{min-width:52px}.catalog-empty-result{grid-column:1/-1;text-align:center;padding:46px 20px;border:1px dashed #cbd5e1;border-radius:20px;background:#f8fafc}.catalog-empty-result>i{font-size:2.3rem;color:#94a3b8}.catalog-empty-result h3{margin:12px 0 5px}.catalog-empty-result p{margin:0 0 16px;color:#64748b}@media(max-width:700px){.catalog-filter-group{grid-template-columns:1fr;gap:2px}.catalog-filter-label{padding-bottom:2px}}

/* Prevent the bounded learning sidebar from spilling over the comments card. */
.main-content-learning,.side-panel{min-width:0}
.side-panel{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.lesson-heading h1,.transcript-line,.boss-gate strong,.boss-gate small{overflow-wrap:anywhere}
.quest-map{overscroll-behavior:contain}
.quest-node{grid-template-columns:34px minmax(0,1fr) auto}
.boss-gate>i{flex:0 0 auto}
.boss-gate div{min-width:0}
.quest-current-stat .progress-stat{align-items:flex-start;gap:12px}
.quest-current-stat .progress-stat span:first-child{min-width:0;overflow-wrap:anywhere}
.quest-current-stat .progress-stat span:last-child{flex:0 0 auto;text-align:right}
@media(max-width:900px){.side-panel{overflow:visible;scrollbar-gutter:auto}}
@media(max-width:700px){.comment-form{flex-direction:column}.comment-form textarea,.comment-form button{width:100%}}
