/* Colors taken from the h4tum CTF 2026 poster */
:root {
    --bg: #262626;
    --panel: #1e1e1e;
    --band: #191919;
    --input: #141414;
    --border: #3a3a3a;
    --accent: #ff5252;
    --text: #efebeb;
    --muted: #a6a6a6;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/jetbrains-mono-400.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/jetbrains-mono-700.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

html { min-height: 100%; }

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: var(--bg) url('contours.svg') center / cover fixed no-repeat;
    color: var(--text);
    margin: 0;
    padding: 10px; /* Reduced for mobile */
    font-size: 17px; /* Balanced size for readability */
    line-height: 1.5;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Fade the contour lines so text stays readable */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--bg);
    opacity: 0.72;
    z-index: -1;
}

main { flex: 1 0 auto; }

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

::selection { background: var(--accent); color: var(--band); }

hr { border: none; border-top: 1px dashed var(--border); margin: 30px 0; }

code {
    background-color: var(--input);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0 4px;
}

.container {
    max-width: 1000px; /* Prevents it from stretching too wide on desktop */
    margin: 20px auto;
    background: var(--panel);
    padding: 24px;
    border: 1px solid var(--border);
    box-sizing: border-box; /* Ensures padding doesn't break layout */
    width: 100%;
}

.container > h1 { color: var(--accent); }
.container h2 { color: var(--text); font-size: 1.1rem; }

/* Header: logo + title */
.container.header-title {
    background: transparent;
    border: none;
    padding: 10px 0 0;
    margin-bottom: 0;
}

.header-title a {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text);
    text-decoration: none;
}

.header-title img { height: 72px; width: auto; }

.header-title h1 {
    margin: 0;
    font-size: 2.2rem;
    letter-spacing: -0.03em;
}

.status { text-align: center; }

h1 { font-size: 1.5rem; word-wrap: break-word; }

label { color: var(--muted); }

input[type="text"], input[type="email"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: var(--input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 3px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px; /* Prevents iOS from zooming in on focus */
}

input[type="text"]:focus, input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

input[type="checkbox"] { accent-color: var(--accent); }

button {
    background: var(--accent);
    color: var(--band);
    padding: 15px 20px;
    border: none;
    border-radius: 3px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    width: 100%; /* Full width button is easier to tap on mobile */
    font-family: inherit;
}

button:hover { filter: brightness(1.1); }

.alert { padding: 10px; margin-bottom: 10px; border: 1px solid var(--text); font-size: 14px; }
.alert.error { border-color: var(--accent); color: var(--accent); }
.alert.success { border-color: #6fcf97; color: #6fcf97; }

ul { padding-left: 20px; }
li { margin-bottom: 10px; }
li::marker { color: var(--accent); content: "› "; }

/* Sponsors + footer band, like the bottom of the poster */
.sponsors {
    flex-shrink: 0;
    background: var(--band);
    margin: 40px -10px -10px;
    padding: 30px 20px 20px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.sponsor-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px 80px;
    flex-wrap: wrap;
}

.sponsor h4 {
    margin: 0 0 12px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.sponsor img { display: block; margin: 0 auto; height: 48px; width: auto; }
.sponsor:not(.main) img { height: 40px; margin-top: 4px; }

.credits { color: #9a9a9a; font-size: 0.8rem; margin: 28px 0 0; }
.footer-links { font-size: 0.85rem; margin: 10px 0 0; }

/* Small screen adjustments */
@media (max-width: 480px) {
    body { font-size: 15px; }
    .container { padding: 15px; }
    h1 { font-size: 1.2rem; }
    .header-title img { height: 52px; }
    .header-title h1 { font-size: 1.5rem; }
    .sponsor-row { gap: 30px 40px; }
}
