* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: white;
  background:
    radial-gradient(circle at 20% 30%, #132b63, transparent 35%),
    linear-gradient(135deg, #030817, #071733 60%, #020611);
  padding: 18px;
}

.page {
  min-height: calc(100vh - 36px);
  border: 1px solid rgba(80, 120, 190, 0.35);
  border-radius: 18px;
  background: rgba(3, 10, 28, 0.78);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.navbar {
  height: 96px;
  padding: 0 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 24, 55, 0.88);
  border-bottom: 1px solid rgba(80, 120, 190, 0.18);
}

.logo,
.hero h1 {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #e51b23;
  text-decoration: none;
}

.logo {
  font-size: 42px;
}

.logo span,
.hero h1 span {
  color: white;
}

.navbar nav {
  display: flex;
  gap: 44px;
}

.navbar nav a {
  color: white;
  text-decoration: none;
  font-size: 18px;
}

.navbar nav a:hover {
  color: #ff2a33;
}

/* HOME */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  padding: 80px 120px 40px;
  align-items: center;
}

.hero-content h1 {
  font-size: 120px;
  line-height: 1;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.hero-content h2 {
  font-size: 30px;
  margin-bottom: 30px;
}

.hero-content p {
  color: #c5ccdc;
  font-size: 22px;
  line-height: 1.5;
  margin-bottom: 42px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 230px;
  padding: 18px 28px;
  border-radius: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.btn-red {
  background: linear-gradient(180deg, #ff3138, #d70f17);
  color: white;
  box-shadow: 0 0 25px rgba(255, 35, 45, 0.35);
}

/* AUTH */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
}

.auth-card {
  width: 100%;
  max-width: 500px;
  background: rgba(5, 15, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group input {
  height: 50px;
  padding: 0 15px;
  border: none;
  border-radius: 10px;
  background: #0d1b3d;
  color: white;
}

.btn-primary {
  width: 100%;
  height: 55px;
  border: none;
  border-radius: 10px;
  background: #ff1e2d;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.auth-link,
#login-message,
#register-message {
  margin-top: 20px;
  text-align: center;
}

.auth-link a {
  color: #ff1e2d;
  text-decoration: none;
}

/* GAME */

.game-page {
  max-width: 1150px;
  margin: 0 auto;
  padding: 70px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 90px;
}

.game-panel {
  width: 330px;
  flex-shrink: 0;
  background: rgba(5, 15, 40, 0.75);
  border: 1px solid rgba(80, 120, 190, 0.35);
  border-radius: 20px;
  padding: 30px;
}

.game-panel h1 {
  color: #ff1e2d;
  font-size: 38px;
  margin-bottom: 20px;
}

.game-panel p {
  color: #c5ccdc;
  line-height: 1.6;
  margin-bottom: 25px;
}

.difficulty-box {
  margin-bottom: 28px;
}

.difficulty-box label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.difficulty-box select {
  width: 100%;
  height: 50px;
  border-radius: 10px;
  border: 1px solid #4268c8;
  background: #0d1b3d;
  color: white;
  padding: 0 15px;
}

.game-panel ul {
  list-style: none;
  margin-bottom: 30px;
}

.game-panel li {
  margin-bottom: 12px;
  color: white;
}

.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 8px;
}

.dot.correct {
  background: #198a3d;
}
.dot.present {
  background: #d99b16;
}
.dot.wrong {
  background: #17305f;
}

.game-panel .btn {
  width: 100%;
}

.game-container {
  width: 440px;
  margin: 0;
  padding: 0;
  text-align: center;
}

.game-header {
  margin-bottom: 28px;
}

.game-header h2 {
  font-size: 28px;
  margin-bottom: 6px;
}

.game-header p {
  color: #c5ccdc;
}

.motus-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.motus-row {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.motus-cell {
  width: 72px;
  height: 72px;
  border: 2px solid #29406d;
  border-radius: 8px;
  background: rgba(8, 19, 45, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 34px;
  font-weight: 900;
  color: white;
  text-transform: uppercase;
}

.guess-form {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.guess-form input {
  width: 240px;
  height: 55px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: #0d1b3d;
  color: white;
  font-size: 22px;
  text-align: center;
  text-transform: uppercase;
}

.guess-form .btn-primary {
  width: auto;
  padding: 0 32px;
}

.cell-correct {
  background: #198a3d;
  border-color: #29b957;
}

.cell-present {
  background: #d99b16;
  border-color: #ffc735;
}

.cell-wrong {
  background: #17305f;
  border-color: #29406d;
}

.correct {
  background: #198a3d;
  border-color: #29b957;
}

.present {
  background: #d99b16;
  border-color: #ffc735;
}

.wrong {
  background: #17305f;
  border-color: #29406d;
}

.btn-outline {
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border: 1px solid #4268c8;
  color: white;
}

.btn-outline:hover {
  background: rgba(66, 104, 200, 0.2);
}

/* RESPONSIVE */

@media (max-width: 1024px) {
  .navbar {
    padding: 0 35px;
  }

  .navbar nav {
    gap: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 60px 50px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 90px;
  }

  .game-page {
    flex-direction: column;
    gap: 40px;
    padding: 50px 30px;
  }

  .game-panel,
  .game-container {
    width: 100%;
    max-width: 520px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .page {
    min-height: calc(100vh - 20px);
    border-radius: 14px;
  }

  .navbar {
    height: auto;
    padding: 24px 20px;
    flex-direction: column;
    gap: 18px;
  }

  .logo {
    font-size: 36px;
  }

  .navbar nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 22px;
  }

  .navbar nav a {
    font-size: 15px;
  }

  .hero {
    padding: 45px 22px;
    gap: 35px;
  }

  .hero-content h1 {
    font-size: 64px;
  }

  .hero-content h2 {
    font-size: 24px;
  }

  .hero-content p {
    font-size: 18px;
  }

  .auth-container {
    padding: 45px 16px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .game-page {
    padding: 35px 16px;
  }

  .game-panel {
    padding: 24px;
  }

  .game-panel h1 {
    font-size: 32px;
  }

  .game-container {
    max-width: 100%;
  }

  .motus-grid {
    gap: 8px;
  }

  .motus-row {
    gap: 8px;
  }

  .motus-cell {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  .guess-form {
    flex-direction: column;
    align-items: stretch;
  }

  .guess-form input,
  .guess-form .btn-primary {
    width: 100%;
  }

  .btn {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 420px) {
  .hero-content h1 {
    font-size: 50px;
  }

  .motus-cell {
    width: 46px;
    height: 46px;
    font-size: 23px;
  }

  .motus-row {
    gap: 6px;
  }

  .motus-grid {
    gap: 6px;
  }

  .game-header h2 {
    font-size: 24px;
  }

  .game-panel h1 {
    font-size: 28px;
  }
}
