/**
 * Bones of Fate - Shared Styles
 * Used across all web pages: landing, how-to-play, privacy, account-deletion
 */

/* Google Fonts - load in HTML:
   https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap
*/

:root {
  --gold: #d4a84b;
  --gold-dim: #a68939;
  --bg-deep: #0f172a;
  --bg-light: #1e293b;
  --bg-lighter: #334155;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #a855f7;
  --green: #4ade80;
}

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

body {
  font-family: 'Crimson Text', Georgia, serif;
  background-color: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  font-size: 18px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Headers */
header {
  text-align: center;
  padding: 40px 20px;
  border-bottom: 2px solid var(--gold-dim);
  margin-bottom: 40px;
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: 3em;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 10px;
}

h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.8em;
  color: var(--gold);
  margin: 50px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-lighter);
}

h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.3em;
  color: var(--text);
  margin: 30px 0 15px;
}

h4 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  margin-bottom: 10px;
}

/* Text */
p {
  margin-bottom: 15px;
  color: var(--text-dim);
}

.tagline {
  font-style: italic;
  color: var(--text-dim);
  font-size: 1.2em;
}

.app-name {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.last-updated {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

/* Links */
a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-left: 20px;
  margin-bottom: 15px;
  color: var(--text-dim);
}

li {
  margin-bottom: 8px;
  padding: 4px 0;
}

ul li::marker {
  color: var(--gold);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
}

th {
  font-family: 'Cinzel', serif;
  background: var(--bg-lighter);
  color: var(--gold);
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--bg-lighter);
  color: var(--text-dim);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: var(--bg-lighter);
}

/* Boxes */
.story-box,
.warning {
  background: var(--bg-light);
  border-left: 4px solid var(--gold);
  padding: 20px 25px;
  margin: 20px 0;
}

.story-box {
  font-style: italic;
}

.story-box .title {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
  margin-bottom: 10px;
}

.warning p {
  margin: 0;
}

.tip-box {
  background: var(--bg-light);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.tip-box ul {
  margin-left: 20px;
  color: var(--text-dim);
}

/* Navigation */
nav {
  background: var(--bg-light);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 0;
}

nav a {
  font-family: 'Cinzel', serif;
  font-size: 0.9em;
}

/* Collapsible sections */
details {
  background: var(--bg-light);
  border-radius: 8px;
  margin: 10px 0;
}

summary {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  padding: 15px;
  cursor: pointer;
  font-weight: 600;
}

summary:hover {
  background: var(--bg-lighter);
}

details[open] summary {
  border-bottom: 1px solid var(--bg-lighter);
}

details > div {
  padding: 15px;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
  border-top: 1px solid var(--bg-lighter);
  color: var(--text-dim);
  font-size: 0.9em;
}

/* Dice Styling */
.dice-container {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.die {
  width: 40px;
  height: 40px;
  background: linear-gradient(145deg, #f5f0e6, #d4cfc5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.2em;
  color: #2a2420;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.die.cursed {
  background: linear-gradient(145deg, #450a0a, #7f1d1d);
  color: #fca5a5;
}

.die.venus {
  background: linear-gradient(145deg, #ffd700, #daa520);
  color: #2a2420;
}

/* Rarity Colors */
.rarity-common { color: var(--text-dim); }
.rarity-rare { color: var(--blue); }
.rarity-epic { color: var(--purple); }
.rarity-legendary { color: var(--gold); }

/* Category Colors */
.cat-blessing { color: var(--gold); }
.cat-shield { color: var(--blue); }
.cat-curse { color: var(--red); }
.cat-insight { color: var(--purple); }

/* Power Tiers */
.tier-none { color: #475569; }
.tier-minor { color: var(--text-dim); }
.tier-moderate { color: var(--blue); }
.tier-major { color: var(--purple); }
.tier-legendary { color: var(--gold); }

/* Scoring Table */
.hand-name {
  font-family: 'Cinzel', serif;
  color: var(--text);
  font-weight: 600;
}

.hand-venus { color: var(--gold); }
.hand-cursed { color: var(--red); }

.result-good { color: var(--green); }
.result-bad { color: var(--red); }

/* Zone Cards */
.zone-card {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 20px;
  margin: 15px 0;
  border-left: 4px solid var(--gold-dim);
}

.zone-card .zone-number {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.zone-card .zone-name {
  font-family: 'Cinzel', serif;
  font-size: 1.4em;
  color: var(--text);
  margin: 5px 0;
}

.zone-card .zone-latin {
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.95em;
}

.zone-card .zone-desc {
  margin-top: 10px;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 2em; }
  h2 { font-size: 1.4em; }
  .die { width: 32px; height: 32px; font-size: 1em; }
  table { font-size: 0.9em; }
  th, td { padding: 8px 10px; }
  .container { padding: 20px 10px; }
}
