/* ===== Softorya · Canlı Bomba ===== */
:root, body.theme-dark {
  --bg: #0c0b0f;
  --bg-card: #14121a;
  --surface: #1c1924;
  --text: #e8e4ef;
  --text-muted: #8a8499;
  --accent: #ff6b35;
  --accent-glow: rgba(255, 107, 53, 0.4);
  --danger: #e63946;
  --danger-glow: rgba(230, 57, 70, 0.5);
  --success: #2a9d8f;
  --font: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body.theme-light {
  --bg: #f5f3f7;
  --bg-card: #ffffff;
  --surface: #ebe8f0;
  --text: #1a1720;
  --text-muted: #6b6578;
  --accent: #e55a28;
  --accent-glow: rgba(229, 90, 40, 0.25);
  --danger: #c72e3a;
  --danger-glow: rgba(199, 46, 58, 0.3);
  --success: #238a7e;
}

body.theme-light .noise {
  opacity: 0.02;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
}

/* ----- Header ----- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 11, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.1em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-nav-toggle {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .header .nav { position: relative; }
  .btn-nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    right: 0;
    min-width: 180px;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s, opacity 0.2s;
  }
  .nav.open .nav-links {
    max-height: 400px;
    opacity: 1;
  }
  .nav-links .nav-link {
    padding: 0.75rem 1rem;
    display: block;
  }
}

@media (max-width: 600px) {
  .nav-user-label { display: none; }
  .nav-user-input { width: 80px; }
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.btn-icon:hover {
  color: var(--accent);
  background: rgba(255, 107, 53, 0.15);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-user-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-user-input {
  width: 100px;
  max-width: 120px;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.nav-user-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Profil */
.profile-login-wrap .btn-small {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

.profile-widget-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 60;
}

.profile-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.profile-widget-name {
  font-weight: 600;
  color: var(--text);
}

.profile-widget-balance {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.profile-widget .btn-icon.btn-small {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .profile-widget-wrap {
    top: 0.75rem;
    right: 0.75rem;
  }
  .profile-widget {
    padding: 0.4rem 0.6rem;
  }
  .profile-widget-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.nav-user-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

@media (max-width: 768px) {
  .nav { flex-wrap: wrap; gap: 0.5rem; }
  .nav-link { font-size: 0.85rem; }
}

@media (max-width: 640px) {
  .nav-user-label { display: none; }
  .nav-user-input { width: 80px; }
  .nav { gap: 0.5rem; }
}

/* ----- Hero ----- */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.8rem, 10vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-title-line {
  display: block;
}

.hero-title-line.accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 300;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 0.9rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

/* ----- Game Section ----- */
.game-section {
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
}

.game-mode-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.game-mode-tab {
  padding: 0.6rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.game-mode-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.game-mode-tab.active {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.15);
  color: var(--accent);
}

.game-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.game-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.game-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.score-board {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.score-board strong {
  color: var(--text);
  font-weight: 600;
}

.score-sep {
  opacity: 0.5;
}

.game-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  background: var(--surface);
  border-radius: 999px;
}

/* Game settings */
.game-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.duration-options {
  display: flex;
  gap: 0.35rem;
}

.duration-btn {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.duration-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text);
}

.duration-btn.active {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.15);
  color: var(--accent);
}

.game-settings.disabled {
  opacity: 0.7;
  pointer-events: none;
}

.settings-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.difficulty-options {
  display: flex;
  gap: 0.35rem;
}

.difficulty-btn {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.difficulty-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text);
}

.difficulty-btn.active {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.15);
  color: var(--accent);
}

.settings-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-left: auto;
}

@media (max-width: 420px) {
  .game-settings {
    flex-direction: column;
    align-items: flex-start;
  }
  .settings-hint {
    margin-left: 0;
  }
}

/* Bomb */
.bomb-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  min-height: 140px;
  align-items: center;
}

.bomb {
  transition: transform 0.3s ease;
}

.bomb.held-by-player {
  animation: pulse-bomb 0.8s ease-in-out infinite;
}

.bomb.held-by-cpu {
  animation: shake-bomb 0.4s ease-in-out infinite;
}

.bomb.exploding {
  animation: explode 0.6s ease-out forwards;
}

