/* ==========================================================================
   ILMECE - STYLESHEET
   ========================================================================== */

:root {
  /* Dark Mode Palette (Default - Teal/Gold Parchment) */
  --bg-primary: #091a24;
  --bg-secondary: #0b2533;
  --bg-gradient: linear-gradient(135deg, #091a24 0%, #153545 100%);
  
  --card-bg: rgba(13, 39, 51, 0.65);
  --card-border: rgba(201, 160, 84, 0.2);
  --card-glow: rgba(201, 160, 84, 0.05);
  
  --text-primary: #fdfbf7;
  --text-secondary: #cbbca2;
  --text-muted: #7d8c89;
  
  --accent: #c9a054;
  --accent-rgb: 201, 160, 84;
  --accent-glow: rgba(201, 160, 84, 0.45);
  --accent-secondary: #0e8794;
  
  /* Point-based state colors */
  --color-100: #10b981; /* 1.0 Point - Green */
  --color-100-glow: rgba(16, 185, 129, 0.35);
  --color-050: #a3e635; /* 0.5 Point - Lime/Yellow-Green */
  --color-050-glow: rgba(163, 230, 53, 0.3);
  --color-025: #f59e0b; /* 0.25 Point - Orange/Amber */
  --color-025-glow: rgba(245, 158, 11, 0.3);
  --color-000: #ef4444; /* 0.0 Point - Red */
  --color-000-glow: rgba(239, 68, 68, 0.35);
  
  --danger: #ef4444;
  --warning: #f59e0b;
  
  --map-bg: #0d2733;
  --map-border: rgba(201, 160, 84, 0.1);
  --map-path-fill: #d1c4ae;
  --map-path-stroke: #1e1308;
  --map-hover-fill: #f5dfb8;
  --map-selected-stroke: #ffffff;
  
  --shadow-color: rgba(0, 0, 0, 0.6);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-speed: 0.3s;
}

body.light-mode {
  background: radial-gradient(circle at center, rgba(241, 245, 249, 0.55) 0%, rgba(241, 245, 249, 0.9) 100%),
              url('background.png') no-repeat center center fixed;
  background-size: cover;
  /* Light Mode Palette */
  --bg-primary: #f1f5f9;
  --bg-secondary: #cbd5e1;
  --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  
  --card-bg: rgba(255, 255, 255, 0.78);
  --card-border: rgba(0, 0, 0, 0.09);
  --card-glow: rgba(37, 99, 235, 0.05);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --accent: #2563eb;
  --accent-rgb: 37, 99, 235;
  --accent-glow: rgba(37, 99, 235, 0.25);
  --accent-secondary: #7c3aed;
  
  --color-100: #10b981;
  --color-100-glow: rgba(16, 185, 129, 0.25);
  --color-050: #84cc16;
  --color-050-glow: rgba(132, 204, 22, 0.2);
  --color-025: #d97706;
  --color-025-glow: rgba(217, 119, 6, 0.2);
  --color-000: #ef4444;
  --color-000-glow: rgba(239, 68, 68, 0.25);
  
  --danger: #dc2626;
  --warning: #d97706;
  
  --map-bg: #d1d5db;
  --map-border: rgba(0, 0, 0, 0.05);
  --map-path-fill: #f8fafc;
  --map-path-stroke: #94a3b8;
  --map-hover-fill: #2563eb;
  --map-selected-stroke: #0f172a;
  
  --shadow-color: rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   RESET & GLOBAL STYLES
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at center, rgba(9, 26, 36, 0.45) 0%, rgba(9, 26, 36, 0.85) 100%),
              url('background.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* ==========================================================================
   CONFETTI CANVAS
   ========================================================================== */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--card-border);
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
  margin-left: 0;
}
.logo::before, .logo::after {
  display: none;
}
.logo span {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fceecb, #c9a054);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  text-shadow: none;
}
.logo i {
  color: var(--accent);
  font-size: 1.25rem;
}

.header-controls {
  display: flex;
  gap: 0.75rem;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 0;
  padding-bottom: 90px; /* Space for Google Ads Banner */
}

.app-footer {
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SCREENS & CARDS
   ========================================================================== */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  opacity: 1;
  transform: translateY(0);
}

.glass-card {
  background: linear-gradient(135deg, rgba(11, 37, 51, 0.85) 0%, rgba(7, 23, 33, 0.9) 100%);
  border: 2px solid rgba(201, 160, 84, 0.25);
  border-radius: 24px;
  padding: 2.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.05);
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.glass-card:hover {
  border-color: rgba(201, 160, 84, 0.45);
  box-shadow: 0 15px 50px rgba(201, 160, 84, 0.12);
}

