:root {
  --bg-dark: #090d16;
  --bg-card: #111827;
  --bg-bubble-incoming: #1f2937;
  --bg-bubble-outgoing: #065f46;
  --accent: #10b981;
  --accent-cyan: #06b6d4;
  --border-color: #1f293d;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --danger: #ef4444;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
}

#mobile-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  background-color: #0b111e;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.hidden {
  display: none !important;
}

/* PWA Install Banner */
.install-banner {
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 99;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.install-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.install-icon {
  font-size: 1.5rem;
}

.install-text strong {
  display: block;
  font-size: 0.85rem;
}

.install-text span {
  font-size: 0.72rem;
  opacity: 0.9;
}

.install-action-btn {
  background: #fff;
  color: #065f46;
  border: none;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

.install-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Screen 1: Auth */
#screen-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, #111e38 0%, #090d16 80%);
}

.auth-container {
  width: 100%;
  max-width: 380px;
  background-color: var(--bg-card);
  padding: 28px 24px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.auth-hero {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.auth-hero h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.auth-hero p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  background-color: var(--bg-dark);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background-color: var(--accent);
  color: #fff;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.auth-form.active {
  display: flex;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
}

.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 8px 0;
}

.avatar-opt {
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.15s;
}

.avatar-opt.selected {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.2);
  transform: scale(1.15);
}

.primary-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity 0.2s;
}

.primary-btn:active {
  opacity: 0.9;
}

.auth-footer-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 20px;
}

/* Screen 2: Header & Chat List */
.app-header {
  padding: calc(14px + var(--sat)) 16px 14px 16px;
  background-color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-avatar {
  width: 40px;
  height: 40px;
  background: #1e293b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 1px solid var(--border-color);
}

.header-user-info strong {
  display: block;
  font-size: 0.95rem;
}

.header-user-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.trophy-btn {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 0.8rem;
  border: none;
}

.chat-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.chat-search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.9rem;
  width: 100%;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background-color 0.15s;
}

.chat-item:active {
  background-color: rgba(255, 255, 255, 0.05);
}

.chat-avatar-wrap {
  position: relative;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  background-color: #1f2937;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: var(--accent);
  border-radius: 50%;
  border: 2px solid #0b111e;
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.chat-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chat-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.unread-badge {
  background-color: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
}

.fab-btn {
  position: absolute;
  bottom: 24px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
  cursor: pointer;
  z-index: 10;
}

/* Screen 3: Chat Thread */
.chat-header {
  padding: calc(12px + var(--sat)) 14px 12px 14px;
  background-color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.back-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 6px;
}

.chat-partner-avatar {
  width: 38px;
  height: 38px;
  background: #1f2937;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.chat-partner-info {
  flex: 1;
}

.chat-partner-info strong {
  display: block;
  font-size: 0.95rem;
}

.chat-partner-info span {
  font-size: 0.72rem;
  color: var(--accent);
}

.messages-container {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #070b14;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 20px 20px;
  -webkit-overflow-scrolling: touch;
}

/* Message Bubbles */
.msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  position: relative;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.4;
  animation: fadeIn 0.15s ease-out;
}

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

.msg-incoming {
  align-self: flex-start;
  background-color: var(--bg-bubble-incoming);
  border-bottom-left-radius: 4px;
}

.msg-outgoing {
  align-self: flex-end;
  background-color: var(--bg-bubble-outgoing);
  border-bottom-right-radius: 4px;
}

.msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 4px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Custom Horizontal Status Ticks */
.status-tick {
  font-weight: 800;
  letter-spacing: 0px;
  display: inline-block;
  font-size: 0.78rem;
}

.status-tick.sent {
  color: rgba(255, 255, 255, 0.6);
}

.status-tick.delivered {
  color: rgba(255, 255, 255, 0.85);
}

.status-tick.read {
  color: var(--accent-cyan);
}

.status-tick.read sup {
  font-size: 0.65rem;
  font-weight: 900;
  margin-left: 1px;
}

/* In-Chat Game Invite Bubble */
.game-invite-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 250px;
}

.invite-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
}

.invite-actions {
  display: flex;
  gap: 8px;
}

.invite-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.invite-accept-btn {
  background: var(--accent);
  color: #fff;
}

.invite-decline-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.invite-play-btn {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #fff;
  padding: 8px;
  border-radius: 6px;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

/* In-Chat Media Bubble */
.chat-media-img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
  margin-bottom: 4px;
}

/* Plus Menu Dropdown */
.plus-menu {
  position: absolute;
  bottom: 74px;
  left: 16px;
  width: 270px;
  background-color: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plus-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.plus-menu-item:hover, .plus-menu-item:active {
  background-color: rgba(255, 255, 255, 0.08);
}

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

.menu-text strong {
  display: block;
  font-size: 0.85rem;
}

.menu-text span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.menu-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.menu-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 8px;
}

/* Composer Bar */
.composer-bar {
  padding: 10px 14px calc(10px + var(--sab)) 14px;
  background-color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border-color);
}

