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

body {
  font-family: "Poppins", sans-serif;
  color: #f0f0f0;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #2c3e50 50%, #34495e 75%, #1e3c72 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 15px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(103, 126, 234, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

h1:hover {
  transform: scale(1.05);
}

.board {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  width: clamp(280px, 75vw, 420px);
  height: clamp(280px, 75vw, 420px);
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  border-radius: 20px;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  gap: 8px;
  padding: 8px;
  transition: transform 0.3s ease;
}

.board:hover {
  transform: translateY(-3px);
}

.cell {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cell:hover {
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.4);
  transform: scale(1.05);
  color: #00d4ff;
}

.cell:not(:nth-child(3n)) {
  border-right: none;
}

.cell:nth-child(-n + 6):not(:nth-child(n + 7)) {
  border-bottom: none;
}

#status {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin-bottom: 1.2rem;
  font-weight: 600;
  color: #00d4ff;
  min-height: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
  transition: transform 0.3s ease;
}

#status:hover {
  transform: scale(1.05);
}

#resetBtn {
  padding: 12px 24px;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  cursor: pointer;
  background: rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #ffffff;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.2);
}

#resetBtn:hover {
  background: rgba(0, 212, 255, 0.3);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

#loader {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: #00d4ff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 1.5rem auto;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

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

.hidden {
  display: none;
}

/* Copyright automatically updates each year */
.footer {
  position: fixed;
  bottom: 10px;
  right: 15px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  z-index: 1000;
}

.footer:hover {
  color: rgba(255, 255, 255, 0.9);
}

.designer-link {
  color: #00d4ff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.designer-link:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
  border-bottom: 1px solid #00d4ff;
  transform: translateY(-1px);
}