/* Icons and buttons */
.icon-btn {
  background: rgba(13, 39, 51, 0.6);
  border: 1.5px solid rgba(201, 160, 84, 0.35);
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.icon-btn:hover {
  background: var(--accent);
  color: #1a0f02;
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(201, 160, 84, 0.4);
}

/* Glowing button */
.glowing-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: all 0.3s ease;
}

.glowing-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--accent-glow);
  filter: brightness(1.1);
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

.action-btn.secondary {
  background: transparent;
  border-color: transparent;
}

/* ==========================================================================
   WELCOME SCREEN & MODE CARDS
   ========================================================================== */
.welcome-section {
  display: flex;
  gap: 1.5rem;
  width: 100%;
}

.welcome-card {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.welcome-card h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-card h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: var(--accent);
}

.username-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  padding: 1.25rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.username-box label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.85rem 1rem 0.85rem 2.5rem;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  font-family: var(--font-body);
  transition: border-color 0.2s ease;
}

.input-wrapper input:focus {
  border-color: var(--accent);
}

/* Mode Selection Grid */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  width: 100%;
}

.mode-card {
  background: rgba(13, 39, 51, 0.55);
  border: 1.5px solid rgba(201, 160, 84, 0.2);
  border-radius: 20px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mode-card:hover {
  background: rgba(14, 135, 148, 0.15);
  border-color: #0e8794;
  box-shadow: 0 6px 20px rgba(14, 135, 148, 0.25);
  transform: translateY(-3px);
}

.mode-card.active {
  background: rgba(201, 160, 84, 0.15);
  border-color: #c9a054;
  box-shadow: 0 6px 22px rgba(201, 160, 84, 0.35);
}

.mode-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b2533 0%, #153545 100%);
  border: 2px solid rgba(201, 160, 84, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(201, 160, 84, 0.1);
  transition: all 0.3s ease;
}

.mode-card:hover .mode-icon {
  background: linear-gradient(135deg, #0e8794 0%, #0d2733 100%);
  border-color: #0e8794;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(14, 135, 148, 0.4);
}

.mode-card.active .mode-icon {
  background: linear-gradient(135deg, #c9a054 0%, #0d2733 100%);
  border-color: #c9a054;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(201, 160, 84, 0.5);
}

.mode-info h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.mode-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Zor / Hard card decoration */
.mode-card.zor-kart {
  border-color: rgba(245, 158, 11, 0.15);
}
.mode-card.zor-kart .mode-icon {
  color: var(--warning);
}
.mode-card.zor-kart:hover {
  background: rgba(245, 158, 11, 0.03);
  border-color: var(--warning);
}
.mode-card.zor-kart.active {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--warning);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}
.mode-card.zor-kart.active .mode-icon, 
.mode-card.zor-kart:hover .mode-icon {
  background: var(--warning);
  color: #ffffff;
}

/* Leaderboard */
.stats-card {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stats-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats-header h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-header select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 8px;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.leaderboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  max-height: 420px;
  padding-right: 0.2rem;
}

.leaderboard-list::-webkit-scrollbar {
  width: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 20px;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 0.9rem;
}

.leaderboard-item .rank-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.leaderboard-item .rank {
  font-weight: 800;
  color: var(--accent);
  width: 18px;
}

.leaderboard-item .score-val {
  font-weight: 700;
  font-family: var(--font-heading);
}

.leaderboard-item:nth-child(1) {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.03);
}
.leaderboard-item:nth-child(1) .rank {
  color: #f59e0b;
}

.empty-leaderboard {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

/* ==========================================================================
   GAME HUD PANEL
   ========================================================================== */
.hud-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
}

.target-prompt-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.75rem;
}

.target-prompt-box .label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

#target-prompt-container {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.target-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
}

.hud-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  width: 100%;
}

.metric {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  flex: 1;
  min-width: 110px;
  justify-content: center;
}

.metric i {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.metric-info {
  display: flex;
  flex-direction: column;
  min-height: 38px;
  justify-content: center;
}

.metric-info .label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-info .value {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.text-glow {
  text-shadow: 0 0 8px var(--danger);
  letter-spacing: 2px;
}

.metric-val {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 80px;
}

#timer-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.progress-bar-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transition: width 1s linear;
}

.hud-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
}

.skip-btn:hover {
  border-color: var(--warning);
  color: var(--warning);
  background: rgba(245, 158, 11, 0.05);
}

