:root {
  --primary-color: #a8c5da;
  --secondary-color: #c3aed6;
  --success-color: #a8d5b5;
  --dark-color: #4a5568;
  --light-color: #f7f3f0;
  --transition-speed: 0.2s;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
}

body {
  min-height: 100vh;
  background-color: #1e3a6e;
  color: #f0f4f8;
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

html {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

body {
  overflow-y: auto;
}

#welcome-screen {
  min-height: auto;
}

.container-fluid {
  position: relative;
  z-index: 1;
}

/* Kartlar */
.glass-card {
  background: #2c3e5a;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: box-shadow var(--transition-speed) ease;
}

.glass-card:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4);
}

/* Cam butonlar - Sade ve Şık Minimalist Tasarım */
.btn-glass {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
}

.btn-glass:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-glass:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Öğrenci butonu - Şık indigo dokunuşu */
.btn-glass[href*="student"]:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(129, 140, 248, 0.5);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
}

/* Öğretmen butonu - Şık zümrüt dokunuşu */
.btn-glass[data-bs-target="#remoteGameModal"]:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(52, 211, 153, 0.5);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
}

/* Admin butonu - Şık gül dokunuşu */
.btn-glass[href*="admin"]:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(251, 113, 133, 0.5);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.25);
}

/* Form elemanları */
.form-select,
.form-control {
  height: calc(2.5rem + 2px);
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #c8d7e6;
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3d4a5c;
  box-shadow: 0 1px 4px rgba(100, 130, 160, 0.08);
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  padding: 0.4rem 0.75rem;
}

.form-select:hover,
.form-control:hover {
  border-color: #a8c5da;
}

.form-select:focus,
.form-control:focus {
  border-color: #a8c5da;
  box-shadow: 0 0 0 3px rgba(168, 197, 218, 0.25);
  outline: none;
}

.form-select option {
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  padding: 12px;
  background: white;
  color: #3d4a5c;
}

