/* =============================================
   style.css — Shared styles for all pages
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --primary:      #4f46e5;
  --primary-dark: #3730a3;
  --primary-light:#eef2ff;
  --accent:       #f59e0b;
  --x-color:      #ef4444;
  --o-color:      #3b82f6;
  --text:         #1e1b4b;
  --text-muted:   #6b7280;
  --bg:           #f5f3ff;
  --card-bg:      #ffffff;
  --border:       #e0e7ff;
  --radius:       16px;
  --shadow:       0 4px 24px rgba(79, 70, 229, 0.12);
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Page Wrapper --- */
.page-wrapper {
  width: 100%;
  max-width: 480px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* --- Card --- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  width: 100%;
  border: 1px solid var(--border);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.2);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-secondary:hover {
  background: #e0e7ff;
}

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
}

.btn-danger:hover {
  background: #fecaca;
}

.btn-install {
  background: var(--accent);
  color: white;
  width: 100%;
  margin-top: 8px;
}

.btn-install:hover {
  background: #d97706;
}

/* --- Button Group --- */
.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

@media (min-width: 360px) {
  .btn-group {
    flex-direction: row;
  }
  .btn-group .btn {
    flex: 1;
  }
}

/* --- Page Header (game & leaderboard) --- */
.game-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.back-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.back-link:hover {
  text-decoration: underline;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

/* --- Fallback pages (offline / 404) --- */
.fallback-card {
  text-align: center;
  padding: 48px 28px;
}

.fallback-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.fallback-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.fallback-desc {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* --- Home-specific logo area --- */
.logo-area {
  text-align: center;
  margin-bottom: 20px;
}

.logo-symbol {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 2.8rem;
  margin-bottom: 10px;
  line-height: 1;
}

.x-sym {
  color: var(--x-color);
  font-weight: 900;
}

.o-sym {
  color: var(--o-color);
  font-weight: 900;
}

.app-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.description {
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* --- Footer note --- */
.footer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}
