/* GeoEdu - 8-sinf Interaktiv Ta'lim Portali CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0f766e;      /* Deep Teal */
    --primary-light: #14b8a6;/* Bright Teal */
    --primary-glow: rgba(20, 184, 166, 0.15);
    --secondary: #b45309;    /* Warm Amber */
    --secondary-light: #f59e0b; /* Amber */
    --background: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text: #0f172a;
    --text-muted: #64748b;
    --border: rgba(226, 232, 240, 0.8);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --blur: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode overrides (applied via .dark class) */
.dark {
    --background: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.85);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(31, 41, 55, 0.8);
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Header & Navigation */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur));
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle, .back-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover, .back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.back-btn {
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 2rem 3.5rem;
    margin: 0 auto 2rem;
    text-align: center;
    background-image: linear-gradient(180deg, rgba(6, 20, 24, 0.62) 0%, rgba(6, 20, 24, 0.72) 55%, var(--background) 100%), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center 65%;
    background-repeat: no-repeat;
}

.hero-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.hero h1 .accent {
    color: var(--primary-light);
}

.hero p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

/* Stats Counter Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.stat-icon {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

/* Topics Grid */
.topics-section {
    max-width: 1400px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
}

.topics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.topic-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
    opacity: 0.8;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.topic-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-glow);
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
}

.topic-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.topic-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text);
    line-height: 1.4;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1.5rem;
}

.topic-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.start-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.start-btn:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Dynamic Interactive Console Overlay */
.console-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 1000;
    display: none;
    flex-direction: column;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.console-header {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(var(--blur));
}

.console-title-block h2 {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.console-title-block p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.console-close {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.console-close:hover {
    background: #ef4444;
    color: white;
}

/* Console Workspace & Navigation */
.console-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.console-sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.tab-btn i {
    font-size: 1.2rem;
}

.tab-btn:hover {
    background: var(--border);
    color: var(--text);
}

.tab-btn.active {
    background: var(--primary-glow);
    border-color: rgba(20, 184, 166, 0.2);
    color: var(--primary);
}

.console-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    position: relative;
    background: rgba(255,255,255,0.2);
}

.dark .console-content {
    background: rgba(0,0,0,0.1);
}

.console-panel {
    display: none;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

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

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

/* Custom PDF Frame */
.pdf-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 600px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow);
}

.pdf-iframe {
    width: 100%;
    flex: 1;
    border: none;
}

.pdf-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.pdf-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.pdf-fullscreen-btn:hover {
    background: var(--primary-light);
}

.pdf-container:fullscreen,
.pdf-container:-webkit-full-screen {
    height: 100%;
    background: #000;
}

/* Quiz UI inside Dashboard */
.quiz-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.quiz-progress {
    height: 8px;
    background: var(--border);
    border-radius: 50px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    transition: width 0.4s ease;
}

.quiz-question-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.quiz-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-opt {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.quiz-opt:hover {
    border-color: var(--primary-light);
    background: var(--primary-glow);
    transform: translateX(4px);
}

.quiz-opt.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: #10b981 !important;
    color: #047857 !important;
}

.quiz-opt.incorrect {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}

.quiz-opt.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.quiz-opt.disabled.correct, .quiz-opt.disabled.incorrect {
    opacity: 1;
}

.quiz-explanation {
    background: var(--primary-glow);
    border-left: 4px solid var(--primary-light);
    padding: 1.2rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.quiz-explanation.error {
    background: rgba(239, 68, 68, 0.05);
    border-left-color: #ef4444;
}

.quiz-next-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    float: right;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.quiz-next-btn:hover {
    background: var(--primary-light);
}

/* Crossword Puzzle Board */
.crossword-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.crossword-layout {
    display: flex;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.crossword-grid {
    display: grid;
    gap: 2px;
    background: var(--border);
    border: 3px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
    width: fit-content;
}

.crossword-cell {
    width: 42px;
    height: 42px;
    background: #0f172a; /* Black/empty block by default */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-weight: 700;
    font-size: 1.2rem;
}

.crossword-cell.active-cell {
    background: white;
}

.dark .crossword-cell.active-cell {
    background: #1e293b;
}

.crossword-cell-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
}

.crossword-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text);
    font-size: 1.2rem;
    outline: none;
}

.crossword-input:focus {
    background: var(--primary-glow);
}

.crossword-clues {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.clue-group h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.25rem;
}

.clue-item {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    display: flex;
    gap: 0.5rem;
}

.clue-number {
    font-weight: 700;
    color: var(--primary);
}

