/* =========================================================
   WordSleuth / My Word Game — Shared Stylesheet
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
}

/* ── Navbar ── */
.navbar {
  background-color: #1a1a2e;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.navbar img {
  height: 46px;
  width: auto;
  display: block;
}

.navbar h1 {
  color: #fff;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Language switcher ── */
.lang-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.lang-switcher button {
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
  width: auto;
  margin: 0;
}

.lang-switcher button:hover,
.lang-switcher button.active {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}

/* ── Language blocks ── */
.lang-block { display: block; }
.lang-block.hidden { display: none; }

/* ── Container ── */
.container {
  padding: 24px 20px;
  max-width: 820px;
  margin: 0 auto;
}

.container--card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-top: 24px;
  margin-bottom: 24px;
}

/* ── Typography ── */
h1 { color: #1a1a2e; text-align: center; margin-top: 1.2rem; }
h2 { color: #1a1a2e; }
p  { font-size: 1rem; line-height: 1.7; }

/* ── Buttons shared ── */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  border: none;
  transition: filter 0.18s ease, transform 0.15s ease;
}

.btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn--blue    { background: #007BFF; }
.btn--red     { background: #e53935; }
.btn--green   { background: #14c44f; color: #000; }
.btn--yellow  { background: #fbc02d; color: #000; }
.btn--purple  { background: #6a1b9a; }

/* ── Button groups ── */
.button-container {
  text-align: center;
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ── Download badges ── */
.download-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: 36px 0 20px;
  text-align: center;
}

.download-grid h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.badge-img {
  width: 200px;
  height: auto;
  border-radius: 10px;
  transition: transform 0.2s;
}

.badge-img:hover { transform: scale(1.04); }

/* ── Forms ── */
form {
  max-width: 440px;
  margin: 24px auto;
}

input, textarea {
  width: 100%;
  padding: 11px 14px;
  margin: 8px 0;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  background: #fafafa;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #6a1b9a;
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

/* ── Submit button ── */
button[type="submit"] {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.18s, transform 0.15s;
}

button[type="submit"]:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ── Inline notifications (replaces alert()) ── */
.ws-notification {
  display: none;
  padding: 13px 18px;
  border-radius: 10px;
  margin: 14px auto;
  max-width: 440px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  animation: fadeIn 0.25s ease;
}

.ws-notification.success {
  display: block;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.ws-notification.error {
  display: block;
  background: #fdecea;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Loading state ── */
button[type="submit"].loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ── Legal sections ── */
.lang-section {
  text-align: left;
  background: #fafafa;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 14px 0;
}

.lang-section h2 { margin-top: 0; font-size: 1.15rem; }
.lang-section p  { margin-bottom: 12px; }

.note {
  max-width: 760px;
  margin: 20px auto 0;
  font-size: 0.875rem;
  color: #666;
  line-height: 1.7;
  text-align: left;
}

/* ── Footer ── */
footer {
  background-color: #1a1a2e;
  color: #ccc;
  text-align: center;
  padding: 18px 20px;
  margin-top: 40px;
  font-size: 0.875rem;
  line-height: 1.6;
}

footer a {
  color: #82b1ff;
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* ── Deleted confirmation ── */
.deleted-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .navbar { padding: 12px 14px; gap: 10px; }
  .navbar img { height: 36px; }
  .navbar h1 { font-size: 1.1rem; }

  .download-grid { gap: 24px; }
  .badge-img { width: 160px; }

  .container { padding: 16px 14px; }
  .container--card { padding: 16px 14px !important; }

  h1 { font-size: 1.3rem; }

  .btn { padding: 10px 16px; font-size: 14px; }

  .lang-section { padding: 14px; }

  form { max-width: 100%; }
}
