/* ===================================================================
 * Normalibul Oyun Stilleri - 
 * =================================================================== */

:root {
  --brand-color: #8b5cf6; /* Ana Mor */
  --brand-color-light: #a78bfa;
  --brand-color-dark: #4c1d95;
  --brand-color-transparent: rgba(139, 92, 246, 0.1);

  --dark-bg: #0f172a; /* Ana Arka Plan */
  --dark-bg-panel: #1e293b; /* Panel Arka Planı */
  --dark-bg-card: rgba(
    30,
    41,
    59,
    0.7
  ); /* Kart Arka Planı (Hafif Transparan) */

  --text-mlight: #f8fafc; /* En Açık Metin */
  --text-mcolor: #adadad; /* Orta Metin */
  --text-dark: #333333;
  --text-dark: #333333;
  --text-medium: #666666;
  --text-light: #888888;

  --border-color: rgba(148, 163, 184, 0.2); /* Sınır Rengi */

  --success-color: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --success-border: rgba(34, 197, 94, 0.3);

  --error-color: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.3);

  --rank-1-color: #f59e0b;
  --rank-2-color: #94a3b8;
  --rank-3-color: #f97316;
}

/* Genel Konteyner ve Arka Plan */
.normalibul-oyun-body {
  background: var(--dark-bg);
  min-height: 100vh;
}

.normalibul-oyun-container {
  width: 100%;
  max-width: 500px; /* Dashboard için biraz daha geniş */
  margin: 0 auto;
  padding: 1rem 0.5rem;
  position: relative;
}

/* YENİ REKLAM ALANI */
.normalibul-reklam-alani {
  width: 100%;
  max-width: 728px; /* Standart banner boyutu */
  height: 90px;
  background: var(--dark-bg-panel);
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem auto;
  color: var(--text-dark);
  margin-top: 7em;
  margin-bottom: 7em;
}
.normalibul-reklam-alani span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-mcolor);
}
.normalibul-reklam-alani p {
  font-size: 0.75rem;
  margin: 0.25rem 0 0 0;
}

/* Yüklenme ve Hata Ekranları (Daha profesyonel) */
.normalibul-oyun-loader,
.normalibul-oyun-error-state {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px; /* Daha yuvarlak */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  flex-direction: column;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}
.normalibul-oyun-error-state h3 {
  color: var(--error-color);
  margin-bottom: 0.75rem;
}
.normalibul-oyun-loader p,
.normalibul-oyun-error-state p {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text-mcolor);
  font-weight: 500;
}
.normalibul-oyun-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--brand-color-transparent);
  border-top-color: var(--brand-color);
  border-radius: 50%;
  animation: normalibul-oyun-spin 1s linear infinite;
}
@keyframes normalibul-oyun-spin {
  to {
    transform: rotate(360deg);
  }
}
.normalibul-oyun-hidden {
  display: none !important;
}

/* YENİ DASHBOARD BAŞLIĞI */
.normalibul-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem 1.5rem 0.5rem;
}
.normalibul-logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.normalibu-logo {
  height: 40px; /* Daha kompakt bir logo */
  filter: drop-shadow(0 4px 10px rgba(139, 92, 246, 0.3));
  transition: transform 0.3s ease;
}
.normalibu-logo:hover {
  transform: scale(1.05);
}
.normalibul-game-id {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-color);
  background: var(--dark-bg-panel);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}
.normalibul-header-actions {
  display: flex;
  gap: 0.5rem;
}
.normalibul-icon-btn {
  background: var(--dark-bg-panel);
  color: var(--text-mcolor);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.normalibul-icon-btn:hover {
  color: var(--brand-color);
  border-color: var(--brand-color);
  background: var(--brand-color-transparent);
  transform: scale(1.05);
}

/* Eski Başlık (Artık Dashboard Başlığında) */
.normalibul-oyun-header {
  display: none;
}

/* Orta Panel (Artık sadece bir konteyner) */
.normalibul-oyun-orta-panel {
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Widget'lar arası boşluk */
}

/* Lider Tablosu Vitrini (Dashboard Widget) */
.normalibul-oyun-lider-vitrini {
  background: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.6),
    rgba(15, 23, 42, 0.8)
  );
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.vitrin-baslik {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.vitrin-baslik h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mlight);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.vitrin-baslik h3 i {
  margin-right: 0.5rem;
  color: var(--brand-color);
}
.normalibul-oyun-panel-link {
  font-size: 0.8rem;
  color: var(--brand-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}
.normalibul-oyun-panel-link:hover {
  color: var(--brand-color-light);
  transform: translateX(2px);
}
.normalibul-oyun-panel-link i {
  margin-left: 0.25rem;
}

.normalibul-oyun-lider-vitrini .normalibul-oyun-liste {
  display: flex;
  justify-content: space-around;
  align-items: flex-start; /* Hizalama ayarlandı */
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.normalibul-oyun-lider-vitrini .normalibul-oyun-liste-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  position: relative;
}
.normalibul-oyun-lider-vitrini .normalibul-oyun-lider-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}
.lider-sira-ikon {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  height: 16px;
}
.normalibul-oyun-lider-vitrini
  .normalibul-oyun-liste-item.rank-1
  .normalibul-oyun-lider-avatar {
  border-color: var(--rank-1-color);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}