/* Homework Uploader & Files */
.hw-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    background: var(--card-bg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hw-upload-zone:hover {
    border-color: var(--primary-light);
    background: var(--primary-glow);
}

.hw-upload-zone i {
    font-size: 3rem;
    color: var(--primary);
}

.hw-file-input {
    display: none;
}

.hw-form-group {
    margin-bottom: 1.5rem;
}

.hw-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.hw-input, .hw-textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.hw-input:focus, .hw-textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.hw-submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.hw-submit-btn:hover {
    background: var(--primary-light);
}

/* Notifications & Alerts */
.alert-popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card-bg);
    border-left: 5px solid var(--primary-light);
    padding: 1.2rem 2rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.alert-success {
    border-left-color: #10b981;
}

.alert-error {
    border-left-color: #ef4444;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================
   LMS AUTH & STUDENT PROFILE MODAL CSS
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: var(--transition);
}

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

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow), 0 20px 50px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-lg);
    position: relative;
    width: 100%;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--border);
    border: none;
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
    z-index: 10;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

/* Auth Card specifics */
.auth-card {
    max-width: 450px;
    padding: 3rem 2.5rem;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.auth-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.auth-tab-btn.active {
    color: var(--primary);
}

.auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 5px;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 1.2rem;
}

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

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.2rem 1rem 3.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    color: var(--text);
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.submit-auth-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.submit-auth-btn:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Profile Modal specifics */
.profile-card-modal {
    max-width: 950px;
    padding: 3rem;
}

.profile-layout {
    display: flex;
    gap: 3rem;
}

.profile-sidebar-modal {
    width: 280px;
    border-right: 1px solid var(--border);
    padding-right: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    background: var(--primary-glow);
    color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.1);
}

.profile-sidebar-modal h3 {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.profile-role-badge {
    background: var(--secondary-light);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.progress-ring-container {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-percent {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.progress-ring-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.quick-stats-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
}

.quick-stat-item .label {
    color: var(--text-muted);
}

.quick-stat-item .value {
    font-weight: 700;
    color: var(--text);
}

.profile-details-modal {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-tabs {
    display: flex;
    gap: 1.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.profile-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 700;
    padding-bottom: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.profile-tab-btn.active {
    color: var(--primary);
}

.profile-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 5px;
}

.profile-panel-modal {
    display: none;
    flex-direction: column;
    overflow-y: auto;
    max-height: 450px;
    padding-right: 0.5rem;
}

.profile-panel-modal.active {
    display: flex;
}

.profile-panel-modal h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Telegram bog'lash (profil modali) */
.tg-link-status {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.tg-link-status i {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.tg-link-status.tg-linked i {
    color: #10b981;
}

.tg-link-status.tg-unlinked i {
    color: #29a9eb;
}

.tg-link-status strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.tg-link-status p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.tg-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #29a9eb;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.tg-link-btn:hover {
    background: #1c8cc9;
}

.tg-link-hint {
    margin-top: 0.85rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* History Timeline */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.history-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4px;
    width: 2px;
    height: 100%;
    background: var(--border);
}

.timeline-item {
    position: relative;
}

.timeline-icon {
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    color: var(--primary);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    z-index: 2;
}

.timeline-item.hw-type .timeline-icon {
    border-color: var(--secondary-light);
    color: var(--secondary-light);
}

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--primary-light);
    transform: translateX(3px);
}

.timeline-header-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-title {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline-comment {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    background: var(--border);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    border-left: 3px solid var(--primary);
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge.status-graded {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Leaderboard design */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.leaderboard-table tr.top-three {
    background: var(--primary-glow);
}

.total-score-badge {
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
}

/* Premium header btns classes */
.login-trigger-btn, .admin-btn, .profile-btn {
    background: var(--primary);
    color: white !important;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.login-trigger-btn:hover, .admin-btn:hover, .profile-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.admin-btn {
    background: var(--secondary);
}

.admin-btn:hover {
    background: var(--secondary-light);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .profile-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .profile-sidebar-modal {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 2rem;
    }
}

/* ==========================================
   INTERACTIVE GEOGRAPHY MAP CSS
   ========================================== */
.map-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1rem;
}

.map-wrapper {
    flex: 1.4;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.map-svg {
    width: 100%;
    height: auto;
    max-height: 520px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.2));
}

.map-region {
    fill: rgba(20, 184, 166, 0.08);
    stroke: rgba(20, 184, 166, 0.35);
    stroke-width: 1.5;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toshkent shahar — poytaxt alohida ko'rinishi */
#svg_tashkent_city {
    fill: rgba(245, 158, 11, 0.12);
    stroke: rgba(245, 158, 11, 0.6);
    stroke-width: 1.5;
    stroke-dasharray: 3 2;
}

.map-region:hover {
    fill: rgba(20, 184, 166, 0.22);
    stroke: var(--primary-light);
    stroke-width: 2;
    filter: drop-shadow(0 0 10px rgba(20, 184, 166, 0.5));
}

.map-region.correct-glow {
    fill: rgba(16, 185, 129, 0.3) !important;
    stroke: #10b981 !important;
    stroke-width: 2.5 !important;
    filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.7)) !important;
    animation: correctPulse 0.6s ease;
}

.map-region.incorrect-glow {
    fill: rgba(239, 68, 68, 0.25) !important;
    stroke: #ef4444 !important;
    stroke-width: 2.5 !important;
    filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.6)) !important;
    animation: shakePulse 0.4s ease;
}

.map-region.target-selected {
    fill: rgba(245, 158, 11, 0.22) !important;
    stroke: #f59e0b !important;
    stroke-width: 2.5 !important;
    filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.6)) !important;
    animation: selectedPulse 0.5s ease;
}

