/* ============================================================
   style.css - Gallaudet University Sports Prediction Competition
   Colors: Navy #00205B, Gold #C8A84B
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    color: #222;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #00205B;
    text-decoration: none;
}

a:hover {
    color: #C8A84B;
    text-decoration: underline;
}

/* ---------- Header ---------- */
header {
    background: #00205B;
    color: #fff;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 24px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.header-brand {
    display: flex;
    flex-direction: column;
}

.header-brand .site-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #C8A84B;
    letter-spacing: 0.02em;
}

.header-brand .site-subtitle {
    font-size: 0.82rem;
    color: #ccd6f6;
    margin-top: 2px;
}

/* ---------- Navigation ---------- */
nav {
    background: #001540;
    border-top: 3px solid #C8A84B;
}

nav ul {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

nav ul li a {
    display: block;
    padding: 12px 18px;
    color: #ccd6f6;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-bottom: 3px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
    background: #00205B;
    color: #C8A84B;
    border-bottom-color: #C8A84B;
}

nav ul li a.nav-admin {
    color: #f0c040;
}

nav ul li .nav-user-info {
    display: block;
    padding: 12px 14px;
    color: #C8A84B;
    font-size: 0.82rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ---------- Main Content ---------- */
main {
    flex: 1;
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 24px;
    width: 100%;
}

/* ---------- Page Title ---------- */
.page-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #00205B;
    margin-bottom: 6px;
    border-bottom: 3px solid #C8A84B;
    padding-bottom: 10px;
}

.page-subtitle {
    color: #555;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* ---------- Cards ---------- */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,32,91,0.08);
    padding: 24px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #00205B;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Alerts / Flash Messages ---------- */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    border-left: 5px solid;
}

.alert-success {
    background: #eaf7ef;
    border-color: #28a745;
    color: #155724;
}

.alert-error,
.alert-danger {
    background: #fdf0f0;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background: #fff8e1;
    border-color: #C8A84B;
    color: #856404;
}

.alert-info {
    background: #e8f0fb;
    border-color: #00205B;
    color: #00205B;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 5px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    line-height: 1.4;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: #00205B;
    color: #fff;
}
.btn-primary:hover { background: #001540; color: #C8A84B; }

.btn-gold {
    background: #C8A84B;
    color: #00205B;
}
.btn-gold:hover { background: #b8932e; color: #fff; }

.btn-danger {
    background: #dc3545;
    color: #fff;
}
.btn-danger:hover { background: #b02a37; }

.btn-secondary {
    background: #6c757d;
    color: #fff;
}
.btn-secondary:hover { background: #545b62; }

.btn-sm {
    padding: 5px 12px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1.05rem;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #00205B;
    font-size: 0.92rem;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #c8d0e0;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.15s;
    background: #fff;
    color: #222;
}

.form-control:focus {
    outline: none;
    border-color: #00205B;
    box-shadow: 0 0 0 3px rgba(0,32,91,0.1);
}

select.form-control {
    appearance: auto;
}

.form-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.91rem;
}

thead th {
    background: #00205B;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

thead th:first-child { border-radius: 6px 0 0 0; }
thead th:last-child  { border-radius: 0 6px 0 0; }

tbody tr:nth-child(even) { background: #f0f3f9; }
tbody tr:hover           { background: #dde5f4; }

tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #e0e5ef;
    vertical-align: middle;
}

tfoot td {
    padding: 9px 12px;
    font-weight: 600;
    background: #e8ecf5;
    border-top: 2px solid #00205B;
}

/* ---------- Sport Badges ---------- */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-nba {
    background: #ff6b1a;
    color: #fff;
}

.badge-nhl {
    background: #0b5394;
    color: #fff;
}

.badge-champion {
    background: #C8A84B;
    color: #00205B;
}

/* ---------- Game Day Section ---------- */
.games-section {
    margin-bottom: 28px;
}

.games-section h3 {
    font-size: 1.05rem;
    color: #00205B;
    margin-bottom: 10px;
    padding: 6px 12px;
    background: #e8ecf5;
    border-left: 4px solid #C8A84B;
    border-radius: 0 4px 4px 0;
}

.game-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid #e0e5ef;
    border-radius: 6px;
    margin-bottom: 6px;
    background: #fff;
    flex-wrap: wrap;
    gap: 8px;
}

.game-matchup {
    font-weight: 600;
    font-size: 0.98rem;
    color: #1a1a2e;
    flex: 1 1 200px;
}

.game-meta {
    font-size: 0.82rem;
    color: #666;
    flex: 1 1 120px;
}

.game-vegas {
    font-size: 0.85rem;
    background: #fff8e1;
    border: 1px solid #C8A84B;
    border-radius: 4px;
    padding: 3px 9px;
    color: #856404;
    white-space: nowrap;
}

/* ---------- Radio Pick Groups ---------- */
.pick-group {
    border: 1.5px solid #dde3f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
    transition: border-color 0.15s;
}

.pick-group:hover {
    border-color: #00205B;
}

.pick-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.pick-group-matchup {
    font-weight: 600;
    font-size: 0.97rem;
    color: #1a1a2e;
}

.pick-group-meta {
    font-size: 0.8rem;
    color: #777;
}

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

.pick-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #c8d0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1 1 140px;
    background: #f8f9fc;
}

.pick-option:hover {
    border-color: #00205B;
    background: #e8f0fb;
}

.pick-option input[type="radio"] {
    accent-color: #00205B;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.pick-option.vegas-pick {
    border-color: #C8A84B;
    background: #fff8e1;
}

.pick-option.vegas-pick::after {
    content: 'Vegas';
    font-size: 0.72rem;
    color: #856404;
    font-weight: 700;
    margin-left: auto;
    white-space: nowrap;
}

.pick-option input[type="radio"]:checked + span {
    font-weight: 700;
    color: #00205B;
}

/* ---------- Status Banner ---------- */
.status-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.status-banner.open {
    background: #eaf7ef;
    border: 2px solid #28a745;
}

.status-banner.closed {
    background: #fdf0f0;
    border: 2px solid #dc3545;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.open  { background: #28a745; animation: pulse 1.5s infinite; }
.status-dot.closed { background: #dc3545; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.status-text { font-weight: 600; font-size: 1rem; }
.status-detail { font-size: 0.85rem; color: #555; }

/* ---------- Leaderboard ---------- */
.rank-cell {
    font-weight: 700;
    color: #00205B;
    text-align: center;
}

.rank-1  { color: #C8A84B; }
.rank-2  { color: #888; }
.rank-3  { color: #a05a2c; }

.accuracy-bar-wrap {
    background: #e0e5ef;
    border-radius: 4px;
    height: 8px;
    min-width: 80px;
    position: relative;
}

.accuracy-bar {
    background: #00205B;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

/* ---------- Tabs (Admin) ---------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #00205B;
    margin-bottom: 24px;
    gap: 2px;
}

.tab-link {
    display: inline-block;
    padding: 10px 20px;
    background: #e8ecf5;
    color: #00205B;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px 6px 0 0;
    text-decoration: none;
    border: 1px solid #c8d0e0;
    border-bottom: none;
    transition: background 0.15s;
}

.tab-link:hover {
    background: #dde5f4;
    color: #00205B;
}

.tab-link.active {
    background: #00205B;
    color: #C8A84B;
    border-color: #00205B;
}

/* ---------- Two-column grid ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

/* ---------- Countdown ---------- */
#countdown {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00205B;
    letter-spacing: 0.05em;
}

/* ---------- Footer ---------- */
footer {
    background: #001540;
    color: #8896b3;
    text-align: center;
    padding: 20px 24px;
    font-size: 0.82rem;
    border-top: 3px solid #C8A84B;
    margin-top: auto;
}

footer a { color: #C8A84B; }
footer a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; align-items: flex-start; }
    nav ul { flex-direction: column; }
    nav ul li a { padding: 10px 16px; }
    main { margin: 16px auto; padding: 0 14px; }
    .pick-options { flex-direction: column; }
    .game-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Misc helpers ---------- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: #888; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.fw-bold { font-weight: 700; }
.eligible-yes { color: #28a745; font-weight: 700; }
.eligible-no  { color: #dc3545; }

hr.divider {
    border: none;
    border-top: 2px solid #e0e5ef;
    margin: 24px 0;
}

.inline-form { display: inline; }

details summary {
    cursor: pointer;
    color: #00205B;
    font-weight: 600;
    padding: 4px 0;
}

details summary:hover { color: #C8A84B; }

pre.code-block {
    background: #1e2a45;
    color: #ccd6f6;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre-wrap;
}

.confirm-delete {
    display: none;
}
