/* Connect 4 styles */
.connect4-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.connect4-board-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0;
}

.connect4-board {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: linear-gradient(145deg, rgba(10, 22, 45, 0.92), rgba(32, 56, 90, 0.92));
  border-radius: 2rem;
  padding: 1.5rem;
  box-shadow: 0 20px 35px rgba(7, 12, 25, 0.55), inset 0 2px 18px rgba(255, 255, 255, 0.06);
  border: 4px solid rgba(255, 255, 255, 0.08);
  max-width: min(90vw, 520px);
}

.connect4-board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -60%);
  width: min(55%, 360px);
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 237, 160, 0.45), rgba(255, 100, 120, 0.45));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  opacity: 0.75;
}

.connect4-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.connect4-cell {
  width: clamp(46px, 9vw, 68px);
  height: clamp(46px, 9vw, 68px);
  background: radial-gradient(circle at 45% 35%, rgba(20, 28, 45, 0.9), rgba(6, 11, 22, 0.95));
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.55), inset 0 -3px 6px rgba(255, 255, 255, 0.05), 0 8px 14px rgba(6, 10, 20, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.connect4-cell:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.55), inset 0 -3px 6px rgba(255, 255, 255, 0.05), 0 12px 22px rgba(8, 14, 28, 0.55);
}

.connect4-red {
  background: radial-gradient(circle at 60% 40%, #ff7171 35%, #ff3131 70%, #a40606 100%);
  box-shadow: inset 0 6px 10px rgba(255, 255, 255, 0.25), 0 0 18px rgba(255, 71, 83, 0.7);
}

.connect4-yellow {
  background: radial-gradient(circle at 60% 40%, #fff3b0 35%, #ffd447 70%, #d99414 100%);
  box-shadow: inset 0 6px 10px rgba(255, 255, 255, 0.25), 0 0 18px rgba(252, 214, 115, 0.7);
}

@media (max-width: 768px) {
  .connect4-board {
    padding: 1.25rem;
    gap: 0.6rem;
  }

  .connect4-row {
    gap: 0.6rem;
  }
}
:root {
  --primary: #6c5ce7;
  --secondary: #00cec9;
  --accent: #ffeaa7;
  --dark: #0b132b;
  --glass: rgba(255, 255, 255, 0.08);
  --gradient: linear-gradient(135deg, rgba(108, 92, 231, 0.9), rgba(0, 206, 201, 0.75));
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at top left, rgba(108, 92, 231, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0, 206, 201, 0.35), transparent 60%),
    #05080f;
  min-height: 100vh;
  color: #f2f5ff;
  overflow-x: hidden;
}

body.sidebar-open {
  overflow: hidden;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.sidebar {
  width: min(280px, 100%);
  background: rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(18px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.5rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s ease, opacity 0.25s ease;
}

.sidebar .brand {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sidebar .brand span {
  font-size: 1.8rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar-nav button {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.82);
  padding: 0.75rem 1rem;
  border-radius: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.sidebar-nav button:hover {
  background: rgba(144, 202, 249, 0.18);
  border-color: rgba(144, 202, 249, 0.45);
  transform: translateX(4px);
}

.sidebar-nav button.active {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.65), rgba(0, 206, 201, 0.5));
  color: #05080f;
  border-color: transparent;
  box-shadow: 0 12px 22px rgba(108, 92, 231, 0.25);
}

.content-area {
  flex: 1;
  /* padding: 2.5rem min(3vw, 3rem); */
}

.content-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  color: #fefeff;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

p, label, li, span {
  color: rgba(240, 244, 255, 0.92);
}

.share-card {
  border-radius: 1.25rem;
  box-shadow: 0 22px 40px rgba(5, 8, 15, 0.35);
  overflow: hidden;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: #0b132b;
  background: rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 12px 24px rgba(4, 7, 14, 0.25);
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-btn svg {
  width: 1.2rem;
  height: 1.2rem;
}

.share-btn:hover,
.share-btn:focus {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(4, 7, 14, 0.35);
  filter: brightness(1.05);
}

.share-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

.share-btn-facebook {
  background: linear-gradient(135deg, #1877f2, #0f5ad0);
  color: #f5f8ff;
}

.share-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #e8fff5;
}

.share-btn-reddit {
  background: linear-gradient(135deg, #ff5700, #d63a00);
  color: #fff4ed;
}

.share-btn-copy {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  color: #f8fbff;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.08);
}

.share-btn-copy:hover,
.share-btn-copy:focus {
  filter: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
}

.share-feedback {
  min-height: 1.2rem;
  transition: opacity 0.25s ease;
}

.share-feedback[hidden] {
  opacity: 0;
}

.share-feedback:not([hidden]) {
  opacity: 1;
}

@media (max-width: 576px) {
  .share-btn {
    flex: 1 1 calc(50% - 0.75rem);
    justify-content: center;
  }
}

.game-hero-card {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 206, 201, 0.18)), rgba(12, 15, 28, 0.86);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.game-hero-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.35) 0%, rgba(108, 92, 231, 0) 65%);
  pointer-events: none;
}

.game-hero-card::after {
  content: '';
  position: absolute;
  bottom: -45%;
  left: -10%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 206, 201, 0.3) 0%, rgba(0, 206, 201, 0) 70%);
  pointer-events: none;
}