/* ==========================================================================
   MAP VIEWPORT & SVG STYLING
   ========================================================================== */
.map-wrapper {
  position: relative;
  height: calc(100vh - 290px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--map-bg);
  border: 1px solid var(--map-border);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}

.zoom-controls {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 100;
}

.zoom-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: scale(1.05);
}

#hint-toggle.active {
  background: var(--warning);
  color: #ffffff;
  border-color: var(--warning);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.map-tooltip {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: opacity 0.15s ease;
  color: var(--text-primary);
}

.map-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  position: relative;
}

.map-viewport:active {
  cursor: grabbing;
}

.map-pan-zoom-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 0 0 !important;
  will-change: transform;
}

.map-svg-asset {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

/* SVG Assets styles */
#svg-turkiye-haritasi, #svg-dunya-haritasi {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

#svg-turkiye-haritasi g path, #svg-dunya-haritasi path {
  fill: var(--map-path-fill);
  stroke: var(--map-path-stroke);
  stroke-width: 1.6px;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              stroke 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              filter 0.2s ease;
}

/* Map hover state */
#svg-turkiye-haritasi g:hover path, #svg-dunya-haritasi path:hover {
  fill: var(--map-hover-fill);
  stroke: var(--map-selected-stroke);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Point States for maps (1.0, 0.5, 0.25, 0) */
#svg-turkiye-haritasi g.correct-1 path, #svg-dunya-haritasi path.correct-1 {
  fill: var(--color-100) !important;
  stroke: var(--map-selected-stroke);
  filter: drop-shadow(0 0 10px var(--color-100-glow));
}

#svg-turkiye-haritasi g.correct-2 path, #svg-dunya-haritasi path.correct-2 {
  fill: var(--color-050) !important;
  stroke: var(--map-selected-stroke);
  filter: drop-shadow(0 0 10px var(--color-050-glow));
}

#svg-turkiye-haritasi g.correct-3 path, #svg-dunya-haritasi path.correct-3 {
  fill: var(--color-025) !important;
  stroke: var(--map-selected-stroke);
  filter: drop-shadow(0 0 10px var(--color-025-glow));
}

#svg-turkiye-haritasi g.incorrect-final path, #svg-dunya-haritasi path.incorrect-final {
  fill: var(--color-000) !important;
  stroke: var(--map-selected-stroke);
  filter: drop-shadow(0 0 10px var(--color-000-glow));
}

#svg-turkiye-haritasi g.incorrect-temp path, #svg-dunya-haritasi path.incorrect-temp {
  fill: var(--color-000) !important;
  stroke: var(--map-selected-stroke);
  filter: drop-shadow(0 0 10px var(--color-000-glow));
}

/* ==========================================================================
   KEYBOARD WRITING LIST COMPLETION INTERFACE
   ========================================================================== */
.list-completion-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: calc(100vh - 290px);
  min-height: 420px;
  overflow: hidden;
}

.input-panel {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  padding: 1.25rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-panel label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.write-input-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.write-input-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-size: 1.1rem;
  outline: none;
  font-family: var(--font-body);
  transition: border-color 0.2s ease;
}

.write-input-row input:focus {
  border-color: var(--accent);
}

.list-display-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.unlocked-items-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  padding-right: 0.25rem;
}

.unlocked-items-grid::-webkit-scrollbar {
  width: 4px;
}

.unlocked-items-grid::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 20px;
}

/* Locked and unlocked state blocks */
.unlocked-item-slot {
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--card-border);
  border-radius: 10px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.25rem;
  transition: all 0.35s ease;
}

.unlocked-item-slot.unlocked {
  border-style: solid;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: #ffffff;
}

.unlocked-item-slot.unlocked-1 {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--color-100);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.unlocked-item-slot.unlocked-2 {
  background: rgba(163, 230, 53, 0.08);
  border-color: var(--color-050);
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.1);
}

.unlocked-item-slot.unlocked-3 {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--color-025);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.unlocked-item-slot.unlocked-failed {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--color-000);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   RESULT SCREEN
   ========================================================================== */
#result-screen {
  align-items: center;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.result-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.result-icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.1);
}

.result-card h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  width: 100%;
  margin: 0.75rem 0;
}

.stat-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  padding: 1.15rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-box .label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-box .value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

.result-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  width: 100%;
}

