* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    background: linear-gradient(160deg, #9fd8e8 0%, #b8e8c8 50%, #d8f0b8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px 40px;
}

.page-header {
    text-align: center;
    margin-bottom: 20px;
}

.logo-wrap {
    width: 72px; height: 72px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    overflow: hidden;
}

.logo-wrap svg { width: 56px; height: 56px; }

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

.contest-title {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin: 6px 0 2px;
}

.card {
    background: rgba(255,255,255,0.88);
    border-radius: 18px;
    padding: 24px 28px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

/* Tabs */
.tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid #ddd; }
.tab-btn {
    flex: 1; padding: 10px; border: none; background: none;
    font-size: .95rem; font-weight: 600; color: #888; cursor: pointer;
    border-bottom: 3px solid transparent; margin-bottom: -2px;
    transition: all .2s;
}
.tab-btn.active { color: #1a7bbf; border-bottom-color: #1a7bbf; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Form elements */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: .85rem; font-weight: 600;
    color: #555; margin-bottom: 5px;
}
.form-group input, .form-group select {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid #cdd;
    border-radius: 10px;
    font-size: .95rem;
    background: #fff;
    transition: border-color .2s;
    appearance: none;
}
.form-group input:focus, .form-group select:focus {
    outline: none; border-color: #1a7bbf;
}

.btn {
    display: block; width: 100%;
    padding: 12px;
    background: #fff;
    border: 1.5px solid #bbb;
    border-radius: 22px;
    font-size: 1rem; font-weight: 600;
    color: #333; cursor: pointer;
    text-align: center;
    transition: background .2s, box-shadow .2s;
    margin-top: 18px;
    text-decoration: none;
}
.btn:hover { background: #f0f0f0; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.btn-sm {
    display: inline-block; width: auto; padding: 6px 18px;
    font-size: .85rem; margin-top: 0;
}
.btn-primary { background: #1a7bbf; color: #fff; border-color: #1a7bbf; }
.btn-primary:hover { background: #155e96; }
.btn-danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn-danger:hover { background: #c0392b; }

/* Nav bar */
.navbar {
    width: 100%; max-width: 440px;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.75);
    border-radius: 12px; padding: 8px 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.navbar a {
    text-decoration: none; color: #1a7bbf; font-weight: 600; font-size: .85rem;
    padding: 4px 8px; border-radius: 8px;
    transition: background .2s;
}
.navbar a:hover { background: rgba(26,123,191,.1); }
.navbar a.active { color: #155e96; border-bottom: 2px solid #1a7bbf; }

/* Logged-in banner */
.logged-as {
    text-align: center; font-size: .9rem;
    color: #444; margin-bottom: 14px;
}
.logged-as strong { color: #1a7bbf; }

/* Predict page */
.predict-section { margin-top: 10px; }
.match-box {
    background: rgba(255,255,255,0.6);
    border-radius: 12px; padding: 16px;
    margin-bottom: 6px;
}
.match-label { font-size: .8rem; color: #777; margin-bottom: 8px; }
.score-grid {
    display: grid;
    grid-template-columns: 1fr 90px 90px;
    gap: 6px 10px;
    align-items: center;
    margin-bottom: 10px;
}
.score-grid .col-hdr {
    font-size: .75rem; font-weight: 700; color: #555;
    text-align: center; line-height: 1.2;
}
.score-grid .team-name { font-size: .95rem; font-weight: 600; }
.score-grid input[type=number] {
    width: 100%; padding: 8px;
    border: 1.5px solid #ccc; border-radius: 8px;
    text-align: center; font-size: 1rem;
}
.score-grid input[type=number]:focus { outline: none; border-color: #1a7bbf; }
.score-grid input[readonly] { background: #f5f5f5; color: #666; }

.tiebreak-row { margin: 10px 0; }
.tiebreak-row label { font-size: .8rem; font-weight: 600; color: #555; }
.tiebreak-row input {
    width: 90px; padding: 7px 10px;
    border: 1.5px solid #ccc; border-radius: 8px;
    font-size: .95rem; text-align: center;
    margin-left: 8px;
}
.tiebreak-row input:focus { outline: none; border-color: #1a7bbf; }
.tiebreak-row input[readonly] { background: #f5f5f5; color: #666; }

.no-amend {
    font-size: .78rem; color: #888; text-align: center;
    margin: 8px 0 4px; font-style: italic;
}
.vote-closed {
    font-size: .82rem; color: #e67e22; font-weight: 600;
    text-align: center; margin: 6px 0;
    background: #fdf0e0; border-radius: 8px; padding: 6px;
}
.predicted-badge {
    display: inline-block; background: #2ecc71; color: #fff;
    border-radius: 6px; padding: 2px 8px; font-size: .75rem; font-weight: 700;
    margin-left: 8px;
}

/* Results table */
.results-table {
    width: 100%; border-collapse: collapse;
    font-size: .88rem;
}
.results-table th {
    background: rgba(26,123,191,.12);
    padding: 8px 6px; font-size: .8rem;
    text-align: left; border-bottom: 2px solid #dde;
}
.results-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.results-table tr:hover td { background: rgba(26,123,191,.05); }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table th { background: #1a7bbf; color: #fff; padding: 8px; text-align: left; }
.admin-table td { padding: 7px 8px; border-bottom: 1px solid #eee; }
.admin-table tr:nth-child(even) td { background: #f9fbff; }

.alert {
    padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .9rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

.section-title { font-size: 1rem; font-weight: 700; color: #333; margin-bottom: 14px; text-align: center; }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { opacity: 1; }