.game-hero-card .card-body {
  position: relative;
  z-index: 1;
}

.text-muted {
  color: rgba(225, 235, 255, 0.75) !important;
}

.nav-profile {
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.nav-profile strong {
  color: #fefefe;
}

@media (min-width: 992px) {
  .nav-profile {
    border-top: none;
    padding-top: 0;
  }
}

.glassy-bar {
  background: rgba(5, 8, 15, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero {
  padding-top: 8rem;
  padding-bottom: 5rem;
}

.text-gradient {
  background: linear-gradient(120deg, #ffeaa7, #00cec9, #6c5ce7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pulse {
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.6);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(108, 92, 231, 0);
  }
}

.orb-container {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
}

.orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient);
  filter: drop-shadow(0 20px 60px rgba(108, 92, 231, 0.4));
  animation: float 4s ease-in-out infinite;
}

.sparkles {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 60%);
  mix-blend-mode: screen;
  animation: twinkle 5s linear infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-16px) scale(1.05);
  }
}

@keyframes twinkle {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.neon-card {
  border: 1px solid rgba(108, 92, 231, 0.55);
  background: rgba(12, 16, 30, 0.88);
  backdrop-filter: blur(10px);
}

.glass-card {
  background: rgba(12, 15, 28, 0.82);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-gradient {
  background-image: var(--gradient);
  color: #05080f;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(108, 92, 231, 0.35);
}

.pong-arena {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(10, 16, 34, 0.95), rgba(5, 8, 15, 0.9));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.pong-arena canvas {
  display: block;
  width: 100%;
  aspect-ratio: 12 / 7;
}

.pong-scoreboard {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.2rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  user-select: none;
}

.pong-mobile-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(6px);
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(12, 15, 28, 0.6);
}

.pong-mobile-controls button {
  width: 52px;
  height: 52px;
  font-size: 1.25rem;
  border-radius: 999px;
}

.text-success {
  color: #7dfc8a !important;
}

.text-danger {
  color: #ff8787 !important;
}

@media (min-width: 992px) {
  .pong-mobile-controls {
    display: none;
  }
}

#hints-list li {
  border-left: 3px solid rgba(108, 92, 231, 0.8);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 1rem 1rem 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateX(-20px);
  animation: slideIn 0.4s forwards;
  color: #f7f9ff;
}

.card-title {
  color: #fefeff;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(10, 16, 34, 0.82);
}

.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card .h2,
.card .h3,
.card .h4,
.card .h5,
.card .h6 {
  color: #fefeff;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.bg-player {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(219, 234, 254, 0.95));
  color: #1b2238;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(23, 32, 58, 0.45);
}

#players-list .player-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(12, 16, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  margin: 0.25rem 0.35rem 0 0;
  color: #f7f9ff;
  font-size: 0.95rem;
}

#players-list .player-pill button {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

#players-list .player-pill button:hover {
  color: rgba(255, 105, 97, 0.95);
}

.lightbox-modal {
  background: linear-gradient(180deg, #ffffff, #f4f6ff);
  border-radius: 1rem;
  box-shadow: 0 25px 60px rgba(10, 16, 35, 0.35);
  border: none;
}

.lightbox-answer {
  color: #3d2c8d;
  text-shadow: 0 12px 35px rgba(61, 44, 141, 0.3);
}

.victory-modal {
  background: radial-gradient(circle at top left, rgba(255, 215, 128, 0.95), rgba(255, 255, 255, 0.95));
  border-radius: 1.2rem;
  border: none;
  box-shadow: 0 25px 70px rgba(255, 175, 75, 0.45);
  position: relative;
  overflow: hidden;
}

.defeat-modal {
  background: linear-gradient(200deg, #1e293b, #0f172a 70%);
  border-radius: 1.2rem;
  border: none;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.6);
  position: relative;
  overflow: hidden;
  color: #e2e8f0;
}

.defeat-modal .victory-stat {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.4);
}