@keyframes correctPulse {
    0%   { filter: drop-shadow(0 0 0px rgba(16, 185, 129, 0)); }
    50%  { filter: drop-shadow(0 0 24px rgba(16, 185, 129, 0.9)); }
    100% { filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.7)); }
}

@keyframes shakePulse {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes selectedPulse {
    0%   { filter: drop-shadow(0 0 0px rgba(245, 158, 11, 0)); }
    50%  { filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.9)); }
    100% { filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.6)); }
}

.map-sidebar {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-height: 420px;
    max-height: 560px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.map-sidebar::-webkit-scrollbar {
    width: 4px;
}

.map-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.map-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.map-game-box {
    text-align: center;
    padding: 1.5rem;
    background: rgba(20, 184, 166, 0.05);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--primary-light);
}

.region-info-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    animation: fadeIn 0.35s ease;
}

.region-info-card h4 {
    font-size: 1.1rem;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    font-weight: 700;
}

.region-info-stat {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(255,255,255,0.04);
    padding-bottom: 0.35rem;
    gap: 0.5rem;
}

.region-info-stat .label {
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.region-info-stat strong {
    color: var(--text);
    text-align: right;
    font-weight: 500;
}

@media (max-width: 992px) {
    .map-layout {
        flex-direction: column;
    }
    .map-sidebar {
        width: 100%;
        min-height: auto;
        max-height: 350px;
    }
}

/* Map Mode switching buttons - elegant horizontal inline tabs */
.map-mode-btn {
    background: rgba(20, 184, 166, 0.05);
    border: 1px solid rgba(20, 184, 166, 0.2);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.map-mode-btn:hover {
    background: rgba(20, 184, 166, 0.12);
    color: var(--text);
    border-color: rgba(20, 184, 166, 0.35);
}

.map-mode-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 14px rgba(20, 184, 166, 0.45);
}

/* Pulsating interactive neon markers for the map image */
.map-pins-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-pin {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #2dd4bf;
    border: 3px solid #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.8), 0 0 20px rgba(45, 212, 191, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    z-index: 10;
}

.map-pin::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid #2dd4bf;
    opacity: 0;
    animation: pinPulse 1.8s infinite ease-out;
}

@keyframes pinPulse {
    0% { transform: scale(0.6); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.map-pin:hover {
    background: #fbbf24;
    border-color: #ffffff;
    transform: translate(-50%, -50%) scale(1.35);
    box-shadow: 0 0 18px rgba(251, 191, 36, 1), 0 0 30px rgba(251, 191, 36, 0.6);
}

.map-pin.active {
    background: #10b981;
    border-color: #ffffff;
    transform: translate(-50%, -50%) scale(1.35);
    box-shadow: 0 0 18px rgba(16, 185, 129, 1), 0 0 30px rgba(16, 185, 129, 0.6);
}

.map-pin.correct {
    background: #10b981 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 1) !important;
    animation: pinCorrectFlash 0.5s ease-out;
}

.map-pin.incorrect {
    background: #ef4444 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 1) !important;
    animation: pinIncorrectShake 0.4s ease-in-out;
}

@keyframes pinCorrectFlash {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
    100% { transform: translate(-50%, -50%) scale(1.35); }
}

@keyframes pinIncorrectShake {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    25% { transform: translate(-50%, -50%) translateX(-4px); }
    75% { transform: translate(-50%, -50%) translateX(4px); }
}
