@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

:root {
    color-scheme: dark;
    font-family: "Inter", system-ui, sans-serif;
    --bg: radial-gradient(circle at top, #1f0729 0%, #07020a 70%);
    --panel: rgba(19, 9, 28, 0.82);
    --border: rgba(255, 129, 102, 0.4);
    --accent: #ff6f3c;
    --text: #f4f1ff;
    --muted: rgba(244, 241, 255, 0.65);
    --shadow: 0 28px 60px rgba(4, 1, 10, 0.48);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg) fixed;
    color: var(--text);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.layout {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    max-width: 1100px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    background: var(--panel);
    border-radius: 26px;
    padding: clamp(2rem, 5vw, 3rem);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0.08em;
}

.hero p {
    margin-top: 1rem;
    color: var(--muted);
}

.panel {
    background: var(--panel);
    border: 1px solid rgba(255, 203, 170, 0.25);
    border-radius: 24px;
    padding: clamp(1.5rem, 3vw, 2.2rem);
    box-shadow: var(--shadow);
}

.panel h2 {
    margin-top: 0;
    letter-spacing: 0.05em;
}

.events {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.event {
    background: rgba(11, 4, 20, 0.75);
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid rgba(244, 241, 255, 0.12);
    display: grid;
    gap: 0.75rem;
}

.event header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.status {
    padding: 0.35rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status--aberto {
    background: rgba(255, 111, 60, 0.18);
    color: #ffc5b0;
}

.status--encerrado {
    background: rgba(140, 136, 255, 0.18);
    color: #d0cffe;
}

.bet-btn {
    border: none;
    border-radius: 16px;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, var(--accent), #f49867);
    color: #210507;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bet-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bet-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 111, 60, 0.3);
}

form {
    display: grid;
    gap: 0.9rem;
}

label {
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(244, 241, 255, 0.15);
    background: rgba(12, 4, 22, 0.85);
    color: var(--text);
}

button {
    border: none;
    border-radius: 16px;
    padding: 0.85rem 1.4rem;
    background: linear-gradient(135deg, #ff7c3a, #fdb27a);
    color: #210507;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
}

button.primary {
    background: linear-gradient(135deg, #ffa156, #ff723a);
}

.tickets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
}

.tickets li {
    background: rgba(10, 4, 16, 0.7);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(244, 241, 255, 0.12);
    display: grid;
    gap: 0.35rem;
}

.tickets time {
    font-size: 0.75rem;
    color: rgba(244, 241, 255, 0.55);
}

.lookup-error {
    color: #ff7b90;
}

.query-dump {
    display: block;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(11, 3, 19, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(255, 129, 102, 0.25);
    font-size: 0.85rem;
    color: #ffd3c7;
    word-break: break-word;
}

#bet-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
}

#bet-dialog {
    border: none;
    border-radius: 20px;
    padding: 1.8rem;
    background: rgba(19, 9, 28, 0.94);
    border: 1px solid rgba(255, 129, 102, 0.35);
    color: var(--text);
    max-width: 420px;
}

menu {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin: 1rem 0 0;
}

menu button[type="reset"] {
    background: rgba(244, 241, 255, 0.12);
    color: var(--text);
}

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