
:root {
  --bg: #fdfcf7;
  --card-bg: #ffffff;
  --accent: #ff7a59;
  --accent-soft: #ffe3d8;
  --text: #222222;
  --muted: #666666;
  --border: #ddd;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header h1 {
  font-family: "Comic Sans MS", "Comic Neue", system-ui;
  font-size: 1.6rem;
  margin: 0;
}

#user-info {
  font-size: 0.9rem;
  color: var(--muted);
}

main {
  flex: 1;
  padding: 16px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.footer {
  padding: 12px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.card h2 {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.95rem;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.05s ease, background 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

button.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

button.small {
  padding: 6px 10px;
  font-size: 0.8rem;
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.doodle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.doodle-grid img {
  width: 100%;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--accent-soft);
  object-fit: contain;
}

.doodle-grid .doodle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.letters {
  font-family: "Courier New", monospace;
  letter-spacing: 4px;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.guess-box {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.guess-box input {
  flex: 1;
}

.hints {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

#guess-status {
  min-height: 1.2em;
  font-size: 0.9rem;
}

#score-display {
  font-weight: 600;
}

.hidden {
  display: none;
}

#auth-section {
  display: flex;
  justify-content: center;
}

.auth-card {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.auth-note {
  margin: 8px 0 0;
  color: var(--muted);
}

.auth-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-note a:hover {
  text-decoration: underline;
}

#stats-card ul,
#leaderboard-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#leaderboard-card li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 600px) {
  main { padding: 12px; }
  .card { padding: 12px; }
  .guess-box { flex-direction: column; }
}
