/**
 * ZUKKO AVLOD — DASHBOARD VA SAHIFA USLUBLARI (DASHBOARD.CSS)
 * Navigatsiya, Bosh sahifa paneli, Fanlar kartalari, Mavzular va Profillar.
 */

/* TOPBAR NAVIGATION */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.75rem 1.5rem;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  text-decoration: none;
}

.logo-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.6));
}

.logo-text-group h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #60a5fa, #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* NAVIGATION LINKS */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  background: transparent;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #fff;
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.4);
}

/* HEADER USER CONTROLS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tool-pill-btn {
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.tool-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-glass-light);
}

.tool-pill-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.icon-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.icon-circle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.user-status-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.user-status-pill:hover {
  border-color: var(--blue-royal);
}

.user-av-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-royal), var(--purple-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name-small {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.user-xp-small {
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 600;
}

/* HERO BANNER */
.hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(124, 58, 237, 0.25) 100%), var(--bg-card);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #93c5fd;
  margin-bottom: 0.8rem;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.hero-username {
  color: #60a5fa;
}

.hero-motto {
  font-size: 1.05rem;
  color: #cbd5e1;
  font-style: italic;
  margin-bottom: 1.8rem;
  max-width: 650px;
}

.hero-action-buttons {
  display: flex;
  gap: 1rem;
}

.hero-profile-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-width: 250px;
  text-align: center;
}

.hero-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-royal), var(--purple-primary));
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
}

.hero-level-chip {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.lvl-number {
  padding: 0.2rem 0.6rem;
  background: var(--blue-royal);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8rem;
}

.lvl-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}

.hero-xp-bar-box {
  width: 100%;
}

.hero-xp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.hero-xp-progress-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hero-xp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #ec4899);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* WIDGETS GRID */
.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.widget-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.widget-icon {
  font-size: 2rem;
}

.widget-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.widget-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quest-reward-pill {
  margin-left: auto;
  padding: 0.3rem 0.7rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
}

.quest-desc {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.quest-progress-box {
  margin-bottom: 1.2rem;
}

.quest-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.quest-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quest-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-emerald), #34d399);
  border-radius: var(--radius-full);
}

.badge-claimed {
  display: block;
  text-align: center;
  padding: 0.6rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.arena-pitch {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.arena-quick-stats {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

/* SECTION HEADER */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
}

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

/* SUBJECTS GRID (11 SUBJECTS) */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.subject-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.subject-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--glow-blue);
}

.subject-card-top {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subject-card-icon {
  font-size: 2.8rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.subject-topics-count {
  padding: 0.3rem 0.7rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.subject-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.subject-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.subject-card-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  flex: 1;
}

.subject-card-desc {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.subject-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.subject-questions-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: #93c5fd;
}

.subject-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.subject-card:hover .subject-arrow {
  transform: translateX(4px);
  color: #fff;
}

/* TOPIC LESSON VIEW */
.topic-lesson-container, .subject-detail-container {
  max-width: 900px;
  margin: 0 auto;
}

.lesson-crumb {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.crumb-link {
  color: #60a5fa;
  cursor: pointer;
}

.crumb-link:hover {
  text-decoration: underline;
}

.lesson-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.lesson-summary-lead {
  font-size: 1.1rem;
  color: #cbd5e1;
}

.lesson-section h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: #93c5fd;
}

.lesson-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #e2e8f0;
}

.lesson-examples-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lesson-example-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.example-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--blue-royal);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.example-text {
  font-size: 0.95rem;
  color: #f1f5f9;
}

.lesson-flashtip-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.tip-icon {
  font-size: 2rem;
}

.lesson-flashtip-card h4 {
  font-size: 1.05rem;
  color: #fbbf24;
  margin-bottom: 0.2rem;
}

.lesson-footer-buttons {
  display: flex;
  gap: 1rem;
}

/* TOPICS LIST GRID */
.topics-list-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topic-item-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.topic-item-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.topic-num-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid var(--blue-royal);
  color: #60a5fa;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-item-title-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.topic-item-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.topic-item-tip {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #cbd5e1;
}

.topic-item-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}

/* PROFILE PAGE */
.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
}

.profile-hero-avatar {
  font-size: 5rem;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-royal), var(--purple-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), var(--glow-blue);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.p-stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
}

.p-stat-icon { font-size: 2.2rem; margin-bottom: 0.4rem; display: block; }
.p-stat-val { font-size: 1.6rem; font-weight: 800; color: #fff; }
.p-stat-lbl { font-size: 0.85rem; color: var(--text-muted); }

.avatar-picker-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.avatar-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.avatar-btn:hover, .avatar-btn.active {
  background: rgba(37, 99, 235, 0.25);
  border-color: var(--blue-royal);
  transform: scale(1.1);
}

/* BADGES GRID */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.badge-card {
  text-align: center;
  padding: 2rem 1.5rem;
  transition: all 0.25s;
}

.badge-card.locked {
  opacity: 0.5;
  filter: grayscale(0.8);
}

.badge-card.unlocked {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-md), var(--glow-gold);
}

.badge-icon-box {
  position: relative;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.badge-status-check {
  position: absolute;
  bottom: 0;
  right: -10px;
  font-size: 1.2rem;
}

.badge-status-lock {
  position: absolute;
  bottom: 0;
  right: -10px;
  font-size: 1.2rem;
}

.badge-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.badge-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }

.badge-state-label {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
}

/* TEACHER DASHBOARD */
.teacher-hero {
  padding: 2rem;
  margin-bottom: 2rem;
  border-left: 6px solid #10b981;
}

.teacher-badge {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #34d399;
  margin-bottom: 0.5rem;
}

.teacher-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.t-stat-card { text-align: center; padding: 1.2rem; }
.t-stat-icon { font-size: 2rem; display: block; margin-bottom: 0.3rem; }
.t-stat-val { font-size: 1.6rem; font-weight: 800; color: #fff; }
.t-stat-lbl { font-size: 0.85rem; color: var(--text-muted); }

.tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.5rem;
}

.tab-btn {
  padding: 0.75rem 1.4rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.4);
  color: #fff;
}

.backup-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.backup-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.backup-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.backup-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; flex: 1; }
.backup-card.danger-card { border-color: rgba(239, 68, 68, 0.3); }

.t-custom-q-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.8rem;
}

.t-custom-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.btn-del-sm {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
}