.normalibul-oyun-lider-vitrini
  .normalibul-oyun-liste-item.rank-1
  .lider-sira-ikon {
  color: var(--rank-1-color);
}

.normalibul-oyun-lider-vitrini
  .normalibul-oyun-liste-item.rank-2
  .normalibul-oyun-lider-avatar {
  border-color: var(--rank-2-color);
  box-shadow: 0 0 15px rgba(148, 163, 184, 0.3);
}
.normalibul-oyun-lider-vitrini
  .normalibul-oyun-liste-item.rank-2
  .lider-sira-ikon {
  color: var(--rank-2-color);
}

.normalibul-oyun-lider-vitrini
  .normalibul-oyun-liste-item.rank-3
  .normalibul-oyun-lider-avatar {
  border-color: var(--rank-3-color);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}
.normalibul-oyun-lider-vitrini
  .normalibul-oyun-liste-item.rank-3
  .lider-sira-ikon {
  color: var(--rank-3-color);
}

.normalibul-oyun-lider-vitrini .normalibul-oyun-lider-isim {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-mcolor);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* YENİ OYUN KARTI (Dashboard Widget) */
.normalibul-oyun-kart {
  background: var(--dark-bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Soru Alanı (Yeniden Düzenlendi) */
.normalibul-oyun-soru-baslik {
  text-align: center;
  margin-bottom: 1.5rem;
}
.question-image {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.post-category {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  /* Renkler JS'den dinamik geliyor, temel stiller burada */
  background: var(--brand-color-transparent);
  color: var(--brand-color);
}
.question-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-mlight);
  margin: 0.5rem 0 0.75rem 0;
  line-height: 1.4;
}
.question-subtitle,
.question-description {
  font-size: 0.95rem;
  color: var(--text-mlight);
  margin: 0.5rem 0 0 0;
  line-height: 1.6;
}
.question-description {
  font-size: 0.9rem;
  color: var(--text-mlight);
}

/* Cevap Listesi (Daha Şık Butonlar) */
.normalibul-oyun-cevap-listesi {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Butonlar arası boşluk */
}
.normalibul-oyun-cevap-item-wrapper {
  list-style: none;
  margin-bottom: 0; /* Artık gap ile yönetiliyor */
}
.normalibul-oyun-cevap-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: left;
}
.normalibul-oyun-cevap-btn:hover:not(:disabled) {
  background: var(--dark-bg-panel);
  border-color: var(--brand-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}
.normalibul-oyun-cevap-btn .normalibul-oyun-cevap-metin {
  font-size: 0.95rem;
  color: var(--text-mcolor);
  font-weight: 500;
  flex: 1;
  transition: color 0.2s ease;
}
.normalibul-oyun-cevap-btn:hover:not(:disabled) .normalibul-oyun-cevap-metin {
  color: var(--text-mlight);
}
.normalibul-oyun-cevap-btn .vote-count {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.85rem;
  display: none;
  background: var(--dark-bg-panel);
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
}
.normalibul-oyun-cevap-btn .vote-count.visible {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Doğru/Yanlış Cevap Stilleri (Daha Belirgin) */
.normalibul-oyun-cevap-btn.correct {
  background: var(--success-bg);
  border-color: var(--success-border);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}
.normalibul-oyun-cevap-btn.correct .normalibul-oyun-cevap-metin {
  color: var(--success-color);
  font-weight: 600;
}
.normalibul-oyun-cevap-btn.correct .vote-count {
  background: var(--success-bg);
  color: var(--success-color);
}
.normalibul-oyun-cevap-btn.incorrect {
  background: var(--error-bg);
  border-color: var(--error-border);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}
.normalibul-oyun-cevap-btn.incorrect .normalibul-oyun-cevap-metin {
  color: var(--error-color);
}
.normalibul-oyun-cevap-btn.incorrect .vote-count {
  background: var(--error-bg);
  color: var(--error-color);
}
.normalibul-oyun-cevap-btn:disabled {
  cursor: not-allowed;
  opacity: 0.9;
}
.normalibul-oyun-cevap-btn:disabled:not(.correct):not(.incorrect) {
  opacity: 0.6; /* Seçilmeyenleri soldur */
}

/* Sonuç Mesajı */
#result-message-container {
  margin-top: 0; /* Cevap listesinin margin-bottom'u hallediyor */
  margin-bottom: 1.5rem;
  text-align: center;
}
.result-message {
  padding: 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid;
}
.result-message.success {
  background: var(--success-bg);
  color: var(--success-color);
  border-color: var(--success-border);
}
.result-message.error {
  background: var(--error-bg);
  color: var(--error-color);
  border-color: var(--error-border);
}
.result-message i {
  margin-right: 0.5rem;
}

/* Geri Sayım Sayacı (Daha Şık) */
#next-question-timer-container {
  margin-top: 0rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border-color);
}
.timer-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mcolor);
  margin-bottom: 0.75rem;
  text-align: center;
}
.timer-text span {
  color: var(--brand-color-light);
  font-weight: 600;
}
.timer-progress-bar {
  position: relative;
  width: 100%;
  height: 12px; /* Daha ince */
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}
.timer-progress {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--brand-color),
    var(--brand-color-light)
  );
  border-radius: 12px;
  transition: width 1s linear;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}
