@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;800&display=swap");

:root {
  --pink: #ff78b2;
  --pink-dark: #e25595;
  --purple: #9b7bff;
  --text: #3b2d52;
  --muted: #7d6f92;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 45px rgba(110, 74, 146, 0.14);
  --blue: #5c7cfa;
  --success: #22a06b;
  --danger: #e5484d;
  --bg1: #fff8fc;
  --bg2: #f7f0ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(255, 203, 227, 0.6), transparent 26%),
    radial-gradient(circle at bottom left, rgba(209, 216, 255, 0.85), transparent 34%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px 16px;
}

.topbar {
  width: min(100%, 520px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.back-link,
.brand {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(110, 74, 146, 0.12);
  font-weight: 800;
  text-decoration: none;
}

.back-link {
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
}

.brand {
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

h1 {
  font-size: clamp(26px, 5vw, 38px);
  margin-bottom: 18px;
  color: var(--text);
  text-align: center;
  font-weight: 800;
}

.container {
  width: min(100%, 520px);
  text-align: center;
  padding: 28px 22px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.how-to-play {
  text-align: right;
  background: #f9f5ff;
  border: 1px solid #eadffd;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: var(--text);
}

.how-to-play h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--pink-dark);
}

.how-to-play p {
  margin: 0 0 8px;
  line-height: 1.8;
  font-size: 14px;
}

.how-to-play ul {
  margin: 0;
  padding-right: 18px;
  line-height: 1.9;
  font-size: 14px;
}

.how-to-play li {
  margin-bottom: 4px;
}
.heading {
  font-size: 22px;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 18px;
}

.guess {
  min-height: 34px;
  color: var(--blue);
  font-size: 18px;
  margin: 14px 0 10px;
  font-weight: 700;
}

.chances {
  color: var(--text);
  font-size: 16px;
  margin-top: 12px;
  font-weight: 700;
}

.chance {
  color: var(--pink-dark);
  font-weight: 800;
}

.container input {
  font-size: 20px;
  padding: 0 18px;
  text-align: center;
  width: 100%;
  height: 56px;
  margin: 12px 0;
  border: 2px solid #d7c8f1;
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: #fff;
  transition: 0.2s ease;
}

.container input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 120, 178, 0.14);
}

input:disabled {
  cursor: not-allowed;
  background: #f4f1fa;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.checkBtn {
  font-size: 18px;
  margin-top: 8px;
  padding: 12px 28px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  min-width: 160px;
  box-shadow: 0 10px 22px rgba(155, 123, 255, 0.2);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.checkBtn:hover {
  filter: brightness(1.04);
}

.checkBtn:active {
  transform: scale(0.96);
}

@media (max-width: 600px) {
  .topbar {
    margin-bottom: 16px;
  }

  .back-link,
  .brand {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .container {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .heading {
    font-size: 19px;
  }

  .guess {
    font-size: 16px;
  }

  .checkBtn {
    width: 100%;
  }
}