/* Matariki Games - Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg-primary: #060613;
  --bg-secondary: #0c0c24;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.2);
  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --text-dim: #5a5a70;
  --star-color: #fff8e7;
  --star-glow: rgba(255, 248, 231, 0.5);
  --accent-blue: #4fc3f7;
  --accent-purple: #9c6eff;
  --accent-gold: #ffb74d;
  --accent-teal: #4dd0e1;
  --accent-pink: #f48fb1;
  --success: #66bb6a;
  --error: #ef5350;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-purple);
}

/* ==================== */
/* Background Star Field */
/* ==================== */

.star-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  animation: twinkle var(--tw-dur, 3s) ease-in-out infinite var(--tw-delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.3); }
}

/* Subtle nebula gradient overlay */
.star-field::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(100, 50, 180, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(50, 100, 200, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(180, 80, 100, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* ==================== */
/* Layout               */
/* ==================== */

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== */
/* Header / Navigation  */
/* ==================== */

.site-header {
  padding: 20px 0;
  position: relative;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  transition: all 0.25s;
}

.back-link:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.header-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==================== */
/* Landing Page         */
/* ==================== */

.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff8e7 0%, #ffb74d 40%, #f48fb1 70%, #9c6eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  animation: heroGlow 4s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.15); }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 12px;
  font-weight: 300;
}

.hero-description {
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
}

/* ==================== */
/* Game Cards Grid      */
/* ==================== */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 20px 0 60px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 36px 28px;
  backdrop-filter: blur(12px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
}

.game-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.game-card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.card-number {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.card-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-gold);
  transition: gap 0.25s;
}

.game-card:hover .card-play {
  gap: 12px;
}

.card-play svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s;
}

.game-card:hover .card-play svg {
  transform: translateX(2px);
}

/* Card accent colors */
.game-card[data-game="match"] .card-title { color: var(--accent-gold); }
.game-card[data-game="simon"] .card-title { color: var(--accent-purple); }
.game-card[data-game="reaction"] .card-title { color: var(--accent-teal); }

/* ==================== */
/* Star Cluster         */
/* ==================== */

.cluster-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.star {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: all 0.3s ease;
}

/* Invisible large click/touch helper boundary */
.star::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
}

