/* KPSS 2026 Coğrafya İnteraktif Öğrenme Portalı - Açık & Şık Tasarım (CSS) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #f1f5f9; /* Slate 100 - Açık gri arka plan */
  --bg-panel: #ffffff; /* Temiz beyaz paneller */
  --bg-card: #f8fafc; /* Slate 50 - Kart arka planları */
  --bg-card-hover: #f1f5f9;
  --border-color: #cbd5e1; /* Slate 300 - Belirgin kenarlıklar */
  --border-active: #6366f1; /* Indigo - Aktif renk */
  
  --primary: #4f46e5; /* Indigo 600 */
  --secondary: #db2777; /* Pink 600 */
  --success: #059669; /* Emerald 600 */
  --error: #dc2626; /* Red 600 */
  --warning: #d97706; /* Amber 600 */
  
  --text-main: #0f172a; /* Slate 900 - Yüksek kontrastlı metin */
  --text-muted: #475569; /* Slate 600 */
  --text-bright: #0f172a;
  
  --font-sans: 'Inter', sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Glass/Flat panel styles */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  transition: var(--transition-smooth);
}

/* App Header */
header {
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
}

.logo-icon {
  font-size: 1.4rem;
}

.subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Container */
.app-container {
  display: flex;
  flex: 1;
}

/* Sidebar */
.sidebar {
  width: 280px;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border-color);
  background: #ffffff;
  max-height: calc(100vh - 58px);
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: none;
}

.category-btn {
  width: 100%;
  padding: 0.7rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.category-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-bright);
}

.category-btn.active {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border-color: rgba(79, 70, 229, 0.15);
  font-weight: 600;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 2rem;
  max-height: calc(100vh - 58px);
  overflow-y: auto;
  background: var(--bg-dark);
}

/* Dashboard view */
.dashboard-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.welcome-box {
  padding: 2rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
}

.welcome-box h1 {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}

.welcome-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 800px;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
}

.stat-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.grid-title {
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--text-bright);
}

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

.module-card {
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  transition: var(--transition-smooth);
}

.module-card:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.module-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.module-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
}

.module-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.play-action {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}

/* Active game view */
.game-view {
  display: none;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-title-group h2 {
  font-size: 1.35rem;
  color: var(--text-bright);
}

.game-title-group p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Buttons */
.btn {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-danger {
  background: #fef2f2;
  color: var(--error);
  border-color: #fee2e2;
}

.btn-danger:hover {
  background: var(--error);
  color: #fff;
}

/* Mode Switcher */
.mode-toggle {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.toggle-option {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
}

.toggle-option.active {
  background: var(--primary);
  color: #fff;
}

/* Grid Layout */
.game-workspace {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 1.5rem;
  flex: 1;
  min-height: 520px;
}

.map-container-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  border: 1px solid var(--border-color);
}

#map {
  width: 100%;
  height: 100%;
  background: #0d121c !important; /* Satellite-friendly dark void background */
}

/* Fullscreen styling adjustments */
.game-workspace:fullscreen {
  display: grid !important;
  grid-template-columns: 2.3fr 1fr !important;
  gap: 1.5rem !important;
  padding: 1.5rem !important;
  background-color: var(--bg-dark) !important;
  width: 100vw !important;
  height: 100vh !important;
  box-sizing: border-box !important;
}

.game-workspace:fullscreen .map-container-wrapper {
  height: 100% !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
}

.game-workspace:fullscreen .panel-sidebar {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  overflow-y: auto !important;
}

/* Leaflet Overrides for satellite Hybrid borders */
.leaflet-tile-container {
  /* Uydu haritası olduğu için renk filtreleri kaldırıldı (doğal Google Earth görünümü) */
  filter: none !important;
}

.leaflet-container {
  font-family: var(--font-sans) !important;
}

/* Tooltip style */
.leaflet-tooltip {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.panel-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-prompt-card {
  padding: 1.25rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
}

.prompt-badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(79, 70, 229, 0.12);
}

.question-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.prompt-target {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 1rem;
}

.quiz-action-bar {
  margin-bottom: 1rem;
  display: flex;
  gap: 8px;
}

.quiz-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.quiz-stat {
  text-align: center;
}

.quiz-stat-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
}

.quiz-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.detail-card {
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  flex: 1;
  overflow-y: auto;
}

.detail-header {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}

.detail-type {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.detail-info {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Matching Drag & Drop Workspace */
.matching-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.matching-instructions {
  font-size: 0.95rem;
  color: var(--text-bright);
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-align: center;
}

.matching-board {
  display: flex;
  gap: 1rem;
}

.matching-column {
  flex: 1;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.matching-column h4 {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}

.matching-card {
  padding: 0.7rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: grab;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.matching-card:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.matching-card.dragging {
  opacity: 0.4;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 250px;
}

.drop-zone.active {
  border: 1px dashed var(--primary);
  background: rgba(79, 70, 229, 0.02);
}

/* ☀️ SUN & WIND SIMULATOR LIGHT MODE STYLING */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  width: 100%;
}

@media (max-width: 1024px) {
  .simulator-layout {
    grid-template-columns: 1fr;
  }
}

.simulator-controls {
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-select {
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.btn-select:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.btn-select.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.range-slider {
  width: 100%;
  accent-color: var(--primary);
  background: #cbd5e1;
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.slider-val-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.simulator-graphics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.graphic-card {
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.graphic-card h4 {
  font-size: 0.9rem;
  align-self: flex-start;
  margin-bottom: 0.75rem;
  color: var(--text-bright);
  font-weight: 600;
}

.svg-container {
  width: 100%;
  max-width: 420px;
  height: 190px;
}

/* Aspect panels */
.aspect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

.aspect-panel {
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.aspect-panel h5 {
  font-size: 0.82rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.aspect-panel ul {
  list-style: none;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Toast */
.toast-notif {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  color: #fff;
  font-weight: 500;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--error);
}

.toast-info {
  background: var(--primary);
}

/* Animations */
.shake {
  animation: shake 0.35s ease;
}

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

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

@keyframes pulse {
  from { transform: scale(1); filter: drop-shadow(0 0 2px #f59e0b); }
  to { transform: scale(1.15); filter: drop-shadow(0 0 12px #f59e0b); }
}

/* custom div icons */
.custom-div-icon {
  background: none !important;
  border: none !important;
}

/* Responsive Mobile & Tablet Rules */
@media (max-width: 900px) {
  header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .logo {
    font-size: 1.05rem;
  }

  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
  }

  .category-btn {
    padding: 0.5rem;
    font-size: 0.78rem;
    justify-content: center;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 1rem !important;
  }

  .game-workspace {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }

  .map-container-wrapper {
    height: 380px !important;
  }

  .panel-sidebar {
    width: 100% !important;
  }
}

/* Leaflet Polyline Hover Styles for Coastlines */
path.leaflet-interactive {
  transition: stroke-width 0.18s ease-in-out, stroke-opacity 0.18s ease-in-out, filter 0.18s ease-in-out;
}

path.leaflet-interactive:hover {
  stroke-width: 9 !important;
  stroke-opacity: 0.95 !important;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
  cursor: pointer;
}

/* Country Label Styling */
.country-label-icon {
  background: none !important;
  border: none !important;
  pointer-events: none !important;
}

.site-footer {
  text-align: center;
  padding: 1.25rem;
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 600;
}

.site-footer strong {
  color: #4f46e5;
}