@keyframes pulse-bomb {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shake-bomb {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes explode {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.bomb-body {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2d2a33, #1a1820);
  border: 4px solid #3d3a45;
  box-shadow: inset 0 -8px 20px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bomb-fuse {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 28px;
  background: linear-gradient(to top, #4a4545, #6b6565);
  border-radius: 4px;
  box-shadow: 0 -2px 8px rgba(255, 107, 53, 0.3);
}

.bomb-spark {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent-glow);
  opacity: 0;
  transition: opacity 0.2s;
}

.bomb.sparking .bomb-spark {
  opacity: 1;
  animation: spark 0.3s ease-in-out infinite;
}

@keyframes spark {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.6; transform: translateX(-50%) scale(1.2); }
}

.bomb-timer {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.bomb-timer.danger {
  color: var(--danger);
  animation: blink 0.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Players */
.players-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.player-card {
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-radius: 16px;
  border: 2px solid transparent;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.player-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.player-card.just-received {
  animation: received-bomb 0.35s ease;
}

@keyframes received-bomb {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 32px 4px var(--accent-glow); }
  100% { box-shadow: 0 0 24px var(--accent-glow); }
}

.player-card.lost {
  border-color: var(--danger);
  box-shadow: 0 0 24px var(--danger-glow);
}

.player-avatar {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.player-card.active .player-avatar {
  color: var(--accent);
}

.player-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.vs-badge {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Buttons */
.game-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 8px 24px var(--danger-glow);
  animation: btn-pulse 0.5s ease-in-out infinite;
}

@keyframes btn-pulse {
  0%, 100% { transform: translateY(-1px) scale(1); }
  50% { transform: translateY(-1px) scale(1.02); }
}

.hidden {
  display: none !important;
}

/* Result overlay */
.result-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 15, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 20;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-box {
  text-align: center;
  max-width: 320px;
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce-in 0.5s ease;
}

@keyframes bounce-in {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.result-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.result-text {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.result-points {
  color: var(--success);
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.result-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Leaderboard */
.leaderboard-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 2rem;
  scroll-margin-top: 5rem;
}

.leaderboard-title {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.leaderboard-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.total-score {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.total-score strong {
  color: var(--accent);
}

.leaderboard-list {
  list-style: none;
  counter-reset: lb;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.lb-rank {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1.5rem;
}

.leaderboard-item:nth-child(1) .lb-rank { color: #ffd700; }
.leaderboard-item:nth-child(2) .lb-rank { color: #c0c0c0; }
.leaderboard-item:nth-child(3) .lb-rank { color: #cd7f32; }

.lb-name {
  flex: 1;
  font-weight: 500;
}

.lb-score {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
}

.leaderboard-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem 0;
  text-align: center;
}

/* ----- Stats, Quests, Badges ----- */
.card-section {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 2rem;
  scroll-margin-top: 5rem;
}

body.theme-light .card-section {
  border-color: rgba(0, 0, 0, 0.06);
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-item {
  background: var(--surface);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quest-list {
  list-style: none;
}

.quest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.quest-item.done {
  color: var(--success);
}

.quest-item .quest-progress {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.badge-item {
  width: 80px;
  min-height: 80px;
  padding: 0.5rem;
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.badge-icon {
  font-size: 1.8rem;
}

.badge-name {
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.2;
}

.badges-howto {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.badges-howto h4 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.badges-howto ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.badges-howto li {
  padding: 0.25rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge-item.unlocked {
  opacity: 1;
  box-shadow: 0 0 16px var(--accent-glow);
}

.badge-item[title] {
  cursor: help;
}

/* ----- Room chat ----- */
.room-chat {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.room-chat-msgs {
  max-height: 80px;
  overflow-y: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.room-chat-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.btn-chat-msg {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-chat-msg:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ----- Mobil: Geçir butonu büyük ----- */
@media (max-width: 480px) {
  .btn-danger {
    padding: 1.25rem 2rem;
    font-size: 1.2rem;
    min-height: 56px;
  }
  .game-controls .btn-danger {
    width: 100%;
  }
  .room-game-controls .btn-danger {
    width: 100%;
    min-height: 56px;
  }
}

/* ----- Online room ----- */
.online-card {
  max-width: 520px;
}

.online-card-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.online-panel {
  margin-top: 0.5rem;
}

.online-unavailable-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.online-lobby-desc {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.online-lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.online-create,
.online-join {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.online-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.online-create .btn,
.online-join .btn {
  align-self: flex-start;
}

.online-join-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.online-code-input {
  width: 120px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.online-code-input:focus {
  outline: none;
  border-color: var(--accent);
}

.room-waiting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.room-waiting-header strong {
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  color: var(--accent);
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.room-waiting-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.room-players-list {
  list-style: none;
  margin-bottom: 1.25rem;
}

.room-players-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.room-player-empty {
  color: var(--text-muted);
  opacity: 0.7;
}

.room-waiting-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.room-game-header {
  text-align: center;
  margin-bottom: 1rem;
}

.room-timer-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.room-timer {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
}

.room-timer.danger {
  color: var(--danger);
  animation: blink 0.5s ease-in-out infinite;
}

.room-bomb-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.room-bomb .bomb-body {
  width: 80px;
  height: 80px;
}

.room-bomb .bomb-body .bomb-timer {
  font-size: 1.4rem;
}

.room-bomb.sparking .bomb-body {
  box-shadow: 0 0 24px var(--accent-glow);
}

.room-player-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.room-player-slots:has(.room-player-slot:nth-child(3)) {
  grid-template-columns: repeat(2, 1fr);
}

.room-player-slot {
  padding: 1rem;
  background: var(--surface);
  border-radius: 12px;
  border: 2px solid transparent;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.room-player-slot.has-bomb {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.room-slot-name {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.room-slot-score {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.room-game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.room-end-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  text-align: center;
}

.room-end-scores {
  margin-bottom: 1.25rem;
}

.room-end-score-row {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.room-end-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

#online .online-card {
  scroll-margin-top: 5rem;
}

#istatistik, #gorevler, #rozetler {
  scroll-margin-top: 5rem;
}

/* Page (sub-pages) */
.page-main {
  padding: 3rem 1.5rem 4rem;
  max-width: 640px;
  margin: 0 auto;
}

.page-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.page-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Rules */
.rules-section {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.rules-section h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.rules-section h2 {
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.rules-list {
  list-style: none;
}

.rules-list li {
  padding: 0.6rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-muted);
  line-height: 1.5;
}

.rules-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.rules-list strong {
  color: var(--text);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Explosion effect */
.explosion-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(230, 57, 70, 0.4) 0%, transparent 70%);
  pointer-events: none;
  z-index: 200;
  animation: explosion-flash 0.8s ease-out forwards;
}

@keyframes explosion-flash {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}
