


#tictactoe-board-theme-container.arcade-screen-container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 480px;
  padding: 16px 14px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}


.tictactoe-frame-wrapper {
  width: 100%;
  max-width: min(540px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  margin: auto;
  transition: var(--transition-smooth);
}

.tictactoe-status-bar {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary-accent);
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid var(--panel-border);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}


.infinite-status-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(99, 102, 241, 0.16));
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 8px;
  color: #e9d5ff;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.2);
  animation: banner-glow 2.5s infinite alternate ease-in-out;
}

@keyframes banner-glow {
  0% { box-shadow: 0 0 8px rgba(168, 85, 247, 0.15); }
  100% { box-shadow: 0 0 18px rgba(168, 85, 247, 0.35); }
}

.infinite-pill {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.infinite-hint-text {
  letter-spacing: 0.3px;
  opacity: 0.95;
}


.tictactoe-board-container {
  position: relative;
  width: 100%;
  max-width: min(480px, 86vw, 62vh);
  aspect-ratio: 1;
  margin: 4px auto;
  box-sizing: border-box;
}

.tictactoe-grid-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: visible;
  user-select: none;
  box-sizing: border-box;
  padding: 10px;
  background: rgba(8, 14, 28, 0.75);
  border: 2px solid rgba(0, 240, 255, 0.35);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 240, 255, 0.08);
  transition: var(--transition-smooth);
}


.tictactoe-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  perspective: 700px;
  transform-style: preserve-3d;
  user-select: none;
  border-radius: 12px;
  background: rgba(16, 24, 44, 0.85);
  border: 2px solid rgba(0, 240, 255, 0.35);
  box-shadow: inset 0 0 14px rgba(0, 240, 255, 0.05), 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tictactoe-cell:hover {
  transform: scale(1.02) translateZ(4px);
  background: rgba(0, 240, 255, 0.14);
  border-color: rgba(0, 240, 255, 0.8);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35), inset 0 0 12px rgba(0, 240, 255, 0.12);
}

.tictactoe-cell:active {
  transform: scale(0.96) translateZ(-2px);
}


.mark-3d {
  width: 82%;
  height: 82%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: none;
  transform-style: preserve-3d;
  animation: piece-drop-3d 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes piece-drop-3d {
  0% {
    opacity: 0;
    transform: scale(0.2) translateZ(60px) rotateX(30deg) rotateY(-15deg);
  }
  65% {
    opacity: 1;
    transform: scale(1.14) translateZ(8px) rotateX(-6deg) rotateY(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateZ(0) rotateX(0deg) rotateY(0deg);
  }
}

.mark-3d svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.8));
  transition: transform 0.25s ease, filter 0.25s ease;
}


.theme-cyber .mark-x svg {
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.85))
          drop-shadow(0 0 14px rgba(0, 240, 255, 0.65))
          drop-shadow(0 0 28px rgba(0, 240, 255, 0.25));
}


.theme-cyber .mark-o svg {
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.85))
          drop-shadow(0 0 14px rgba(255, 0, 180, 0.65))
          drop-shadow(0 0 28px rgba(255, 0, 180, 0.25));
}


.theme-nokia .mark-3d svg {
  filter: drop-shadow(2px 3px 0px rgba(0, 0, 0, 0.45));
}


.tictactoe-cell.about-to-fade .mark-3d {
  animation: infinite-fade-pulse 1.3s infinite ease-in-out !important;
}

.tictactoe-cell.about-to-fade::after {
  content: 'VANISH NEXT';
  position: absolute;
  bottom: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  text-shadow: 0 1px 2px #000;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  z-index: 15;
  pointer-events: none;
  animation: badge-pulse 1.3s infinite ease-in-out;
}

.theme-nokia .tictactoe-cell.about-to-fade::after {
  background: hsl(92, 50%, 15%);
  color: hsl(92, 38%, 48%);
  box-shadow: none;
  border: 1px solid hsl(92, 50%, 8%);
}

@keyframes infinite-fade-pulse {
  0%, 100% {
    opacity: 0.92;
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    opacity: 0.38;
    transform: scale(0.91);
    filter: brightness(1.35) drop-shadow(0 0 18px rgba(239, 68, 68, 0.9));
  }
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.92);
    opacity: 0.65;
  }
}


.tictactoe-cell.vanishing .mark-3d {
  animation: piece-vanish 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes piece-vanish {
  0% {
    opacity: 0.85;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.35) translateY(-22px) rotate(20deg);
    filter: blur(8px);
  }
}


.theme-cyber {
  border-color: var(--secondary-accent);
  box-shadow: 0 0 25px rgba(174, 90, 45, 0.08), inset 0 0 20px rgba(0, 240, 255, 0.02);
}

