/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #1a1a2e;
  color: #ffffff;
  overflow: hidden;
}

/* 6. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}

/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}

/* Alpine.js cloak */
[x-cloak] {
  display: none !important;
}

/* Hide header on landing page */
header {
  display: none;
}

/* Main Content */
main {
  padding: 0;
}

/* Game Container */
.game-container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.game-title {
  font-size: 4rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
  letter-spacing: -1px;
}

.nickname-input {
  padding: 0.875rem 1.5rem;
  font-size: 1.25rem;
  color: #ffffff;
  background: #16213e;
  border: 2px solid #0f3460;
  border-radius: 8px;
  text-align: center;
  outline: none;
  width: 100%;
  max-width: 300px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nickname-input::placeholder {
  color: #6b7280;
}

.nickname-input:focus {
  border-color: #3b82f6;
  background: #1e293b;
}

.play-btn {
  padding: 1rem 3rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff;
  background: #3b82f6;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.play-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

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

.footer-content {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  text-align: center;
  backdrop-filter: blur(10px);
  font-size: 0.875rem;
  color: #9ca3af;
}

/* Game Screen */
.game-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #1a1a2e;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: #16213e;
  border-bottom: 2px solid #0f3460;
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.player-nickname {
  font-size: 1.25rem;
  font-weight: bold;
  color: #ffffff;
}

.player-status {
  font-size: 0.875rem;
  color: #fbbf24;
}

.game-stats {
  display: flex;
  gap: 2rem;
}

.stat {
  font-size: 1rem;
  color: #9ca3af;
}

.stat span {
  font-weight: bold;
  color: #3b82f6;
}

.game-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 2rem;
}

.game-subtitle {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.click-btn {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: 8px solid #1e40af;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.click-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.6);
}

.click-btn:active {
  transform: scale(0.95);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.click-count {
  font-size: 4rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .game-title {
    font-size: 2.5rem;
  }
  
  .nickname-input {
    font-size: 1.125rem;
    padding: 0.75rem 1.25rem;
    max-width: 250px;
  }
  
  .play-btn {
    padding: 0.875rem 2.5rem;
    font-size: 1.25rem;
  }
  
  .game-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .game-stats {
    gap: 1rem;
  }
  
  .game-subtitle {
    font-size: 1.75rem;
  }
  
  .click-btn {
    width: 200px;
    height: 200px;
  }
  
  .click-count {
    font-size: 3rem;
  }
}