/* ==========================================================================
   DEVELOPER FEEDBACK MODAL OVERLAY
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: modal-enter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-enter {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.username-display-row {
  font-size: 0.9rem;
}

.username-display-row strong {
  color: var(--accent);
}

.modal-body textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.85rem;
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
  resize: none;
  font-family: var(--font-body);
  transition: border-color 0.2s ease;
}

.modal-body textarea:focus {
  border-color: var(--accent);
}

.status-msg {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  min-height: 20px;
}

/* ==========================================================================
   GOOGLE ADS MOBILE BANNER CONTAINER
   ========================================================================== */
.ad-banner-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px; /* Standard mobile size boundary */
  height: 74px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.ad-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.ad-slot-placeholder {
  width: 320px;
  height: 50px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--card-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ad-slot-placeholder i {
  font-size: 1.1rem;
  color: var(--accent);
}

/* ==========================================================================
   RESPONSIVE LAYOUTS
   ========================================================================== */
@media (max-width: 992px) {
  .welcome-section {
    flex-direction: column;
  }
  
  .welcome-card, .stats-card {
    flex: none;
    width: 100%;
  }

  .welcome-card h1 {
    font-size: 1.95rem;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 0 0.75rem;
  }

  .hud-container {
    padding: 0.6rem 0.8rem;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: 
      "metrics actions"
      "prompt prompt";
    gap: 0.5rem;
    align-items: center;
    border-radius: 16px;
  }

  .hud-metrics {
    grid-area: metrics;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    padding-bottom: 0.25rem;
    width: 100%;
    justify-content: flex-start;
  }
  
  .hud-metrics::-webkit-scrollbar {
    height: 2px;
  }
  .hud-metrics::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
  }

  .metric {
    min-width: 80px;
    flex: 1 0 auto;
    padding: 0.25rem 0.4rem;
    gap: 0.4rem;
    border-radius: 8px;
  }
  
  .metric i {
    font-size: 0.9rem;
  }
  
  .metric-info .label {
    font-size: 0.55rem;
  }
  
  .metric-info .value {
    font-size: 0.85rem;
  }
  
  #timer-text {
    font-size: 0.85rem;
  }
  
  .progress-bar-container {
    height: 2px;
  }

  .hud-actions {
    grid-area: actions;
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    margin-top: 0;
  }
  
  .hud-actions button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    height: 32px;
    border-radius: 8px;
  }

  .target-prompt-box {
    grid-area: prompt;
    border-top: 1px solid var(--card-border);
    border-bottom: none;
    padding-top: 0.4rem;
    padding-bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .target-prompt-box .label {
    font-size: 0.55rem;
    margin-bottom: 0.1rem;
  }
  
  .target-name {
    font-size: 1.15rem;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.25);
  }

  .map-wrapper, .list-completion-wrapper {
    height: calc(100vh - 230px);
    margin-top: 0.25rem;
    border-radius: 16px;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo {
    padding: 0.3rem 1rem;
    margin-left: 0;
  }
  .logo span {
    display: inline-block !important;
    font-size: 1.15rem;
  }
  .logo i {
    display: none;
  }

  .welcome-card h1 {
    font-size: 1.65rem;
  }

  .modes-grid {
    grid-template-columns: 1fr;
  }

  .result-buttons {
    flex-direction: column;
  }
  
  .result-buttons button {
    width: 100%;
  }
}

.welcome-card h1, .stats-header h2, .result-card h1 {
  background: linear-gradient(to right, #ffe5a3 0%, #c9a054 50%, #99732f 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-family: var(--font-heading);
  font-weight: 800;
}

/* ==========================================================================
   MONETIZATION, JOKERS & GAME STICKY SCREEN OPTIMIZATIONS
   ========================================================================== */

/* Fullscreen game screen layout locking (stops body scrolling entirely) */
body.game-active {
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body.game-active .app-container {
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  padding: 0 0.5rem !important;
}

body.game-active .app-header, 
body.game-active .app-footer {
  display: none !important;
}

body.game-active .main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.25rem 0 !important;
  padding-bottom: 74px !important; /* Space for banner ads */
}

body.game-active #game-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

body.game-active .hud-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(26, 17, 8, 0.85);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.game-active .map-wrapper, 
body.game-active .list-completion-wrapper {
  flex: 1;
  height: auto !important;
  min-height: 0;
  margin-top: 0.5rem;
}

/* Gold Pulsing Shimmer (Reveal Joker) */
@keyframes pulse-gold {
  0% {
    fill: #f59e0b;
    fill-opacity: 0.2;
    stroke: #f59e0b;
    stroke-width: 2px;
  }
  50% {
    fill: #fcd34d;
    fill-opacity: 0.85;
    stroke: #f59e0b;
    stroke-width: 6px;
  }
  100% {
    fill: #f59e0b;
    fill-opacity: 0.2;
    stroke: #f59e0b;
    stroke-width: 2px;
  }
}

.pulse-gold {
  animation: pulse-gold 1.5s infinite ease-in-out !important;
  paint-order: stroke fill;
}

/* Hitbox optimizations for small Turkey provinces */
#svg-turkiye-haritasi g#yalova path,
#svg-turkiye-haritasi g#kilis path,
#svg-turkiye-haritasi g#bartin path,
#svg-turkiye-haritasi g#bayburt path,
#svg-turkiye-haritasi g#duzce path,
#svg-turkiye-haritasi g#ardahan path,
#svg-turkiye-haritasi g#karabuk path,
#svg-turkiye-haritasi g#osmaniye path,
#svg-turkiye-haritasi g#bilecik path,
#svg-turkiye-haritasi g#kirikkale path {
  stroke-width: 3.5px !important;
  paint-order: stroke fill;
  cursor: pointer;
}

