/* ===========================================================
   WiNiAn School for Social Success — Shared Brand Stylesheet
   Used by: reserve.php, social-coach.php, ai-coach-login.php,
            proving-grounds-login.php, new-chapters-login.php,
            admin-login.php, admin.php
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Lora:wght@400;600;700&display=swap');

:root {
  --teal: #0EA39D;
  --teal-dark: #0B7F79;
  --navy: #10203D;
  --navy-2: #1B2E52;
  --cream: #FAF7F0;
  --ink: #1E2430;
  --muted: #5B6478;
  --line: #E4E8F0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

h1, h2, h3 { font-family: 'Lora', serif; color: var(--navy); margin: 0 0 12px 0; }

a { color: var(--teal-dark); text-decoration: none; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* -------- top bar (simple, consistent w/ main site) -------- */
.topbar {
  background: var(--navy);
  padding: 16px 0;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; }
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-brand img { width: 34px; height: 34px; border-radius: 8px; }
.topbar-brand span { font-family: 'Lora', serif; font-weight: 700; color: #fff; font-size: 13pt; }
.topbar a.back { color: #CFE9E7; font-size: 10pt; font-weight: 500; }
.topbar a.back:hover { color: #fff; }
.topbar-links { display: flex; align-items: center; gap: 20px; }

/* -------- page shell -------- */
.page {
  padding: 48px 0 80px 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 6px 24px rgba(16, 32, 61, 0.06);
}
.eyebrow {
  font-size: 9.5pt; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--teal-dark); font-weight: 600; margin-bottom: 8px;
}
.page-title { font-size: 22pt; margin-bottom: 6px; }
.page-sub { color: var(--muted); font-size: 11pt; margin-bottom: 28px; }

/* -------- forms -------- */
label {
  display: block; font-weight: 600; font-size: 9.5pt; color: var(--navy);
  margin-bottom: 6px; margin-top: 18px;
}
label:first-of-type { margin-top: 0; }
input[type="text"], input[type="number"], input[type="email"], input[type="tel"],
input[type="password"], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-family: 'Poppins', sans-serif; font-size: 10.5pt; color: var(--ink); background: #fff;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,163,157,0.15); }
.hint { font-size: 8.5pt; color: var(--muted); margin-top: 4px; }
.required { color: #C0392B; }

.btn {
  display: inline-block; margin-top: 26px; background: var(--teal);
  color: #fff; border: none; padding: 13px 28px; border-radius: 30px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 10.5pt;
  cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: var(--teal-dark); }
.btn-block { display: block; width: 100%; text-align: center; }

.notice {
  border-radius: 10px; padding: 14px 18px; font-size: 10pt; margin-bottom: 22px;
}
.notice-success { background: #E4F7F5; color: var(--teal-dark); border: 1px solid #B9E9E4; }
.notice-error { background: #FBEAEA; color: #A8332B; border: 1px solid #F1C6C2; }

.privacy-note {
  font-size: 8.5pt; color: var(--muted); margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--line);
}

footer.simple {
  text-align: center; padding: 28px 0; color: var(--muted); font-size: 8.5pt;
}

/* -------- Social Coach chatbot -------- */
.chat-window {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  height: 420px; overflow-y: auto; padding: 18px; margin-bottom: 16px;
}
.msg { margin-bottom: 16px; max-width: 85%; }
.msg-kid { margin-left: auto; }
.msg-bubble { padding: 11px 15px; border-radius: 14px; font-size: 10.5pt; line-height: 1.5; }
.msg-kid .msg-bubble { background: var(--teal); color: #fff; border-bottom-right-radius: 3px; }
.msg-coach .msg-bubble { background: #F0F3F8; color: var(--ink); border-bottom-left-radius: 3px; white-space: pre-wrap; }
.msg-label { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 4px; }
.chat-input-row { display: flex; gap: 10px; }
.chat-input-row textarea { flex: 1; min-height: 52px; }
.chat-input-row button { flex-shrink: 0; }

.welcome-banner {
  background: linear-gradient(120deg, #0B7F79, #0EA39D); color: #fff;
  border-radius: 14px; padding: 22px 26px; margin-bottom: 26px;
}
.welcome-banner h2 { color: #fff; font-size: 15pt; margin-bottom: 6px; }
.welcome-banner p { margin: 0; font-size: 10pt; color: #E3FBF9; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-top: 10px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.admin-table th { color: var(--navy); font-weight: 600; background: #F3F6FA; }

/* -------- The Proving Grounds (game hub) -------- */
.pg-hero {
  background: linear-gradient(120deg, #0B7F79, #0EA39D); color: #fff;
  border-radius: 16px; padding: 34px 32px; margin-bottom: 30px;
}
.pg-hero h1 { color: #fff; font-size: 21pt; margin-bottom: 10px; }
.pg-hero p { margin: 0; font-size: 10.5pt; color: #E3FBF9; max-width: 620px; }

.pg-game-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-bottom: 10px;
}
.pg-game-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; text-align: center; text-decoration: none; color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pg-game-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16,32,61,0.1); }
.pg-game-icon { font-size: 30pt; margin-bottom: 10px; }
.pg-game-card h3 { font-size: 13.5pt; margin-bottom: 6px; }
.pg-game-card p { font-size: 9pt; color: var(--muted); margin: 0; }
.pg-game-card .btn { margin-top: 16px; }

/* -------- individual game page -------- */
.pg-title-banner {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(120deg, #10203D, #1B2E52);
  border-radius: 16px 16px 0 0; padding: 18px 24px;
}
.pg-title-icon {
  font-size: 26pt; width: 56px; height: 56px; flex-shrink: 0;
  background: rgba(255,255,255,0.1); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.pg-title-name { color: #fff; font-family: 'Lora', serif; font-weight: 700; font-size: 16.5pt; }
.pg-title-tag { color: #B9C6E3; font-size: 9.5pt; margin-top: 2px; }

.pg-game-frame {
  background: #0D1830; border-radius: 16px; padding: 0 0 18px 0;
  box-shadow: 0 18px 40px rgba(16,32,61,0.22); margin-bottom: 26px; overflow: hidden;
}

.pg-meter-row {
  display: flex; align-items: center; gap: 14px; margin: 18px 24px 16px 24px;
}
.pg-meter-title { font-size: 9pt; font-weight: 600; color: #CFE9E7; white-space: nowrap; }
.pg-meter-bar {
  flex: 1; height: 16px; background: rgba(255,255,255,0.12); border-radius: 10px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.pg-meter-fill {
  height: 100%; width: 50%; background: linear-gradient(90deg,#3FD6A6,#1FAE7A);
  transition: width .3s ease, background .3s ease; border-radius: 10px;
}
.pg-meter-label { font-size: 10pt; font-weight: 700; white-space: nowrap; min-width: 58px; text-align: right; color: #fff; }

.pg-canvas-wrap { position: relative; display: block; margin: 0 24px; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
#gameCanvas { display: block; width: 100%; height: auto; background: #DCEFE9; }

.pg-howto {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 24px; margin-bottom: 22px;
}
.pg-howto h3 { font-size: 12.5pt; margin-bottom: 12px; }
.pg-howto ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pg-howto li { display: flex; align-items: flex-start; gap: 10px; font-size: 9.5pt; color: var(--muted); line-height: 1.45; }
.pg-howto li .pg-howto-icon { font-size: 13pt; flex-shrink: 0; width: 22px; text-align: center; }
.pg-howto li strong { color: var(--navy); }

.pg-dialogue {
  position: absolute; left: 0; right: 0; bottom: 0; background: rgba(16,32,61,0.94);
  padding: 18px 22px; color: #fff;
}
.pg-dialogue.hidden { display: none; }
.pg-speaker-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pg-speaker-avatar { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); flex-shrink: 0; }
.pg-speaker { font-size: 8.5pt; text-transform: uppercase; letter-spacing: 1px; color: #8FE3DE; font-weight: 700; }
.pg-line { font-size: 11.5pt; margin-bottom: 14px; line-height: 1.4; }
.pg-choices { display: flex; flex-direction: column; gap: 8px; }
.pg-choice-btn {
  text-align: left; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; padding: 10px 14px; border-radius: 8px; font-family: 'Poppins', sans-serif;
  font-size: 10pt; cursor: pointer; transition: background .12s ease;
}
.pg-choice-btn:hover { background: rgba(255,255,255,0.2); }
.pg-choice-btn.pg-continue { background: #0EA39D; border-color: #0EA39D; font-weight: 600; }
.pg-choice-btn.pg-continue:hover { background: #0B7F79; }
.pg-feedback { margin-top: 4px; margin-bottom: 12px; }
.pg-feedback.hidden { display: none; }
.pg-feedback-score { font-size: 9.5pt; font-weight: 700; color: #8FE3DE; margin-bottom: 4px; }
.pg-feedback-text { font-size: 10pt; line-height: 1.4; color: #E3E9F7; }
