/*
 * All Mahjong - site stylesheet
 * A light, modern refresh of the original 2000s-era markup.
 * Color theme draws from traditional Mahjong tiles: jade green, ivory, and a red/gold accent.
 */

:root {
    --color-jade-dark: #0f4c3a;
    --color-jade: #14603f;
    --color-jade-darker: #0a3428;
    --color-gold: #d4af37;
    --color-gold-light: #f0d78c;
    --color-red: #a3223e;
    --color-red-dark: #7d1a30;
    --color-ivory: #f7f3e8;
    --color-cream: #fffdf7;
    --color-text: #2b2620;
    --color-text-muted: #5c5548;
    --color-border: #e4dcc6;

    --font-body: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shadow-card: 0 2px 10px rgba(15, 76, 58, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-ivory);
    color: var(--color-text);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Header ---------- */

.site-header {
    background: linear-gradient(135deg, var(--color-jade-dark), var(--color-jade));
    padding: 1.25rem 1rem;
    text-align: center;
}

.site-header img {
    display: inline-block;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ---------- Navigation ---------- */

.site-nav {
    background: var(--color-jade-darker);
    padding: 0.6rem 1rem;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.25rem;
    max-width: 1000px;
    margin-inline: auto;
}

.site-nav a {
    display: inline-block;
    color: var(--color-gold-light);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.45rem 0.7rem;
    border-radius: 5px;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus {
    background-color: rgba(212, 175, 55, 0.18);
    color: var(--color-gold);
}

/* ---------- Layout ---------- */

.container {
    max-width: 880px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.content-card {
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    padding: 2rem 2.25rem;
}

@media (max-width: 600px) {
    .container {
        margin: 1rem auto;
    }

    .content-card {
        padding: 1.25rem 1.25rem;
        border-radius: 8px;
    }
}

/* ---------- Typography ---------- */

h1, h2, h3 {
    color: var(--color-jade-dark);
    line-height: 1.25;
}

h1 {
    font-size: 1.9rem;
    margin-top: 0;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid var(--color-gold);
    display: inline-block;
}

h2 {
    font-size: 1.35rem;
    margin-top: 2rem;
    color: var(--color-red);
}

h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    color: var(--color-jade);
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--color-red);
    text-decoration: underline;
    text-decoration-color: rgba(163, 34, 62, 0.35);
}

a:hover,
a:focus {
    color: var(--color-red-dark);
    text-decoration-color: var(--color-red-dark);
}

strong, b {
    color: var(--color-text);
}

address {
    font-style: normal;
    color: var(--color-text-muted);
}

/* ---------- Lists ---------- */

main ul,
main ol {
    padding-left: 1.4rem;
}

main li {
    margin-bottom: 0.4rem;
}

/* ---------- Tables ---------- */

.table-wrap {
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

table {
    border-collapse: collapse;
    width: 100%;
    background: var(--color-cream);
    font-size: 0.95rem;
}

table caption {
    text-align: left;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    color: var(--color-jade-dark);
}

th, td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

thead th {
    background: var(--color-jade-dark);
    color: var(--color-cream);
    font-weight: 600;
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background: var(--color-ivory);
}

tbody tr:hover {
    background: var(--color-gold-light);
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--color-jade-darker);
    color: var(--color-ivory);
    text-align: center;
    padding: 1.25rem 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--color-gold-light);
    text-decoration-color: rgba(212, 175, 55, 0.4);
}

.site-footer a:hover,
.site-footer a:focus {
    color: var(--color-gold);
}

.site-footer p {
    margin: 0 0 0.4rem;
}

.site-footer address {
    color: rgba(247, 243, 232, 0.7);
    font-size: 0.85rem;
}

/* ---------- Utility ---------- */

.center {
    text-align: center;
}

.tile-symbol {
    vertical-align: middle;
    margin: 0 1px;
}
