/* RDL Scrims
 *
 * Dark, because the people using it have just come from a game and will go
 * back to one. Nothing here is a framework: the site is a dozen pages and a
 * framework would be more to learn than to write.
 */

:root {
    --bg:        #14161a;
    --panel:     #1c1f25;
    --panel-2:   #22262d;
    --line:      #2c313a;
    --text:      #e6e8ec;
    --muted:     #8b929e;
    --red:       #b8443c;
    --blu:       #4a7ba8;
    --accent:    #c8734a;
    --ok:        #4f8a5b;
    --warn:      #b8873c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- header ---- */

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 24px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    color: var(--text);
}
.brand span { color: var(--accent); }

.top nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.top nav a { color: var(--muted); }
.top nav a:hover { color: var(--text); text-decoration: none; }

.me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.me img { width: 24px; height: 24px; border-radius: 3px; }

.inline { display: inline; margin: 0; }

button.link {
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    padding: 0;
}
button.link:hover { color: var(--text); }

/* ---- layout ---- */

main {
    flex: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 20px;
}

.panel.narrow { max-width: 460px; margin-inline: auto; }
.panel.highlight { border-color: var(--accent); }

h1 { margin: 0 0 12px; font-size: 24px; }
h2 { margin: 0 0 10px; font-size: 18px; }

p { margin: 0 0 14px; }
.muted { color: var(--muted); font-size: 14px; }

.tag {
    color: var(--muted);
    font-weight: 400;
    font-size: 18px;
}

.record { color: var(--muted); }

/* ---- buttons ---- */

.button, .steam, .discord {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.button:hover, .steam:hover, .discord:hover {
    text-decoration: none;
    filter: brightness(1.12);
}

.button.ghost {
    background: none;
    border-color: var(--line);
    color: var(--text);
}

.button + .button { margin-left: 8px; }

.steam   { background: #2a3f5a; }
.discord { background: #5865f2; }

button:disabled, .button.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---- flash ---- */

.flash {
    max-width: 960px;
    margin: 16px auto -6px;
    padding: 11px 16px;
    border-radius: 4px;
    border-left: 3px solid var(--muted);
    background: var(--panel-2);
}

.flash.ok    { border-left-color: var(--ok); }
.flash.error { border-left-color: var(--red); }
.flash.warn  { border-left-color: var(--warn); }

/* ---- tables ---- */

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
}

th { color: var(--muted); font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: 0; }

/* ---- forms ---- */

label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 14px;
}

input[type=text], select {
    width: 100%;
    padding: 9px 11px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font: inherit;
    margin-bottom: 16px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ---- match specific ---- */

.side-red { color: var(--red); font-weight: 600; }
.side-blu { color: var(--blu); font-weight: 600; }

.connect {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px 14px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    word-break: break-all;
    margin-bottom: 12px;
}

@media (max-width: 620px) {
    .top { flex-direction: column; align-items: flex-start; gap: 12px; }
    main { padding: 20px 16px 40px; }
}

/* ---- teams ---- */

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }

.actions { display: flex; gap: 8px; }

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 620px) {
    .split { grid-template-columns: 1fr; gap: 24px; }
}

h3 { margin: 0 0 8px; font-size: 15px; }

.button.small { padding: 5px 11px; font-size: 13px; }

img.tiny {
    width: 20px; height: 20px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 6px;
}

td.right { text-align: right; }

.panel.danger { border-color: #4a2a2a; }

.outcome-win     { color: var(--ok); }
.outcome-loss    { color: var(--red); }
.outcome-dead,
.outcome-dnf     { color: var(--warn); }
.outcome-forfeit { color: var(--muted); }