/* Konu Seçim Menüsü (index.php) Numaraya Göre Renklendirme */
.form-select option.topic-prefix-opt-1 { color: #2563eb; font-weight: 600; background-color: #f0f6ff; }
.form-select option.topic-prefix-opt-2 { color: #059669; font-weight: 600; background-color: #ecfdf5; }
.form-select option.topic-prefix-opt-3 { color: #d97706; font-weight: 600; background-color: #fffbe6; }
.form-select option.topic-prefix-opt-4 { color: #7c3aed; font-weight: 600; background-color: #f5f3ff; }
.form-select option.topic-prefix-opt-5 { color: #db2777; font-weight: 600; background-color: #fdf2f8; }
.form-select option.topic-prefix-opt-6 { color: #0891b2; font-weight: 600; background-color: #ecfeff; }
.form-select option.topic-prefix-opt-7 { color: #dc2626; font-weight: 600; background-color: #fef2f2; }
.form-select option.topic-prefix-opt-8 { color: #475569; font-weight: 600; background-color: #f8fafc; }

/* Butonlar */
.btn {
  position: relative;
  transition: all var(--transition-speed) ease;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(100, 130, 160, 0.18);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #a8c5da;
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(168, 197, 218, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  letter-spacing: 2px;
  font-size: 1.25rem;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.btn-success::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-success:hover::before {
  width: 300px;
  height: 300px;
}

.btn-success:hover,
.btn-success:focus {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  color: #fff;
  box-shadow: 0 8px 25px rgba(118, 75, 162, 0.6);
  transform: translateY(-3px) scale(1.02);
}

.btn-dark {
  background: linear-gradient(135deg, #434343 0%, #000000 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.btn-dark:hover {
  background: linear-gradient(135deg, #000000 0%, #434343 100%);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.btn-dark[aria-pressed="true"],
.btn-dark.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

.btn-danger {
  background: #e8b4b8;
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 180, 184, 0.3);
}

.btn-glow {
  box-shadow: 0 0 12px rgba(168, 213, 181, 0.5);
}

.game-mode-buttons .btn,
.group-buttons .btn {
  min-width: 160px;
  margin: 0.25rem;
  padding: 0.75rem 1.5rem;
}

.btn[aria-pressed="true"] {
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ana başlık */
.main-title {
  font-family: "Poppins", sans-serif;
  font-size: 4rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 8px rgba(30, 60, 100, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .main-title {
    font-size: 1.25rem;
    letter-spacing: 1px;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
  }

  .quiz-setup,
  .game-options {
    padding: 0.5rem;
    margin-bottom: 0.35rem !important;
  }

  .quiz-setup h2,
  .game-options h2 {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
  }

  .game-mode-buttons .btn,
  .group-buttons .btn {
    width: auto;
    margin: 0.15rem;
  }

  #start-btn {
    width: 100%;
    padding: 0.4rem;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
  }

  .btn-glass {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .form-select,
  .form-control {
    height: calc(2rem + 2px);
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
  }

  .mode-container {
    gap: 6px;
    margin-top: 6px;
  }

  .mode-section {
    padding: 6px;
    min-width: 100%;
  }

  .mode-title {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }

  .game-start {
    padding: 0 0.25rem;
    margin-bottom: 0.35rem !important;
  }

  #start-btn-info {
    font-size: 0.65rem;
    margin-top: 0.2rem !important;
  }

  nav.position-fixed {
    gap: 0.35rem !important;
    max-width: none !important;
  }

  #mode-disabled-info {
    font-size: 0.65rem;
    margin-bottom: 0.35rem !important;
  }

  .container-fluid {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  #welcome-screen {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .col-lg-8.col-md-10 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .row.g-2 {
    --bs-gutter-y: 0.25rem;
    --bs-gutter-x: 0.25rem;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
  }

  .quiz-setup,
  .game-options {
    padding: 0.4rem;
    margin-bottom: 0.25rem !important;
  }

  .quiz-setup h2,
  .game-options h2 {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }

  .form-select,
  .form-control {
    height: calc(1.75rem + 2px);
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }

  .btn-glass {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  #start-btn {
    font-size: 0.75rem;
    padding: 0.35rem;
    letter-spacing: 0.5px;
  }

  .mode-container {
    gap: 4px;
  }

  .mode-section {
    padding: 4px;
  }

  .mode-title {
    font-size: 0.65rem;
    margin-bottom: 4px;
  }

  #mode-disabled-info {
    font-size: 0.6rem;
  }

  .game-mode-buttons .btn-mode {
    min-width: 36px !important;
    min-height: 36px !important;
  }
}

@media (max-height: 700px) {
  .main-title {
    font-size: 1.5rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
  }

  .quiz-setup,
  .game-options {
    padding: 0.5rem;
    margin-bottom: 0.35rem !important;
  }

  .mode-container {
    gap: 6px;
  }

  .mode-section {
    padding: 6px;
  }

  .game-start {
    margin-bottom: 0.25rem !important;
  }

  #welcome-screen {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
  }
}

@media (max-height: 600px) {
  .main-title {
    font-size: 1.25rem;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
  }

  .form-select,
  .form-control {
    height: calc(1.85rem + 2px);
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
  }

  .game-mode-buttons .btn-mode {
    min-width: 45px !important;
    min-height: 45px !important;
  }

  #start-btn {
    padding: 0.35rem;
    font-size: 0.8rem;
  }
}

/* Animasyonlar - sadece basit fade */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.main-title {
  animation: fadeIn 0.5s ease-out;
}

/* Kartlar ve bölümler */
.quiz-setup,
.game-options {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(30, 60, 100, 0.2);
  transition: box-shadow var(--transition-speed) ease;
}

.quiz-setup:hover,
.game-options:hover {
  box-shadow: 0 6px 20px rgba(100, 130, 160, 0.15);
}

.quiz-setup h2,
.game-options h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Erişilebilirlik */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

@media (forced-colors: active) {
  .btn { border: 2px solid currentColor; }
}

/* Oyun Modu Konteyner */
.mode-container {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 10px;
  flex-wrap: wrap;
}

.mode-section {
  flex: 1;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 10px;
  border: 1px solid rgba(200, 215, 230, 0.4);
}

.mode-title {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .mode-section { min-width: 100%; }
}

/* Oyun Modu Butonları - Yüksek Kontrastlı, Net ve Şık */
.game-mode-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.game-mode-buttons .btn-mode {
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  outline: none;
  cursor: pointer;
}

.game-mode-buttons .btn-mode .game-mode-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 2px;
  border-radius: 12px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* Klasik Mod Butonları (Tek / Çok Oyunculu) */
.game-mode-buttons .btn-mode[data-mode="single"] {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 1.25rem;
}

.game-mode-buttons .btn-mode[data-mode="multi"] {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  font-size: 1.25rem;
}

/* Özel Oyun Butonları */
.game-mode-buttons .btn-mode[data-mode="fenito"],
.game-mode-buttons .btn-mode[data-mode="snl"],
.game-mode-buttons .btn-mode[data-mode="milyoner"] {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Hover Stili */
.game-mode-buttons .btn-mode:not(:disabled):hover {
  transform: translateY(-3px);
  border-color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.game-mode-buttons .btn-mode:not(:disabled):hover .game-mode-img {
  transform: scale(1.08);
}

/* Seçili (Aktif) Durum */
.game-mode-buttons .btn-mode.active,
.game-mode-buttons .btn-mode[aria-pressed="true"] {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 6px 20px rgba(0, 0, 0, 0.4) !important;
  transform: translateY(-2px) scale(1.05);
}

.game-mode-buttons .btn-mode[data-mode="single"].active,
.game-mode-buttons .btn-mode[data-mode="single"][aria-pressed="true"] {
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.6), 0 6px 20px rgba(79, 70, 229, 0.5) !important;
}

.game-mode-buttons .btn-mode[data-mode="multi"].active,
.game-mode-buttons .btn-mode[data-mode="multi"][aria-pressed="true"] {
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.6), 0 6px 20px rgba(16, 185, 129, 0.5) !important;
}

.game-mode-buttons .btn-mode[data-mode="fenito"].active,
.game-mode-buttons .btn-mode[data-mode="snl"].active,
.game-mode-buttons .btn-mode[data-mode="milyoner"].active,
.game-mode-buttons .btn-mode[data-mode="fenito"][aria-pressed="true"],
.game-mode-buttons .btn-mode[data-mode="snl"][aria-pressed="true"],
.game-mode-buttons .btn-mode[data-mode="milyoner"][aria-pressed="true"] {
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.8), 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

/* Pasif (Disabled) Durumu */
.game-mode-buttons .btn-mode:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  filter: brightness(0.85);
  box-shadow: none;
}

.game-mode-buttons .btn-mode:disabled .game-mode-img {
  filter: brightness(0.85);
}

@media (max-width: 600px) {
  .game-mode-buttons.classic-modes,
  .game-mode-buttons.special-modes {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .game-mode-buttons .btn-mode {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    border-radius: 12px;
    font-size: 1rem;
    padding: 0;
  }

  .group-buttons .btn {
    min-width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }
}

/* Grup ve Modal Butonları - Sade ve Şık Minimalist Tasarım */
.btn-group-select {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 600;
  border-radius: 12px;
  min-width: 110px;
  padding: 0.6rem 1.2rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-group-select:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-group-select.active,
.btn-group-select[aria-pressed="true"] {
  background: rgba(99, 102, 241, 0.3);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-modal-action {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-modal-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

@media (max-width: 400px) {
  .game-mode-buttons .btn-mode {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
  }

  .group-buttons .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
  }
}

/* ─── Gruplu Konu Seçici (Beyaz Arka Plan & Renkli Gruplar) ─── */

.topic-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  min-height: 42px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}
.topic-trigger:hover,
.topic-trigger:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}
.topic-trigger.has-value {
  color: #0f172a;
  font-weight: 600;
  border-color: #3b82f6;
}
.topic-trigger-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.topic-trigger-icon {
  margin-left: 8px;
  font-size: 0.75rem;
  color: #64748b;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.topic-trigger.open .topic-trigger-icon {
  transform: rotate(180deg);
}

/* Açılır Panel - Beyaz & Şık */
.topic-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}
.topic-panel.open {
  display: block;
  animation: topicPanelIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes topicPanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.topic-group-block {
  border-bottom: 1px solid #f1f5f9;
}
.topic-group-block:last-child {
  border-bottom: none;
}

/* Grup Başlığı (Genel) */
.topic-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  user-select: none;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.topic-group-header:hover {
  filter: brightness(0.96);
}
.topic-group-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  opacity: 0.8;
}
.topic-group-header.open .topic-group-chevron {
  transform: rotate(90deg);
}
.topic-group-title {
  flex: 1;
}
.topic-group-badge {
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 9px;
}

/* Konu Maddeleri (Genel) */
.topic-group-items {
  display: none;
  background: #ffffff;
}
.topic-group-items.open {
  display: block;
}
.topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px 9px 34px;
  font-size: 0.86rem;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.12s, color 0.12s;
}
.topic-item:last-child {
  border-bottom: none;
}
.topic-item-title {
  flex: 1;
  font-weight: 500;
}
.topic-item-count {
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 2px 8px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ─── Grup Renk Temaları (Öneklere Göre Farklı Renkler) ─── */

/* 1. Grup - MAVİ */
.topic-group-header.group-prefix-1 {
  background: #eff6ff;
  color: #1d4ed8;
  border-left: 4px solid #2563eb;
}
.topic-group-header.group-prefix-1 .topic-group-badge {
  background: #dbeafe;
  color: #1e40af;
}
.topic-item.group-prefix-1 {
  color: #1d4ed8;
}
.topic-item.group-prefix-1:hover {
  background: #eff6ff;
  color: #1e40af;
}
.topic-item.group-prefix-1 .topic-item-count {
  background: #dbeafe;
  color: #1e40af;
}

/* 2. Grup - YEŞİL */
.topic-group-header.group-prefix-2 {
  background: #f0fdf4;
  color: #15803d;
  border-left: 4px solid #16a34a;
}
.topic-group-header.group-prefix-2 .topic-group-badge {
  background: #dcfce7;
  color: #166534;
}
.topic-item.group-prefix-2 {
  color: #15803d;
}
.topic-item.group-prefix-2:hover {
  background: #f0fdf4;
  color: #14532d;
}
.topic-item.group-prefix-2 .topic-item-count {
  background: #dcfce7;
  color: #166534;
}

/* 3. Grup - TURUNCU / AMBER */
.topic-group-header.group-prefix-3 {
  background: #fffbeb;
  color: #b45309;
  border-left: 4px solid #d97706;
}
.topic-group-header.group-prefix-3 .topic-group-badge {
  background: #fef3c7;
  color: #92400e;
}
.topic-item.group-prefix-3 {
  color: #b45309;
}
.topic-item.group-prefix-3:hover {
  background: #fffbeb;
  color: #78350f;
}
.topic-item.group-prefix-3 .topic-item-count {
  background: #fef3c7;
  color: #92400e;
}

/* 4. Grup - MOR */
.topic-group-header.group-prefix-4 {
  background: #faf5ff;
  color: #7e22ce;
  border-left: 4px solid #9333ea;
}
.topic-group-header.group-prefix-4 .topic-group-badge {
  background: #f3e8ff;
  color: #6b21a8;
}
.topic-item.group-prefix-4 {
  color: #7e22ce;
}
.topic-item.group-prefix-4:hover {
  background: #faf5ff;
  color: #581c87;
}
.topic-item.group-prefix-4 .topic-item-count {
  background: #f3e8ff;
  color: #6b21a8;
}

/* 5. Grup - KIRMIZI / GÜL */
.topic-group-header.group-prefix-5 {
  background: #fff1f2;
  color: #be123c;
  border-left: 4px solid #e11d48;
}
.topic-group-header.group-prefix-5 .topic-group-badge {
  background: #ffe4e6;
  color: #9f1239;
}
.topic-item.group-prefix-5 {
  color: #be123c;
}
.topic-item.group-prefix-5:hover {
  background: #fff1f2;
  color: #881337;
}
.topic-item.group-prefix-5 .topic-item-count {
  background: #ffe4e6;
  color: #9f1239;
}

/* 6. Grup - CYAN / TURKUAZ */
.topic-group-header.group-prefix-6 {
  background: #ecfeff;
  color: #0e7490;
  border-left: 4px solid #0891b2;
}
.topic-group-header.group-prefix-6 .topic-group-badge {
  background: #cffafe;
  color: #155e75;
}
.topic-item.group-prefix-6 {
  color: #0e7490;
}
.topic-item.group-prefix-6:hover {
  background: #ecfeff;
  color: #164e63;
}
.topic-item.group-prefix-6 .topic-item-count {
  background: #cffafe;
  color: #155e75;
}

/* 7. Grup - İNDİGO */
.topic-group-header.group-prefix-7 {
  background: #eef2ff;
  color: #4338ca;
  border-left: 4px solid #4f46e5;
}
.topic-group-header.group-prefix-7 .topic-group-badge {
  background: #e0e7ff;
  color: #3730a3;
}
.topic-item.group-prefix-7 {
  color: #4338ca;
}
.topic-item.group-prefix-7:hover {
  background: #eef2ff;
  color: #312e81;
}
.topic-item.group-prefix-7 .topic-item-count {
  background: #e0e7ff;
  color: #3730a3;
}

/* 8. Grup - TURUNCU / KIZIL */
.topic-group-header.group-prefix-8 {
  background: #fff7ed;
  color: #c2410c;
  border-left: 4px solid #ea580c;
}
.topic-group-header.group-prefix-8 .topic-group-badge {
  background: #ffedd5;
  color: #9a3412;
}
.topic-item.group-prefix-8 {
  color: #c2410c;
}
.topic-item.group-prefix-8:hover {
  background: #fff7ed;
  color: #7c2d12;
}
.topic-item.group-prefix-8 .topic-item-count {
  background: #ffedd5;
  color: #9a3412;
}

/* Diğer / Varsayılan */
.topic-group-header.group-prefix-diger {
  background: #f8fafc;
  color: #475569;
  border-left: 4px solid #64748b;
}
.topic-group-header.group-prefix-diger .topic-group-badge {
  background: #e2e8f0;
  color: #334155;
}
.topic-item.group-prefix-diger {
  color: #475569;
}
.topic-item.group-prefix-diger:hover {
  background: #f8fafc;
  color: #1e293b;
}
.topic-item.group-prefix-diger .topic-item-count {
  background: #e2e8f0;
  color: #334155;
}

/* Seçili Konu Vurgusu */
.topic-item.selected {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  font-weight: 700;
}
.topic-item.selected .topic-item-count {
  background: #0284c7;
  color: #ffffff;
}

/* Yükleniyor / Boş Durumu */
.topic-loading,
.topic-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.88rem;
  color: #64748b;
  background: #ffffff;
}


