:root {
    --bg: #f4efe8;
    --panel: rgba(255, 250, 244, 0.9);
    --panel-strong: #fff8f0;
    --text: #2f2118;
    --muted: #7f6a59;
    --line: rgba(88, 62, 40, 0.18);
    --accent: #b75d31;
    --accent-strong: #8f431c;
    --success: #1e8c5d;
    --danger: #9a3f3f;
    --shadow: 0 18px 40px rgba(76, 50, 31, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(circle at top right, rgba(183, 93, 49, 0.18), transparent 28%),
        radial-gradient(circle at bottom left, rgba(87, 131, 111, 0.12), transparent 35%),
        var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

.shell {
    width: min(1100px, calc(100% - 32px));
    margin: 32px auto;
}

.hero,
.card,
.event-display {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero {
    padding: 28px;
    margin-bottom: 24px;
}

.hero h1,
.card h2 {
    margin: 0 0 10px;
}

.hero p,
.card p,
.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 20px;
}

.grid.columns-2 {
    grid-template-columns: 1.2fr 0.8fr;
}

.card {
    padding: 22px;
}

.stack {
    display: grid;
    gap: 14px;
}

.event-list {
    display: grid;
    gap: 14px;
}

.event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.event-item strong {
    display: block;
    margin-bottom: 4px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button,
button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff8f0;
    cursor: pointer;
    padding: 11px 18px;
    font: inherit;
    text-decoration: none;
    transition: transform 140ms ease, background 140ms ease;
}

.button:hover,
button:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.button.secondary {
    background: #e6d5c5;
    color: var(--text);
}

.field {
    display: grid;
    gap: 8px;
}

label {
    font-weight: 700;
}

input[type="text"],
input[type="password"],
select,
input[type="file"] {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    font: inherit;
    background: #fffdf9;
}

.inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.question-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffdf9;
}

.question-row .remove-question {
    background: #f5d5d5;
    color: var(--danger);
}

.flash {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(30, 140, 93, 0.12);
    border: 1px solid rgba(30, 140, 93, 0.24);
    color: var(--success);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(183, 93, 49, 0.1);
    color: var(--accent-strong);
    font-size: 14px;
}

.preview {
    
    margin: 0 auto;
    padding: 0px;
}

.event-display {
    position: relative;
    overflow: hidden;
    width: 100vw;
    height: 100svh;
    display: grid;
    place-items: center;
    padding: 28px;
    background-color: #d7c7b3;
    background-size: cover;
    background-position: center;
}

.event-display::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(34, 23, 17, 0.18), rgba(34, 23, 17, 0.48));
}

.display-panel {
    position: relative;
    z-index: 1;
    width: 80%;
    padding: 34px;
    background: rgba(255, 255, 255, 1);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.display-panel h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
}

.clock {
    margin-bottom: 18px;
    font-size: clamp(18px, 2vw, 24px);
    letter-spacing: 0.08em;
    color: var(--accent-strong);
}

.question-text {
    margin: 0;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.2;
}

.empty-state {
    font-size: clamp(20px, 3vw, 30px);
    color: var(--muted);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

@media (max-width: 860px) {
    .grid.columns-2 {
        grid-template-columns: 1fr;
    }

    .question-row {
        grid-template-columns: 1fr;
    }

    .question-row input[type="radio"] {
        justify-self: start;
    }
}