.theme-cyber .tictactoe-grid-board {
  gap: 10px;
  background: rgba(6, 12, 26, 0.8);
  padding: 10px;
  border: 2px solid rgba(0, 240, 255, 0.45);
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 240, 255, 0.15);
  border-radius: 16px;
}

.theme-cyber .tictactoe-cell {
  background: rgba(14, 23, 44, 0.88);
  border: 2px solid rgba(0, 240, 255, 0.38);
  border-radius: 12px;
  box-shadow: inset 0 0 14px rgba(0, 240, 255, 0.06), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.theme-cyber .tictactoe-cell:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: rgba(0, 240, 255, 0.9);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.45), inset 0 0 14px rgba(0, 240, 255, 0.15);
}


.theme-cyber .tictactoe-cell.winner-cell {
  background: rgba(0, 240, 255, 0.12) !important;
  border-color: #00f0ff !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6), inset 0 0 15px rgba(0, 240, 255, 0.3) !important;
  animation: winning-pulse 1s infinite alternate ease-in-out;
}

.theme-cyber .tictactoe-cell.winner-cell .mark-3d svg {
  filter: drop-shadow(0 0 20px #00f0ff) drop-shadow(0 0 35px #00f0ff) !important;
}


.theme-cyber .winning-line {
  background: var(--success-color);
  box-shadow: 0 0 15px var(--success-color), 0 0 30px var(--success-color);
}


.theme-nokia {
  background-color: hsl(92, 38%, 48%) !important;
  border: 8px solid hsl(92, 20%, 20%) !important;
  color: hsl(92, 50%, 10%) !important;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.2), var(--shadow-md) !important;
}

.theme-nokia .tictactoe-status-bar {
  background: rgba(0, 0, 0, 0.08) !important;
  border-color: hsl(92, 50%, 15%) !important;
  color: hsl(92, 50%, 10%) !important;
  font-family: var(--font-mono);
  font-weight: 900;
}

.theme-nokia .tictactoe-grid-board {
  gap: 3px;
  background: hsl(92, 50%, 15%);
  padding: 3px;
  border-radius: 4px;
  border: 3px solid hsl(92, 50%, 15%);
}

.theme-nokia .tictactoe-cell {
  background: hsl(92, 38%, 48%);
  border-radius: 2px;
  color: hsl(92, 50%, 10%);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.2), inset -1px -1px 0 rgba(0,0,0,0.2);
}

.theme-nokia .tictactoe-cell:hover {
  background: hsl(92, 38%, 44%);
}

.theme-nokia .tictactoe-cell.winner-cell {
  background: hsl(92, 50%, 15%) !important;
  color: hsl(92, 38%, 48%) !important;
}


.theme-nokia .winning-line {
  background: hsl(92, 50%, 8%);
}



.winning-line {
  position: absolute;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}



.theme-nokia .screen-overlay {
  background: rgba(10, 24, 12, 0.92) !important;
}

.theme-nokia .arcade-overlay-panel {
  border-color: #22c55e !important;
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.35) !important;
}

.theme-nokia .arcade-title {
  color: #22c55e !important;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.6) !important;
}

.theme-nokia .arcade-start-btn {
  background: #22c55e !important;
  color: #0b0c16 !important;
  box-shadow: 0 4px 0 #15803d !important;
}



.move-log-box {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.move-log-list {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  overflow-y: auto;
  flex-grow: 1;
  max-height: 180px;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  border-bottom: 1px dashed var(--panel-border);
}

.log-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.log-num {
  font-weight: bold;
  color: var(--primary-accent);
  width: 30px;
}

.log-msg {
  flex-grow: 1;
  text-align: left;
}



@keyframes cell-place {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes winning-pulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.25); }
}

@keyframes fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}


@media (max-width: 1024px) {
  .mobile-settings-toggle {
    display: flex;
  }
  .game-body {
    overflow-x: hidden;
    height: 100vh;
    height: 100dvh;
  }
  .game-viewport {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: calc(100dvh - 56px);
    height: calc(100vh - 56px);
    overflow-y: auto;
    position: relative;
    padding: 6px 12px;
    gap: 8px;
    width: 100%;
  }
  .settings-sidebar {
    display: none;
  }
  .settings-sidebar.mobile-open {
    display: flex !important;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 20, 32, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99;
    padding: 24px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
  }
  .tictactoe-game-content-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    gap: 12px;
    align-items: center;
  }
  .gameplay-sidebar {
    order: -1;
    width: 100%;
    border: none;
    padding: 0;
    background: transparent;
  }
  .game-stats-hud {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    justify-content: space-between;
  }
  .hud-stat-box {
    padding: 6px 8px;
    flex: 1 1 calc(33.333% - 6px);
    min-width: 70px;
    text-align: center;
    border-radius: 8px;
    align-items: center;
  }
  .hud-stat-label {
    font-size: 9px;
  }
  .hud-stat-num {
    font-size: 18px;
  }
  .move-log-box {
    display: none;
  }
  .keyboard-legend {
    display: none;
  }
  .game-arena-container {
    padding: 0;
    width: 100%;
  }
  .tictactoe-frame-wrapper {
    padding: 16px 12px;
    width: 100%;
    max-width: 380px;
    gap: 12px;
    border-radius: 16px;
  }
  .tictactoe-status-bar {
    font-size: 13px;
    padding: 8px 12px;
  }
  .tictactoe-board-container {
    width: min(300px, 80vw);
    max-width: 320px;
    margin: 4px 0;
  }
  .tictactoe-cell {
    font-size: min(54px, 14vw);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}