.plus-btn {
  width: 40px;
  height: 40px;
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.input-wrap {
  flex: 1;
  background-color: #1e293b;
  border-radius: 20px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
}

.input-wrap textarea {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  resize: none;
  max-height: 100px;
  font-family: inherit;
}

.send-btn {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* Splash Screen */
.app-splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.app-splash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: pulse 1.5s infinite;
}

.splash-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 24px;
}

.splash-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modals */
.modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 100;
}

.modal-box {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 20px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.modal-intro {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.feedback-msg {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  text-align: center;
}

.feedback-msg.error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid var(--danger);
}

.feedback-msg.success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid var(--accent);
}

/* Leaderboard Modal */
.leaderboard-box {
  max-width: 440px;
  height: 85vh;
}

.lb-title-wrap h3 {
  font-size: 1.15rem;
}

.lb-title-wrap span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lb-game-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.lb-tab {
  padding: 8px 14px;
  background-color: #1f2937;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.lb-tab.active {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.see-self-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.self-preview {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
}

.see-self-btn {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.lb-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background-color: #1e293b;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.lb-row.highlight-self {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.15);
}

.lb-rank {
  font-weight: 800;
  width: 24px;
  color: var(--accent-cyan);
}

.lb-avatar {
  font-size: 1.2rem;
}

.lb-name {
  flex: 1;
  font-weight: 600;
}

.lb-score-stat {
  font-weight: 700;
  color: #fff;
}

/* ----------------------------------------------------
   ENLARGED FULL-WIDTH GAME ARENA & BOARDS
---------------------------------------------------- */
.game-arena-box {
  max-width: 480px;
  width: 98vw;
  max-height: 96vh;
  padding: 14px 10px;
  background-color: #0d1424;
}

.game-arena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 4px;
}

.game-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
}

.arena-board-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Turn Banner for Games */
.game-turn-banner {
  padding: 10px 14px;
  border-radius: 10px;
  background-color: #1a2336;
  font-size: 0.92rem;
  margin-bottom: 12px;
  text-align: center;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.game-turn-banner.my-turn {
  background-color: rgba(16, 185, 129, 0.25);
  border: 1px solid var(--accent);
  color: #6ee7b7;
}

/* Connect 4 Board - ENLARGED */
.c4-game-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.c4-board {
  background-color: #1d4ed8;
  padding: 10px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.3);
}

.c4-drop-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 420px;
  margin-bottom: 8px;
}

.c4-drop-btn {
  background: #2563eb;
  border: 1px solid #60a5fa;
  border-radius: 8px;
  padding: 8px 0;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}

.c4-drop-btn:active {
  transform: scale(0.92);
}

.c4-cell {
  width: 100%;
  aspect-ratio: 1;
  background-color: #0b111e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.c4-disc {
  width: 88%;
  height: 88%;
  border-radius: 50%;
}

.red-disc {
  background: radial-gradient(circle at 35% 35%, #f87171, #dc2626 70%, #991b1b);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.6);
}

.yellow-disc {
  background: radial-gradient(circle at 35% 35%, #fef08a, #facc15 70%, #ca8a04);
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.6);
}

/* Chess & Checkers Boards - ENLARGED */
.chess-game-container, .checkers-game-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chess-board, .checkers-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 100%;
  max-width: 410px;
  aspect-ratio: 1;
  border: 3px solid #334155;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.chess-sq, .checkers-sq {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem; /* Big Pieces */
  cursor: pointer;
  touch-action: manipulation;
}

.chess-sq.light, .checkers-sq.light-sq {
  background-color: #cbd5e1;
  color: #0f172a;
}

.chess-sq.dark, .checkers-sq.dark-playable {
  background-color: #475569;
  color: #f8fafc;
}

.selected-sq {
  background-color: #f59e0b !important;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.white-piece {
  color: #ffffff;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.9));
}

.black-piece {
  color: #050505;
}

.checkers-piece {
  width: 82%;
  height: 82%;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.checkers-piece.white-piece {
  background: radial-gradient(circle at 35% 35%, #ffffff, #cbd5e1);
}

.checkers-piece.red-piece {
  background: radial-gradient(circle at 35% 35%, #f87171, #dc2626);
}

/* Tic-Tac-Toe Board - ENLARGED */
.ttt-game-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.ttt-cell {
  aspect-ratio: 1;
  background-color: #1e293b;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ttt-cell.clickable {
  cursor: pointer;
  background-color: #27354a;
}

.ttt-cell.clickable:active {
  background-color: #334155;
  transform: scale(0.96);
}

.x-mark { color: #ef4444; }
.o-mark { color: #3b82f6; }

/* Battleship Board - ENLARGED */
.battleship-game-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 400px;
}

.bs-section {
  width: 100%;
}

.bs-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.bs-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.bs-sq {
  aspect-ratio: 1;
  background-color: #1e293b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.bs-targetable {
  background-color: #1e3a8a;
  cursor: pointer;
}

.bs-targetable:active {
  background-color: #2563eb;
  transform: scale(0.95);
}

.bs-placeable {
  background-color: #0f766e;
  cursor: pointer;
}

.bs-ship {
  background-color: #059669;
}

.bs-hit {
  background-color: #991b1b;
}

.bs-miss {
  background-color: #334155;
}