.star-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Spikes / Lens flares */
.spike {
  position: absolute;
  top: 50%;
  left: 50%;
  background: linear-gradient(90deg, transparent, #ffffff 50%, transparent);
  pointer-events: none;
  z-index: 1;
  transform-origin: center;
  transition: all 0.3s ease;
}

.spike-h {
  width: 320%;
  height: 1px;
  transform: translate(-50%, -50%) scale(var(--spike-scale, 1));
}

.spike-v {
  width: 320%;
  height: 1px;
  transform: translate(-50%, -50%) rotate(90deg) scale(var(--spike-scale, 1));
}

.spike-d1 {
  width: 180%;
  height: 1px;
  opacity: 0.65;
  transform: translate(-50%, -50%) rotate(45deg) scale(var(--spike-scale, 1));
}

.spike-d2 {
  width: 180%;
  height: 1px;
  opacity: 0.65;
  transform: translate(-50%, -50%) rotate(135deg) scale(var(--spike-scale, 1));
}

/* Star Core point */
.star-core {
  width: var(--core-size, 4px);
  height: var(--core-size, 4px);
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 6px 2px #ffffff,
    0 0 14px 6px var(--star-glow),
    0 0 30px 10px rgba(255, 255, 255, 0.15);
  z-index: 2;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects */
.star:hover .star-core {
  transform: scale(1.3);
  box-shadow:
    0 0 8px 3px #ffffff,
    0 0 20px 8px var(--star-glow),
    0 0 45px 16px rgba(255, 255, 255, 0.25);
}

.star:hover .spike {
  filter: brightness(1.2);
}

/* Star flash effect (for Simon/Reaction games) */
.star-flash .star-core {
  background: #ffffff;
  box-shadow:
    0 0 10px 4px #ffffff,
    0 0 25px 12px var(--flash-color, #ffd54f),
    0 0 60px 24px var(--flash-color, rgba(255, 213, 79, 0.6)),
    0 0 100px 40px var(--flash-color, rgba(255, 213, 79, 0.3));
  transform: scale(1.4);
}

.star-flash .spike {
  background: linear-gradient(90deg, transparent, #ffffff 40%, var(--flash-color, #ffd54f) 50%, #ffffff 60%, transparent);
  height: 2px;
  filter: brightness(1.4);
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) scale(calc(var(--spike-scale, 1) * 1.4));
}
.star-flash .spike-v {
  transform: translate(-50%, -50%) rotate(90deg) scale(calc(var(--spike-scale, 1) * 1.4));
}
.star-flash .spike-d1 {
  transform: translate(-50%, -50%) rotate(45deg) scale(calc(var(--spike-scale, 1) * 1.4));
}
.star-flash .spike-d2 {
  transform: translate(-50%, -50%) rotate(135deg) scale(calc(var(--spike-scale, 1) * 1.4));
}

/* Star matched/correct effect */
.star-matched .star-core {
  background: #ffffff;
  box-shadow:
    0 0 8px 3px #ffffff,
    0 0 22px 8px var(--flash-color, #66bb6a),
    0 0 50px 18px var(--flash-color, rgba(102, 187, 106, 0.4));
}

.star-matched .spike {
  background: linear-gradient(90deg, transparent, #ffffff 40%, var(--flash-color, #66bb6a) 50%, #ffffff 60%, transparent);
}

/* Star label */
.star-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.star:hover .star-label,
.star-matched .star-label {
  opacity: 1;
}

.star-label.visible {
  opacity: 1;
  color: var(--text-primary);
  font-weight: 600;
}

/* Drop zone indicator */
.star.drop-target {
  animation: dropPulse 0.6s ease-in-out infinite;
}

@keyframes dropPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

.star.drop-hover .star-inner {
  box-shadow:
    0 0 15px 6px rgba(255, 255, 255, 0.4),
    0 0 40px 12px rgba(255, 255, 255, 0.2);
}

/* ==================== */
/* Name Tags (Match)    */
/* ==================== */

.name-tags-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
}

.name-tags-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.name-tag {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: all 0.25s;
  backdrop-filter: blur(8px);
}

.name-tag:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateX(4px);
}

.name-tag:active {
  cursor: grabbing;
}

.name-tag.selected {
  background: rgba(255, 183, 77, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(255, 183, 77, 0.1);
}

.name-tag.matched {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.95);
}

.name-tag.wrong {
  animation: shakeTag 0.4s ease-in-out;
  border-color: var(--error);
}

@keyframes shakeTag {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* Dragging ghost */
.name-tag-ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  padding: 10px 18px;
  background: rgba(255, 183, 77, 0.2);
  border: 1px solid var(--accent-gold);
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-gold);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%) scale(1.05);
  transition: opacity 0.15s;
}

/* Placed name label on star */
.star-placed-name {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(102, 187, 106, 0.2);
  color: var(--success);
  border: 1px solid rgba(102, 187, 106, 0.3);
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==================== */
/* Game Layout          */
/* ==================== */

.game-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 40px;
}

.game-main {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.game-cluster-wrap {
  flex: 1;
  min-width: 0;
}

.game-sidebar {
  width: 240px;
  flex-shrink: 0;
}

/* ==================== */
/* Game UI Elements     */
/* ==================== */

.game-status {
  text-align: center;
  margin-bottom: 20px;
}

.game-title-small {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.game-instruction {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 16px 0;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.status-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.status-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #ff8f00 100%);
  color: #1a1a2e;
  box-shadow: 0 4px 20px rgba(255, 183, 77, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 183, 77, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-large {
  padding: 18px 48px;
  font-size: 1.15rem;
  border-radius: 16px;
}

/* ==================== */
/* Timer Display        */
/* ==================== */

.timer-display {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 20px 0;
}

.timer-label {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.best-time {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.best-time span {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ==================== */
/* Messages             */
/* ==================== */

.message-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 19, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

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

.message-box {
  text-align: center;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  max-width: 440px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-overlay.active .message-box {
  transform: scale(1);
}

.message-emoji {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.message-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.message-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ==================== */
/* Celebration Effects  */
/* ==================== */

@keyframes celebratePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.25); }
}

.star-celebrate .star-inner {
  animation: celebratePulse 0.8s ease-in-out infinite;
}

.star-celebrate .star-inner {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--flash-color, #ffd54f) 30%, transparent 100%);
  box-shadow:
    0 0 20px 8px var(--flash-color, rgba(255, 213, 79, 0.6)),
    0 0 50px 16px var(--flash-color, rgba(255, 213, 79, 0.3)),
    0 0 100px 40px var(--flash-color, rgba(255, 213, 79, 0.15));
}

/* Fireworks canvas */
.fireworks-canvas {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

/* ==================== */
/* Simon Game Specific  */
/* ==================== */

.simon-status {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-secondary);
  min-height: 2em;
  margin: 10px 0;
  transition: color 0.3s;
}

.simon-status.watching {
  color: var(--accent-gold);
}

.simon-status.playing {
  color: var(--accent-teal);
}

.simon-status.wrong {
  color: var(--error);
}

/* ==================== */
/* Reaction Specific    */
/* ==================== */

.reaction-message {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  min-height: 1.5em;
  margin: 10px 0;
  transition: color 0.3s;
}

.reaction-message.waiting {
  color: var(--text-dim);
}

.reaction-message.ready {
  color: var(--accent-gold);
  animation: pulse 1s ease-in-out infinite;
}

.reaction-message.too-early {
  color: var(--error);
}

.reaction-message.result {
  color: var(--accent-teal);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Results list */
.results-list {
  list-style: none;
  max-width: 320px;
  margin: 16px auto;
}

.results-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.results-list li:last-child {
  border-bottom: none;
}

.results-list .round-num {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.results-list .round-time {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--accent-teal);
}

.results-list .round-time.best {
  color: var(--accent-gold);
}

/* ==================== */
/* Progress Bar         */
/* ==================== */

.progress-bar-wrap {
  width: 100%;
  max-width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin: 12px auto;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink));
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ==================== */
/* Footer               */
/* ==================== */

.site-footer {
  text-align: center;
  padding: 30px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ==================== */
/* Responsive           */
/* ==================== */

@media (max-width: 768px) {
  .hero {
    padding: 40px 0 24px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 12px 0 40px;
  }

  .game-card {
    padding: 28px 22px;
  }

  .game-main {
    flex-direction: column;
    align-items: center;
  }

  .game-sidebar {
    width: 100%;
  }

  .name-tags-panel {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px;
  }

  .name-tag {
    font-size: 0.85rem;
    padding: 8px 14px;
  }

  .cluster-container {
    max-width: 350px;
  }

  .status-bar {
    gap: 16px;
    padding: 10px 16px;
  }

  .timer-display {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .cluster-container {
    max-width: 280px;
  }

  .game-title-small {
    font-size: 1.2rem;
  }

  .message-box {
    padding: 32px 24px;
  }

  .btn-large {
    padding: 14px 36px;
    font-size: 1rem;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .name-tag:hover {
    transform: none;
    background: var(--bg-card);
    border-color: var(--border-subtle);
  }
  
  .game-card:hover {
    transform: none;
  }
}