.multiplayer-modal-panel {
  max-width: 440px;
  width: 92%;
  padding: 24px 20px;
  border-radius: 18px;
  background: rgba(13, 17, 28, 0.96);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15), 0 20px 50px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.theme-nokia .multiplayer-modal-panel {
  background: #9cad86;
  border: 3px solid #2d3b24;
  box-shadow: 0 0 20px rgba(45, 59, 36, 0.4);
  color: #2d3b24;
}

.multiplayer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-nokia .multiplayer-modal-header {
  border-bottom: 2px solid #2d3b24;
}

.modal-close-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close-icon:hover {
  background: rgba(255, 50, 50, 0.2);
  color: #ff4466;
  border-color: #ff4466;
}


.multiplayer-tab-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.multiplayer-tab-btn {
  padding: 8px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.multiplayer-tab-btn.active {
  background: rgba(0, 240, 255, 0.14);
  border-color: #00f0ff;
  color: #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
}

.theme-nokia .multiplayer-tab-btn {
  background: #8b9c75;
  border: 2px solid #2d3b24;
  color: #2d3b24;
}

.theme-nokia .multiplayer-tab-btn.active {
  background: #2d3b24;
  color: #9cad86;
}

.multiplayer-guide-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.theme-nokia .multiplayer-guide-text {
  color: #2d3b24;
  font-family: var(--font-mono);
}


.room-code-display-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.theme-nokia .room-code-display-box {
  background: #8b9c75;
  border: 2px solid #2d3b24;
}

.room-code-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.room-code-chars {
  font-family: 'VT323', var(--font-mono);
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #00f0ff;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
  user-select: all;
}

.theme-nokia .room-code-chars {
  color: #2d3b24;
  text-shadow: none;
}

.host-role-badge {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.12);
  color: #00f0ff;
  font-family: var(--font-mono);
  font-weight: 700;
}

.theme-nokia .host-role-badge {
  background: #2d3b24;
  color: #9cad86;
}


.qr-code-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.theme-nokia .qr-code-wrapper {
  background: #8b9c75;
  border: 2px solid #2d3b24;
}

#host-qr-canvas {
  border-radius: 8px;
  width: 170px;
  height: 170px;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
  image-rendering: pixelated;
}

.qr-code-hint {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.theme-nokia .qr-code-hint {
  color: #2d3b24;
}


.join-url-box {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.join-url-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  outline: none;
}

.copy-url-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00f0ff, #0080ff);
  border: none;
  color: #000;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.copy-url-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}

.copy-url-btn:active {
  transform: translateY(1px);
}


.host-waiting-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.04);
  border: 1px dashed rgba(0, 240, 255, 0.25);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #00f0ff;
}

.radar-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-top-color: #00f0ff;
  border-radius: 50%;
  animation: radar-spin 0.8s linear infinite;
}

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


.join-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.join-code-input {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  padding: 14px;
  color: #00f0ff;
  font-family: 'VT323', var(--font-mono);
  font-size: 36px;
  letter-spacing: 8px;
  text-align: center;
  outline: none;
  transition: var(--transition-smooth);
}

.join-code-input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.join-submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

.join-error-message {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 50, 50, 0.15);
  border: 1px solid #ff4466;
  color: #ff4466;
  font-size: 12px;
  font-family: var(--font-mono);
}


.online-rematch-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 380px;
  background: rgba(13, 17, 28, 0.95);
  border: 1px solid #00f0ff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 40;
  animation: banner-slide-down 0.3s ease;
}

@keyframes banner-slide-down {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.rematch-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #00f0ff;
}

.rematch-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.rematch-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: none;
}

.rematch-btn.accept {
  background: #00f0ff;
  color: #000;
}

.rematch-btn.decline {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}


.online-status-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.online-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffaa00;
  box-shadow: 0 0 8px #ffaa00;
}