.defeat-modal .victory-stat .value {
  color: #38bdf8;
}

.hangman-modal {
  background: radial-gradient(circle at top left, rgba(244, 245, 252, 0.96), rgba(255, 255, 255, 0.92));
  border-radius: 1.2rem;
  border: none;
  box-shadow: 0 25px 70px rgba(99, 102, 241, 0.35);
  color: #0f172a;
}

.victory-burst {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  background: radial-gradient(circle, rgba(255, 244, 214, 0.9) 0%, rgba(255, 200, 123, 0.2) 65%, transparent 70%);
  filter: blur(0.5px);
  animation: pulseBurst 3s ease-in-out infinite;
}

.victory-confetti {
  font-size: 1.5rem;
  animation: wiggle 2.2s ease-in-out infinite;
}

.victory-stat {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1rem;
  padding: 0.75rem;
  box-shadow: 0 12px 30px rgba(255, 163, 102, 0.35);
}

.victory-stat .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.45);
}

.victory-stat .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ff7b54;
}

@keyframes pulseBurst {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(6deg);
  }
  75% {
    transform: rotate(-6deg);
  }
}

.word-search-grid {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 0.35rem;
  background: rgba(12, 16, 30, 0.6);
  padding: 0.75rem;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  user-select: none;
}

.word-search-grid button {
  position: relative;
  border: none;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fefefe;
  font-weight: 600;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  aspect-ratio: 1 / 1;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.2s ease;
}

.word-search-grid button:hover {
  transform: translateY(-2px);
  background: rgba(108, 92, 231, 0.6);
  box-shadow: 0 8px 18px rgba(108, 92, 231, 0.35);
}

.word-search-grid button.selected {
  background: rgba(0, 206, 201, 0.65);
  box-shadow: 0 0 0 2px rgba(0, 206, 201, 0.85), 0 12px 20px rgba(0, 206, 201, 0.3);
}

.word-search-grid button.found {
  background: rgba(255, 215, 128, 0.85);
  color: #241b0b;
  box-shadow: 0 12px 24px rgba(255, 171, 64, 0.35);
}

