:root {
    --bg: #0f172a;
    --card: #1e293b;
    --line: #334155;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --home: #f97316;
    --away: #38bdf8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
}

.hometime-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.18), rgba(56, 189, 248, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
}

.hometime-banner img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.hometime-banner strong {
    color: #f97316;
}

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

h1, h2 {
    margin: 0 0 0.35rem;
}

p {
    margin: 0;
    color: var(--muted);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    background: #0b1220;
    color: var(--text);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    font: inherit;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.btn, a.btn {
    border: 0;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #2563eb;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.secondary, a.btn.secondary {
    background: #334155;
}

.btn.danger {
    background: #b91c1c;
}

.btn.poss {
    width: 100%;
    margin-top: 0.75rem;
    background: #15803d;
}

.btn-row, .foul-row, .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.clock-readout, .score-readout {
    font-size: 2.5rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    margin: 0.5rem 0 0.25rem;
}

.home-card { border-top: 5px solid var(--home); }
.away-card { border-top: 5px solid var(--away); }

.foul-row {
    margin-top: 0.75rem;
}

.foul-row span {
    margin-right: auto;
}

.school-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.autocomplete {
    position: relative;
}

.autocomplete input {
    width: 100%;
}

.suggestions {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: #0b1220;
    border: 1px solid var(--line);
    border-radius: 10px;
    max-height: 220px;
    overflow: auto;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.suggestions li {
    padding: 0.55rem 0.75rem;
    cursor: pointer;
}

.suggestions li:hover,
.suggestions li.active {
    background: rgba(37, 99, 235, 0.25);
}

.suggestions li.loading,
.suggestions li.empty {
    cursor: default;
    color: var(--muted);
}

.logo-preview {
    margin-top: 0.75rem;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.logo-preview img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
}

@media (max-width: 640px) {
    .btn-row .btn { flex: 1 1 calc(50% - 0.5rem); }
}