.timer-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-mlight);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Geri Bildirim Butonu (Artık Başlıkta) */
.feedback-container {
  display: none; /* Eskisi gizlendi */
}

/* Modal Stilleri */
.leaderboard-modal-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
.leaderboard-modal-item:hover {
  background: var(--dark-bg-panel);
  border-color: var(--brand-color);
}
.leaderboard-modal-score {
  background: var(--brand-color);
  padding: 0.375rem 0.75rem;
  font-weight: 700;
  color: #fff;
  margin-left: auto;
  border-radius: 20px;
  font-size: 0.8rem;
}
.leaderboard-modal-title {
  font-weight: 700;
  color: var(--text-mlight);
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}
.normalibul-oyun-lider-sira {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-color-light);
  margin-right: 0.75rem;
  width: 24px;
  text-align: center;
}
.normalibul-oyun-lider-sira.rank-1 {
  color: var(--rank-1-color);
}
.normalibul-oyun-lider-sira.rank-2 {
  color: var(--rank-2-color);
}
.normalibul-oyun-lider-sira.rank-3 {
  color: var(--rank-3-color);
}

.normalibul-oyun-lider-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  margin-right: 0.75rem;
}
.normalibul-oyun-lider-isim {
  font-weight: 500;
  flex-grow: 1;
  color: var(--text-mcolor);
  font-size: 0.9rem;
}

/* Veri olmadığında gösterilecek mesaj */
.no-data-message {
  color: var(--text-dark);
  padding: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

/* SweetAlert Özel Stilleri */
.feedback-swal-popup,
.leaderboard-swal-popup {
  background: var(--dark-bg-panel) !important;
  border-radius: 20px !important;
  border: 1px solid var(--border-color);
  color: var(--text-mlight) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4) !important;
}
.feedback-swal-title,
.leaderboard-swal-popup .swal2-title {
  color: var(--text-mlight) !important;
  font-size: 1.2rem !important;
}
.feedback-swal-html-container,
.leaderboard-swal-popup .swal2-html-container {
  color: var(--text-mcolor) !important;
  font-size: 0.9rem;
  line-height: 1.5;
}
.feedback-options {
  list-style: none;
  padding: 0;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.feedback-options a {
  display: block;
  padding: 0.875rem;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-mcolor);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.feedback-options a:hover {
  background: var(--brand-color-transparent);
  border-color: var(--brand-color);
  color: var(--brand-color);
}
.feedback-options a i {
  margin-right: 0.5rem;
  width: 16px;
  text-align: center;
}
.leaderboard-swal-popup .swal2-close-button {
  color: var(--text-mcolor) !important;
}
.leaderboard-swal-popup .swal2-close-button:hover {
  color: var(--brand-color) !important;
}

/* Responsive Düzenlemeler */
@media (max-width: 480px) {
  .normalibul-oyun-container {
    padding: 0.5rem;
  }
  .normalibul-reklam-alani {
    border-radius: 12px;
    margin-bottom: 1rem;
    height: 60px; /* Mobilde daha küçük */
  }
  .normalibul-reklam-alani span {
    font-size: 0.8rem;
  }
  .normalibul-reklam-alani p {
    display: none;
  }

  .normalibul-oyun-kart,
  .normalibul-oyun-lider-vitrini {
    padding: 1.25rem;
    border-radius: 16px;
  }
  .question-title {
    font-size: 1.2rem;
  }
  .normalibul-oyun-cevap-btn {
    padding: 0.875rem 1rem;
  }
  .normalibul-oyun-cevap-btn .normalibul-oyun-cevap-metin {
    font-size: 0.9rem;
  }
}