.word-search-list li {
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 0.5rem;
  color: rgba(240, 244, 255, 0.88);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.word-search-list li span.status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.word-search-list li.found {
  background: rgba(0, 206, 201, 0.18);
  color: #9af2ea;
}

.word-search-list li.found span.status {
  color: rgba(0, 206, 201, 0.75);
}

.mastermind-history {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.mastermind-history li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 244, 255, 0.9);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.mastermind-history li .feedback {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.mastermind-current {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mastermind-slots,
#mastermind-current {
  display: flex;
  gap: 0.75rem;
}

.mastermind-slot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.mastermind-slot.filled {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
  transform: scale(1.02);
}

.mastermind-dot {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.dot-red { background: linear-gradient(135deg, #ff4d6d, #c9184a); }
.dot-green { background: linear-gradient(135deg, #43aa8b, #2d6a4f); }
.dot-blue { background: linear-gradient(135deg, #4895ef, #4361ee); }
.dot-yellow { background: linear-gradient(135deg, #ffd166, #f4a261); }
.dot-purple { background: linear-gradient(135deg, #c77dff, #9d4edd); }
.dot-brown { background: linear-gradient(135deg, #b08968, #7f5539); }
.dot-orange { background: linear-gradient(135deg, #f77f00, #d62828); }

.dot-empty {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.mastermind-palette-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.mastermind-palette-grid button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.mastermind-palette-grid button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 4px;
}

.mastermind-palette-grid button:hover {
  transform: translateY(-4px);
}

.snake-board-wrapper {
  position: relative;
  border-radius: 1rem;
  padding: 0.75rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.snake-board-wrapper canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  background: #0f172a;
}

.snake-overlay {
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  background: rgba(8, 11, 21, 0.85);
  color: #fefefe;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.snake-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.hangman-word {
  display: flex;
  gap: 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: 0.1em;
  justify-content: center;
  padding: 1rem 0;
}

.hangman-word span {
  min-width: 1.8rem;
  text-align: center;
  border-bottom: 3px solid rgba(255, 255, 255, 0.4);
  color: #f1f5f9;
}

.hangman-letters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 0.5rem;
}

.hangman-letters button {
  border: none;
  border-radius: 0.75rem;
  padding: 0.6rem 0;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  transition: transform 0.15s ease, background 0.2s ease;
}

.hangman-letters button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(59, 130, 246, 0.45);
}

.hangman-letters button:disabled {
  background: rgba(148, 163, 184, 0.25);
  color: rgba(241, 245, 249, 0.35);
}

.hangman-letters button.used {
  background: rgba(148, 163, 184, 0.25);
  color: rgba(241, 245, 249, 0.35);
  transform: none !important;
}

.hangman-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hangman-status .badge {
  font-size: 0.85rem;
}

.hangman-wrong {
  min-height: 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.08em;
  color: #fca5a5;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.table-dark th {
  border-color: rgba(108, 92, 231, 0.4);
}

.toast {
  background: rgba(5, 8, 15, 0.95);
  border: 1px solid rgba(108, 92, 231, 0.35);
  color: #fff;
}

.toast-success {
  border-color: rgba(46, 213, 115, 0.6);
}

.toast-error {
  border-color: rgba(255, 71, 87, 0.6);
}

.badge.bg-secondary {
  background: rgba(108, 92, 231, 0.5) !important;
}

@media (max-width: 767px) {
  .hero {
    padding-top: 6rem;
  }
}
.sidebar-toggle {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 992px) {
  .app-shell {
    position: relative;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    opacity: 0;
    z-index: 1040;
    width: min(78vw, 320px);
  }

  .sidebar.show {
    transform: translateX(0);
    opacity: 1;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(5, 8, 15, 0.85);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.55rem 1rem;
    margin-bottom: 1.5rem;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1030;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .sidebar-backdrop.show {
    display: block;
    opacity: 1;
  }

  .content-area {
    padding: 1.5rem 1rem 3rem;
  }

  .content-header {
    display: flex;
  }
}

@media (max-width: 576px) {
  .content-area .container.py-5,
  .content-area section.py-5 {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }
}

.sudoku-board-wrapper {
  display: flex;
  justify-content: center;
}

.sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 2px;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 0.75rem;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.25);
}

.sudoku-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 1.25vw + 0.75rem, 1.65rem);
  font-weight: 600;
  background: rgba(5, 8, 15, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fefefe;
  border-radius: 0.4rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sudoku-cell:focus {
  outline: none;
}

.sudoku-cell--clue {
  background: rgba(108, 92, 231, 0.35);
  color: #ffeaa7;
  cursor: default;
}

.sudoku-cell--selected {
  border-color: rgba(0, 206, 201, 0.9);
  box-shadow: 0 0 0 2px rgba(0, 206, 201, 0.35);
}

.sudoku-cell--filled {
  color: #ffeaa7;
}

.sudoku-cell--error {
  background: rgba(231, 76, 60, 0.8);
  border-color: rgba(231, 76, 60, 0.9);
}

.sudoku-cell--vertical-divider {
  border-right-width: 2px;
}

.sudoku-cell--horizontal-divider {
  border-bottom-width: 2px;
}

.sudoku-number-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: min(100%, 320px);
}

.sudoku-number-pad .btn {
  width: 100%;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

@media (max-width: 576px) {
  .sudoku-board {
    width: 100%;
    padding: 0.5rem;
  }

  .sudoku-number-pad {
    width: 100%;
  }
}

.battleship-board-wrapper {
  display: flex;
  justify-content: center;
}

.battleship-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  padding: 0.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
  /* Ensure grid maintains structure */
  position: relative;
  overflow: hidden;
}

.battleship-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.35rem;
  background: rgba(7, 12, 24, 0.88);
  color: #fefefe;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
  /* Fixed dimensions to prevent size changes */
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  min-width: 32px;
  min-height: 32px;
  box-sizing: border-box;
}

.battleship-cell:hover,
.battleship-cell:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 206, 201, 0.8);
  outline: none;
}

.battleship-cell--miss {
  background: rgba(70, 96, 130, 0.6);
  border-color: rgba(173, 216, 230, 0.8);
  position: relative;
  /* Maintain size consistency */
  flex-shrink: 0;
}

.battleship-cell--miss::after {
  content: '•';
  font-size: 1.4rem;
  color: rgba(173, 216, 230, 0.9);
  /* Prevent pseudo-element from changing cell size */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

.battleship-cell--hit {
  background: rgba(231, 76, 60, 0.85);
  border-color: rgba(231, 76, 60, 0.95);
  box-shadow: 0 0 18px rgba(231, 76, 60, 0.4);
  position: relative;
  /* Maintain size consistency */
  flex-shrink: 0;
}

.battleship-cell--hit::after {
  content: '✸';
  font-size: 1.3rem;
  color: #ffeaa7;
  /* Prevent pseudo-element from changing cell size */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

.battleship-cell--ship {
  background: rgba(33, 150, 243, 0.35);
  border-color: rgba(33, 150, 243, 0.7);
}

@media (max-width: 576px) {
  .battleship-grid {
    padding: 0.5rem;
    gap: 3px;
    /* Ensure better mobile touch targets */
    width: min(100%, 350px);
  }

  .battleship-cell {
    /* Ensure adequate touch targets on mobile */
    min-width: 28px;
    min-height: 28px;
  }

  .battleship-cell--miss::after,
  .battleship-cell--hit::after {
    font-size: 1rem;
  }
}

@media (max-width: 768px) and (min-width: 577px) {
  .battleship-grid {
    width: min(100%, 400px);
  }

  .battleship-cell {
    min-width: 30px;
    min-height: 30px;
  }
}

.morris-board-wrapper {
  display: flex;
  justify-content: center;
}

.morris-board {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(5, 10, 22, 0.92), rgba(12, 20, 35, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 25px 45px rgba(0, 0, 0, 0.35);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.morris-board-svg {
  position: absolute;
  inset: clamp(1rem, 2vw, 1.5rem);
  width: calc(100% - clamp(2rem, 4vw, 3rem));
  height: calc(100% - clamp(2rem, 4vw, 3rem));
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 3;
  fill: none;
  pointer-events: none;
}

.morris-board-svg rect {
  stroke-width: 3;
}

.morris-board-svg line {
  stroke-width: 2.5;
}

.morris-points {
  position: absolute;
  inset: clamp(1rem, 2vw, 1.5rem);
  width: calc(100% - clamp(2rem, 4vw, 3rem));
  height: calc(100% - clamp(2rem, 4vw, 3rem));
}

.morris-point {
  position: absolute;
  top: calc(var(--top) * 1%);
  left: calc(var(--left) * 1%);
  width: clamp(1.6rem, 2vw + 1rem, 2.25rem);
  height: clamp(1.6rem, 2vw + 1rem, 2.25rem);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 14, 28, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.morris-point::after {
  content: '';
  width: 65%;
  height: 65%;
  border-radius: 50%;
  box-shadow: inset 0 6px 12px rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.morris-point:focus-visible {
  outline: 2px solid rgba(0, 206, 201, 0.75);
  outline-offset: 4px;
}

.morris-point:hover {
  transform: translate(-50%, -50%) scale(1.05);
  border-color: rgba(0, 206, 201, 0.55);
}

.morris-point--player::after {
  background: radial-gradient(circle at 30% 30%, #ffeaa7, #f39c12);
  opacity: 1;
}

.morris-point--opponent::after {
  background: radial-gradient(circle at 30% 30%, #d0e6ff, #2980b9);
  opacity: 1;
}

.morris-point--selected {
  box-shadow: 0 0 0 4px rgba(0, 206, 201, 0.25);
}

.morris-point--selected::after {
  transform: scale(1.05);
}

.morris-point--valid {
  border-color: rgba(72, 219, 251, 0.8);
  box-shadow: 0 0 18px rgba(72, 219, 251, 0.35);
}

.morris-point--capturable {
  border-color: rgba(231, 76, 60, 0.85);
  box-shadow: 0 0 18px rgba(231, 76, 60, 0.35);
}

.morris-point--capturable::after {
  opacity: 1;
  background: radial-gradient(circle at 30% 30%, #ffd6cc, #e74c3c);
}

[data-requires-name="true"] .btn-close {
  display: none;
}

.morris-player-turn .morris-board {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 25px 45px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(0, 206, 201, 0.35);
}

.morris-player-turn #morris-turn {
  animation: pulseTurn 1.4s ease-in-out infinite;
}

.morris-ai-turn .morris-board {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 25px 45px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(231, 76, 60, 0.25);
  filter: saturate(0.85);
}

.morris-ai-turn .morris-point {
  pointer-events: none;
  opacity: 0.7;
}

.morris-ai-turn #morris-turn {
  animation: none;
  transform: none;
  box-shadow: none;
}

.morris-player-turn .morris-point {
  pointer-events: auto;
  opacity: 1;
}

@keyframes pulseTurn {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 206, 201, 0.45);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(0, 206, 201, 0);
  }
}

/* Animated AI move token */
.morris-animated-token {
  box-shadow: 0 8px 25px rgba(41, 128, 185, 0.4), 0 0 20px rgba(72, 219, 251, 0.6);
  border-color: rgba(72, 219, 251, 0.9) !important;
  transform: translate(-50%, -50%) scale(1.15);
  filter: brightness(1.2);
}

/* Mastermind mobile layout */
.mastermind-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .mastermind-layout {
    flex-direction: row-reverse;
    gap: 1.5rem;
  }

  .mastermind-attempts {
    flex-grow: 1;
  }

  .mastermind-palette {
    flex-shrink: 0;
  }
}

/* AI capture animation */
.morris-point--captured {
  animation: captureAnimation 1.5s ease-out;
}

@keyframes captureAnimation {
  0% {
    transform: translate(-50%, -50%) scale(1);
    border-color: rgba(231, 76, 60, 0.9);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.6);
  }
  20% {
    transform: translate(-50%, -50%) scale(1.3);
    border-color: rgba(231, 76, 60, 1);
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.8);
  }
  40% {
    transform: translate(-50%, -50%) scale(1);
    border-color: rgba(231, 76, 60, 0.7);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
  }
  60% {
    transform: translate(-50%, -50%) scale(1.2);
    border-color: rgba(231, 76, 60, 0.9);
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.7);
  }
  80% {
    transform: translate(-50%, -50%) scale(1);
    border-color: rgba(231, 76, 60, 0.5);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
  }
}

/* Checkers Game Styles */
.checkers-board-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
  padding: 1rem;
}

.checkers-board {
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  gap: 0;
  width: 480px;
  height: 480px;
  border: 4px solid var(--accent);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  background: #2a2a2a;
}

.checkers-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
}

.checkers-square {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.checkers-square.light-square {
  background: #f0d9b5;
}

.checkers-square.dark-square {
  background: #b58863;
}

.checkers-square.selected {
  background: rgba(255, 215, 0, 0.6) !important;
  box-shadow: inset 0 0 0 3px #ffd700;
}

.checkers-square.valid-move {
  background: rgba(50, 205, 50, 0.4) !important;
  box-shadow: inset 0 0 0 2px #32cd32;
}

.checkers-square.valid-move::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #32cd32;
  border-radius: 50%;
  opacity: 0.8;
}

.checkers-square.ai-move-origin {
  background: rgba(255, 69, 0, 0.7) !important;
  box-shadow: inset 0 0 0 3px #ff4500, 0 0 15px rgba(255, 69, 0, 0.5);
  animation: aiOriginPulse 1s ease-in-out;
}

.checkers-square.ai-move-target {
  background: rgba(255, 140, 0, 0.7) !important;
  box-shadow: inset 0 0 0 3px #ff8c00, 0 0 15px rgba(255, 140, 0, 0.5);
  animation: aiTargetPulse 1s ease-in-out;
}

@keyframes aiOriginPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: inset 0 0 0 3px #ff4500, 0 0 15px rgba(255, 69, 0, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: inset 0 0 0 4px #ff4500, 0 0 25px rgba(255, 69, 0, 0.8);
  }
}

@keyframes aiTargetPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: inset 0 0 0 3px #ff8c00, 0 0 15px rgba(255, 140, 0, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: inset 0 0 0 4px #ff8c00, 0 0 25px rgba(255, 140, 0, 0.8);
  }
}

.checkers-piece {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.2);
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkers-piece:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.checkers-piece.red-piece {
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #e74c3c);
  box-shadow:
    0 3px 8px rgba(231, 76, 60, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.checkers-piece.black-piece {
  background: radial-gradient(circle at 30% 30%, #555, #2c3e50);
  box-shadow:
    0 3px 8px rgba(44, 62, 80, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);
}

.checkers-piece.king::after {
  content: '♔';
  font-size: 24px;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Responsive design for checkers */
@media (max-width: 768px) {
  .checkers-board {
    width: 320px;
    height: 320px;
  }

  .checkers-square {
    height: 40px;
  }

  .checkers-piece {
    width: 32px;
    height: 32px;
  }

  .checkers-piece.king::after {
    font-size: 16px;
  }

  .checkers-board-wrapper {
    min-height: 360px;
  }
}

/* State Capitol Game Styles */
.btn-choice {
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-choice:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  color: white;
}

.btn-choice.correct {
  background: linear-gradient(45deg, #56ab2f 0%, #a8e6cf 100%);
  animation: correctPulse 0.6s ease-out;
}

.btn-choice.incorrect {
  background: linear-gradient(45deg, #ff6b6b 0%, #ee5a52 100%);
  animation: shake 0.5s ease-in-out;
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

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

.state-map-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  min-height: 200px;
  position: relative;
}

.state-tile {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 4px;
  font-size: 10px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 30px;
}

.state-tile.guessed {
  background: linear-gradient(45deg, #56ab2f 0%, #a8e6cf 100%);
  color: white;
  font-weight: bold;
  transform: scale(1.1);
  z-index: 2;
}

.state-tile.guessed.incorrect {
  background: linear-gradient(45deg, #ff6b6b 0%, #ee5a52 100%);
}

.state-tile.guessed::after {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 8px;
  color: white;
}

.state-tile.guessed.incorrect::after {
  content: "✗";
}

.state-abbreviation {
  font-size: 8px;
  font-weight: bold;
  line-height: 1;
}

.state-name {
  font-size: 6px;
  opacity: 0.8;
  line-height: 1;
  margin-top: 1px;
}

.stat-card {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 5px;
}

.progress-bar.bg-gradient {
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%) !important;
}

/* Responsive state map */
@media (max-width: 768px) {
  .state-map-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .state-tile {
    min-height: 25px;
    font-size: 8px;
  }

.state-name {
  display: none;
}
}

/* World Capitals Passport Tracker */
.passport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.passport-grid::-webkit-scrollbar {
  width: 6px;
}

.passport-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.passport-empty {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  background: rgba(5, 8, 15, 0.45);
}

.passport-stamp {
  position: relative;
  padding: 1rem;
  background: rgba(15, 20, 35, 0.85);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px rgba(3, 10, 28, 0.35);
  overflow: hidden;
  min-height: 140px;
}

.passport-stamp.correct {
  background: linear-gradient(155deg, rgba(80, 200, 120, 0.12), rgba(12, 42, 26, 0.75));
}

.passport-stamp.incorrect {
  background: linear-gradient(155deg, rgba(255, 99, 99, 0.12), rgba(45, 12, 18, 0.8));
}

.passport-stamp .stamp-ring {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 2px;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0));
}

.passport-stamp::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.passport-stamp.correct::before {
  border-color: rgba(80, 200, 120, 0.45);
}

.passport-stamp.incorrect::before {
  border-color: rgba(255, 120, 120, 0.45);
}

.passport-stamp .stamp-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.passport-stamp .stamp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.passport-stamp .stamp-country {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.passport-stamp .stamp-capital {
  font-size: 0.95rem;
  opacity: 0.85;
}

.passport-stamp .stamp-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.passport-stamp .stamp-status {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.passport-stamp.incorrect .stamp-status {
  color: rgba(255, 180, 180, 0.85);
}

.passport-stamp.correct .stamp-status {
  color: rgba(160, 255, 200, 0.85);
}

.passport-stamp::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  border: 3px solid transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.passport-stamp {
  --region-color: rgba(154, 160, 185, 0.55);
}

.passport-stamp .stamp-ring {
  background: linear-gradient(135deg, var(--region-color), rgba(255, 255, 255, 0.05));
  opacity: 0.65;
}

.passport-stamp.incorrect .stamp-ring {
  opacity: 0.45;
}

.legend-dot {
  display: inline-flex;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.65);
}

.legend-dot.correct {
  background: rgba(96, 220, 160, 0.85);
}

.legend-dot.incorrect {
  background: rgba(255, 120, 120, 0.85);
}

@media (max-width: 992px) {
  .passport-grid {
    max-height: 320px;
  }
}

@media (max-width: 576px) {
  .passport-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    max-height: 260px;
  }
}

/* Periodic Table Quiz styles */
.periodic-table-container {
  width: 100%;
  overflow-x: auto;
  padding: 1rem;
  margin: 0 auto;
}

.periodic-table {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  font-size: 0.75rem;
}

.periodic-table-grid {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 1rem;
}

.lanthanides-actinides-row {
  display: flex;
  gap: 2px;
  align-items: center;
  margin-bottom: 0.5rem;
}

.series-label {
  width: 80px;
  font-size: 0.7rem;
  font-weight: bold;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.5rem;
}

.periodic-cell {
  min-width: 50px;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(40, 40, 40, 0.8);
  color: #ffffff;
  font-size: 0.7rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
  aspect-ratio: 1;
}

.lanthanides-actinides-row .periodic-cell {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.periodic-cell.empty {
  background: transparent;
  border: none;
  cursor: default;
}

.periodic-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(150, 200, 255, 0.6);
}

.periodic-cell.correct {
  background: linear-gradient(145deg, rgba(40, 167, 69, 0.9), rgba(25, 135, 84, 0.9)) !important;
  border: 2px solid #28a745 !important;
  color: #ffffff !important;
}

.periodic-cell.failed {
  background: linear-gradient(145deg, rgba(220, 53, 69, 0.9), rgba(183, 28, 45, 0.9)) !important;
  border: 2px solid #dc3545 !important;
  color: #ffffff !important;
}

.periodic-cell.empty:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.element-number {
  font-size: 0.6rem;
  font-weight: bold;
  line-height: 1;
}

.element-symbol {
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1;
  margin: 1px 0;
}

.element-name {
  font-size: 0.5rem;
  line-height: 1;
  opacity: 0.8;
}

/* Element category colors */
.element-alkali-metal {
  background: linear-gradient(145deg, rgba(255, 102, 102, 0.7), rgba(220, 75, 75, 0.7));
}

.element-alkaline-earth-metal {
  background: linear-gradient(145deg, rgba(255, 165, 102, 0.7), rgba(220, 140, 75, 0.7));
}

.element-transition-metal {
  background: linear-gradient(145deg, rgba(102, 178, 255, 0.7), rgba(75, 150, 220, 0.7));
}

.element-post-transition-metal {
  background: linear-gradient(145deg, rgba(153, 204, 255, 0.7), rgba(120, 180, 220, 0.7));
}

.element-metalloid {
  background: linear-gradient(145deg, rgba(204, 153, 255, 0.7), rgba(180, 120, 220, 0.7));
}

.element-nonmetal {
  background: linear-gradient(145deg, rgba(255, 255, 102, 0.7), rgba(220, 220, 75, 0.7));
}

.element-halogen {
  background: linear-gradient(145deg, rgba(255, 204, 153, 0.7), rgba(220, 180, 120, 0.7));
}

.element-noble-gas {
  background: linear-gradient(145deg, rgba(204, 255, 204, 0.7), rgba(180, 220, 180, 0.7));
}

.element-lanthanide {
  background: linear-gradient(145deg, rgba(255, 204, 255, 0.7), rgba(220, 180, 220, 0.7));
}

.element-actinide {
  background: linear-gradient(145deg, rgba(255, 153, 204, 0.7), rgba(220, 120, 180, 0.7));
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

/* Responsive design for periodic table */
@media (max-width: 1200px) {
  .periodic-cell {
    min-width: 40px;
    min-height: 40px;
    font-size: 0.65rem;
  }

  .lanthanides-actinides-row .periodic-cell {
    width: 40px;
    height: 40px;
  }

  .element-symbol {
    font-size: 0.8rem;
  }

  .element-number {
    font-size: 0.55rem;
  }

  .element-name {
    font-size: 0.45rem;
  }
}

@media (max-width: 992px) {
  .periodic-cell {
    min-width: 35px;
    min-height: 35px;
    font-size: 0.6rem;
  }

  .lanthanides-actinides-row .periodic-cell {
    width: 35px;
    height: 35px;
  }

  .element-symbol {
    font-size: 0.75rem;
  }

  .element-number {
    font-size: 0.5rem;
  }

  .element-name {
    font-size: 0.4rem;
  }
}

@media (max-width: 768px) {
  .periodic-cell {
    min-width: 30px;
    min-height: 30px;
    font-size: 0.55rem;
  }

  .lanthanides-actinides-row .periodic-cell {
    width: 30px;
    height: 30px;
  }

  .element-symbol {
    font-size: 0.7rem;
  }

  .element-number {
    font-size: 0.45rem;
  }

  .element-name {
    display: none; /* Hide element names on small screens */
  }

  .periodic-table-container {
    padding: 0.5rem;
  }

  .series-label {
    width: 60px;
    font-size: 0.6rem;
  }
}
