/* Shared styling for the Ludoz site.
   No build step and no framework - Netlify serves these files exactly as they are.
   Palette taken from the game itself (LudoUI.cs / LudoBoard.cs): the navy the board sits on,
   the gold of the title, and the four seat colours. Light by default, the game's own navy in
   dark mode. */

:root {
    --bg: #ffffff;
    --card: #ffffff;
    --ink: #16202c;
    --dim: #5c6773;
    --line: #e3e7ec;
    --accent: #946f00;      /* the title gold, darkened until it reads as link text on white */
    --red: #e84650;
    --green: #1e9e57;
    --yellow: #f5c51e;
    --blue: #2e9bd6;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #081422;      /* BgDeep */
        --card: #162c46;    /* Bg */
        --ink: #f2f5f8;
        --dim: #a9b6c4;
        --line: #1e3a57;    /* Surface */
        --accent: #f5c51e;  /* Gold */
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0 20px 72px;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 760px; margin: 0 auto; }

header.site {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 30px 0 26px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 34px;
}

/* The app icon, so the site and the store listing agree on what the game looks like. */
.logo {
    width: 46px; height: 46px; border-radius: 12px; flex: none;
    display: block;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
}

header.site h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
header.site a { color: inherit; text-decoration: none; }

/* The four seat colours as a thin rule under the header - the one flourish the site allows. */
.seats { display: flex; height: 4px; border-radius: 2px; overflow: hidden; margin: -34px 0 34px; }
.seats i { flex: 1; }
.seats i:nth-child(1) { background: var(--red); }
.seats i:nth-child(2) { background: var(--green); }
.seats i:nth-child(3) { background: var(--yellow); }
.seats i:nth-child(4) { background: var(--blue); }

h2 { font-size: 27px; margin: 0 0 6px; letter-spacing: -.015em; line-height: 1.25; }
h3 { font-size: 18px; margin: 34px 0 8px; }
p, li { color: var(--dim); }
p { margin: 0 0 14px; }
ul { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 7px; }
strong { color: var(--ink); font-weight: 600; }
a { color: var(--accent); }
code { font-size: 14px; }

.updated { font-size: 14px; color: var(--dim); margin-bottom: 30px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 24px;
    margin: 0 0 18px;
}

.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.modes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 22px 0 8px; }
.mode { border-left: 4px solid var(--line); padding: 4px 0 4px 14px; }
.mode b { display: block; color: var(--ink); }
.mode span { font-size: 15px; color: var(--dim); }
.mode.red { border-color: var(--red); }
.mode.green { border-color: var(--green); }
.mode.yellow { border-color: var(--yellow); }
.mode.blue { border-color: var(--blue); }

.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 26px; }

.tile {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: var(--ink);
    transition: transform .12s ease, border-color .12s ease;
}

.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile b { display: block; font-size: 17px; margin-bottom: 4px; }
.tile span { font-size: 14px; color: var(--dim); }

/* Tables scroll inside their own box so the page body never scrolls sideways. */
.scroll { overflow-x: auto; margin: 0 0 18px; }
table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 600; white-space: nowrap; }
td { color: var(--dim); }

/* The invite page: the code is the whole point, so it is the biggest thing on it. */
.code {
    font: 700 44px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .12em;
    color: var(--ink);
    margin: 6px 0 16px;
    word-break: break-all;
}

.button {
    display: inline-block;
    background: var(--accent);
    color: #16202c;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 12px;
    border: 0;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    margin: 0 10px 10px 0;
}

@media (prefers-color-scheme: light) { .button { color: #ffffff; } }
.button.quiet { background: transparent; color: var(--accent); border: 1px solid var(--line); }

footer {
    margin-top: 46px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--dim);
}

footer a { margin-right: 16px; }
