/* base.css */

* {
  box-sizing: border-box;
  font-family: 'Chewy', cursive;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url('assets/Emojis.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.app-icon {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 3px rgba(255,255,255,0.18);
  margin-bottom: 16px;
  animation: iconPop 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes iconPop {
  from { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);     opacity: 1; }
}
.tagline {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: rgba(255,255,255,0.82);
  letter-spacing: 1px;
  margin: 4px 0 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  animation: fadeUp 0.6s 0.25s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1 {
  font-weight: 500;
  font-size: clamp(2rem, 8vw, 5rem);
  margin: 0;
}

h2 {
  font-size: clamp(1.2rem, 5vw, 2rem);
}

p {
  font-size: clamp(1rem, 3vw, 1.5rem);
}

button {
  padding: clamp(8px, 2vw, 10px) clamp(16px, 3vw, 20px);
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#back-btn {
  background-color: gray;
}

#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

#playerName {
  padding: clamp(8px, 2vw, 10px);
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  margin: clamp(15px, 3vw, 20px);
  border: 2px solid #4CAF50;
  border-radius: 5px;
  text-align: center;
  width: min(90%, 300px);
}

/* Bottom Navbar */
.bottom-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(46, 46, 46, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.247);
  border-radius: 16px;
  padding: 10px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  gap: 8px;
  z-index: 1000;
}

.bottom-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: clamp(0.96rem, 2.5vw, 1.1rem);
  padding: 8px 18px;
  border-radius: 12px;
  transition: all 0.25s ease;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.bottom-nav a:hover {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.18);
}

.bottom-nav a.active {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(176, 176, 176, 0.256);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .bottom-nav {
    bottom: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 12px 8px;
    border-bottom: none;
  }

  .bottom-nav a {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
}

.easy { background: rgba(21, 151, 99, 0.55) }
.medium { background: rgba(200, 107, 15, 0.578)  }
.hard { background: rgba(207, 40, 40, 0.55) }


/* Responsive Design */
@media (max-width: 768px) {
  body {
    background-attachment: fixed;
    padding: 1rem;
  }

  #home {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  button {
    padding: 8px 12px;
    font-size: 1rem;
    width: 90%;
  }

  #playerName {
    width: 100%;
    font-size: 1rem;
    margin: 15px 0;
  }
}

.spinner-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid rgba(255, 255, 255, 0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  letter-spacing: 0.5px;
}

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