/* Floating Joker Controls styles */
.joker-controls button {
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  cursor: pointer;
}
.joker-controls button:hover {
  transform: scale(1.1) rotate(5deg);
  background-color: rgba(26,17,8,0.95) !important;
  box-shadow: 0 0 15px rgba(201,160,84,0.4) !important;
}
.joker-controls button:active {
  transform: scale(0.95);
}

/* Modals overlays & Glassmorphism cards styling */
.modal-overlay {
  display: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

.modal-card {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1.5px solid var(--card-border);
  animation: slide-up-modal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up-modal {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive landscape mode scrolling improvements */
@media (max-height: 580px) {
  .screen {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    padding-bottom: 3rem !important;
  }
  #map-wrapper {
    height: auto !important;
    min-height: 380px;
  }
  .hud-container {
    position: sticky !important;
    top: 0;
    background: rgba(18, 12, 6, 0.95) !important;
    backdrop-filter: blur(10px);
    z-index: 10001;
    padding: 0.5rem 1rem !important;
    border-bottom: 1.5px solid var(--card-border);
  }
}

/* =========================================================
   FATİH MODU STİLLERİ
   ========================================================= */

.fatih-bolge-btn {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--card-border);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, transform 0.15s;
}

.fatih-bolge-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: translateX(3px);
}

.fatih-kale-btn {
  border-color: #fbbf24 !important;
  color: #fbbf24 !important;
}

.fatih-kale-btn:hover {
  background: rgba(251,191,36,0.15) !important;
}

/* =========================================================
   JOKER Z-INDEX FİX (haritayı kaybettirmez)
   ========================================================= */
#map-wrapper {
  position: relative;
  z-index: 1;
}

#standard-joker-controls,
#fatih-joker-controls {
  position: relative;
  z-index: 5;
}

.joker-btn {
  position: relative;
  z-index: 5;
}

/* Pulse animasyonu haritayı z-index ile örtmemelidir */
.pulse-gold {
  animation: pulse-gold-anim 0.5s ease-in-out 2;
  position: relative;
  z-index: 2 !important;
}

@keyframes pulse-gold-anim {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.5) drop-shadow(0 0 12px #fbbf24); }
  100% { filter: brightness(1); }
}

/* Tahmin input kutusu focus */
#fatih-tahmin-input:focus {
  border-color: var(--warning) !important;
  outline: none;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

/* Exit game button overlap protection */
#exit-game-btn {
  position: relative !important;
  z-index: 20005 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Force HUD container to stay above everything during game */
body.game-active .hud-container {
  z-index: 20000 !important;
  pointer-events: auto !important;
  flex-shrink: 0 !important;
}

/* Writing mode: list-completion-wrapper scrollable, not pushing HUD off screen */
body.game-active .list-completion-wrapper {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

/* game-screen flex column: HUD fixed on top, content scrolls below */
body.game-active #game-screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

/* ===================== LOGO STYLES ===================== */
/* Header logo image */
.header-logo-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7));
  transition: transform 0.3s ease;
}
.logo:hover .header-logo-img {
  transform: rotate(15deg) scale(1.12);
}

/* Start screen big logo */
.start-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-top: 0.25rem;
}
.start-logo-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 25px rgba(201, 160, 84, 0.5);
  animation: logo-float 3.5s ease-in-out infinite;
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-8px) rotate(1deg); }
}

/* Secondary Button for Reward Ads on Start Screen */
.secondary-btn-ads {
  margin-top: 0.85rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: 48px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}

.secondary-btn-ads:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.7);
}

.secondary-btn-ads:active {
  transform: translateY(0);
}
