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

:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --surface-2: #22222f;
  --border: #2e2e42;
  --header-bg: rgba(15, 15, 19, 0.85);
  --accent: #7c6af7;
  --accent-glow: rgba(124, 106, 247, 0.25);
  --accent-2: #f76ac8;
  --text: #f0f0f8;
  --text-muted: #8888aa;
  --radius: 14px;
  --header-height: 68px;
}

[data-theme="light"] {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #e5e5f0;
  --border: #d0d0e0;
  --header-bg: rgba(242, 242, 247, 0.88);
  --text: #12121a;
  --text-muted: #66668a;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.25s, color 0.25s;
}

/* ── Theme Toggle ── */
.theme-toggle {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  background: var(--surface-2);
}

/* ── Header ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.tab {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 7px 18px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.tab.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border);
}

/* ── Main ── */
main {
  margin-top: var(--header-height);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Tab Content ── */
.tab-content {
  display: none;
  flex: 1;
  flex-direction: column;
}

.tab-content.active {
  display: flex;
}

/* ── Gospel Trivia Tab ── */
.game-header {
  text-align: center;
  padding: 40px 24px 28px;
}

.game-header h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.game-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

.game-frame-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 24px 40px;
}

.game-frame-wrapper iframe {
  width: 390px;
  height: 700px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #001436;
  box-shadow: 0 0 60px var(--accent-glow), 0 20px 60px rgba(0,0,0,0.5);
}

/* ── Coming Soon ── */
.coming-soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.coming-soon-icon {
  font-size: 4rem;
  margin-bottom: 24px;
}

.coming-soon h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.coming-soon p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 400px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 12px;
  }

  header {
    height: auto;
    position: relative;
  }

  main {
    margin-top: 0;
  }

  .tabs {
    width: 100%;
    justify-content: center;
  }

  .tab {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .game-frame-wrapper iframe {
    width: 100%;
    max-width: 390px;
    height: 650px;
  }
}