.online-indicator-dot.connected {
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

.online-room-code-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 1px;
}

.online-role-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.leave-room-btn {
  background: rgba(255, 50, 50, 0.15) !important;
  border-color: rgba(255, 50, 50, 0.4) !important;
  color: #ff6688 !important;
}

.leave-room-btn:hover {
  background: rgba(255, 50, 50, 0.3) !important;
}


.player-name-input-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  text-align: left;
}

.player-name-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.player-name-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

.player-name-input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.theme-nokia .player-name-input {
  background: #8b9c75;
  border: 2px solid #2d3b24;
  color: #2d3b24;
}


.turn-timer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  font-size: 12px;
  font-family: var(--font-mono);
  margin-left: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.turn-timer-badge.timer-warning {
  background: rgba(255, 50, 50, 0.25);
  border-color: #ff4466;
  color: #ff4466;
  box-shadow: 0 0 10px rgba(255, 68, 102, 0.5);
  animation: timer-pulse 0.6s infinite alternate ease-in-out;
}

@keyframes timer-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.theme-nokia .turn-timer-badge {
  background: #2d3b24;
  color: #9cad86;
  border-color: #2d3b24;
}


.quick-match-cta-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.quick-match-btn {
  background: linear-gradient(135deg, #00f0ff, #0080ff);
  color: #000;
  font-weight: 800;
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 1px;
}

.quick-match-subtext {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.public-rooms-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-rooms-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-secondary);
  font-weight: 700;
}

.refresh-rooms-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.refresh-rooms-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border-color: #00f0ff;
}

.public-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.public-room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.public-room-card:hover {
  border-color: #00f0ff;
  background: rgba(0, 240, 255, 0.05);
}

.public-room-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.public-room-code {
  font-family: 'VT323', var(--font-mono);
  font-size: 20px;
  color: #00f0ff;
  letter-spacing: 2px;
}

.public-room-host {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.btn-join-public-room {
  background: #00f0ff;
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-join-public-room:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.no-rooms-msg {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  padding: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}


.online-reaction-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
  animation: fade-in 0.3s ease;
}

.theme-nokia .online-reaction-bar {
  background: #8b9c75;
  border: 2px solid #2d3b24;
}

.reaction-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-secondary);
  font-weight: 700;
}

.theme-nokia .reaction-label {
  color: #2d3b24;
}

.reaction-emojis {
  display: flex;
  gap: 6px;
}

.reaction-emoji-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 18px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  user-select: none;
}

.reaction-emoji-btn:hover {
  transform: scale(1.2);
  background: rgba(0, 240, 255, 0.15);
  border-color: #00f0ff;
}

.reaction-emoji-btn:active {
  transform: scale(0.9);
}

.theme-nokia .reaction-emoji-btn {
  background: #9cad86;
  border: 1px solid #2d3b24;
}


.floating-reactions-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 25;
}

.floating-emoji-item {
  position: absolute;
  font-size: 38px;
  animation: float-up-particle 1.8s ease-out forwards;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.8));
  pointer-events: none;
}

@keyframes float-up-particle {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.6);
  }
  20% {
    opacity: 1;
    transform: translateY(-20px) scale(1.2);
  }
  80% {
    opacity: 0.9;
    transform: translateY(-80px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-130px) scale(0.8);
  }
}


.rules-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.rule-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(var(--secondary-accent-rgb), 0.4);
  color: var(--text-primary);
}

.rule-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(0, 240, 255, 0.18));
  border-color: #a855f7;
  color: #fff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.rule-btn.active .rule-name {
  color: #c084fc;
}

.rule-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.rule-desc {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 3px;
  line-height: 1.3;
}


.hud-mode-pill.infinite-mode-pill {
  border-color: rgba(168, 85, 247, 0.45);
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.12);
}

.hud-mode-pill.infinite-mode-pill:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
  color: #fff;
}

.hud-mode-pill.infinite-mode-pill.active {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border-color: #c084fc;
  color: #fff;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.55);
}


.arc-btn.btn-purple {
  background: radial-gradient(circle at 35% 35%, #c084fc, #7e22ce);
  box-shadow: 0 4px 0 #581c87, 0 6px 8px rgba(0, 0, 0, 0.5);
}

.arc-btn.btn-purple:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #581c87, 0 2px 4px rgba(0, 0, 0, 0.5);
}

.arc-btn.btn-purple.active {
  box-shadow: 0 4px 0 #581c87, 0 0 18px rgba(192, 132, 252, 0.95);
  border: 1px solid #e9d5ff;
}


.intro-rule-chip {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #9faec6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.intro-rule-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.intro-rule-chip.active {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border-color: #c084fc;
  color: #fff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
}



