:root { --sec-blue: #002d62; --sec-gold: #eeb211; --bg: #f4f6f8; --white: #ffffff; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); margin: 0; overscroll-behavior-y: none; }
.app-container { width: 100%; max-width: 500px; background: var(--white); min-height: 100vh; box-shadow: 0 0 20px rgba(0,0,0,0.05); position: relative; margin: 0 auto; }
header { background: var(--sec-blue); color: var(--white); padding: 20px 15px; text-align: center; position: sticky; top: 0; z-index: 100; }
h1 { margin: 0; font-size: 1.2rem; letter-spacing: 0.5px; font-weight: 700; }
.user-bar { background: #001f44; color: #ccc; font-size: 0.8rem; padding: 8px 15px; display: flex; justify-content: space-between; align-items: center; }
.user-links a { color: var(--white); text-decoration: none; margin-left: 15px; font-weight: 600; }
.nav-tabs { display: flex; background: var(--white); border-bottom: 1px solid #eee; position: sticky; top: 60px; z-index: 99; }
.nav-btn { flex: 1; padding: 15px; border: none; background: none; font-weight: 600; color: #666; cursor: pointer; border-bottom: 3px solid transparent; transition: 0.2s; font-size: 0.9rem; }
.nav-btn.active { color: var(--sec-blue); border-bottom-color: var(--sec-gold); }
.tab-content { padding: 15px; display: none; padding-bottom: 50px; }
.tab-content.active { display: block; }

.login-wrapper { padding: 40px 20px; text-align: center; }
.login-card { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eee; }
.auth-input { width: 100%; padding: 14px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; box-sizing: border-box; }
.btn-primary { width: 100%; padding: 14px; background: var(--sec-blue); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; }

.hidden { display: none !important; }

.game-card { background: white; border: 1px solid #eee; border-radius: 10px; margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); overflow: hidden; }
.game-header { background: #f9fafb; padding: 10px 15px; font-size: 0.8rem; color: #666; display: flex; justify-content: space-between; border-bottom: 1px solid #eee; }
.game-body { padding: 15px; }
.teams-row { display: flex; gap: 10px; }
.team-btn { flex: 1; border: 2px solid #eee; padding: 12px; border-radius: 8px; text-align: center; cursor: pointer; font-weight: 600; transition: 0.2s; position: relative; }
.team-btn.selected { border-color: var(--sec-blue); background: #eef4fc; color: var(--sec-blue); }
.team-btn.selected::after { content: '✓'; position: absolute; top: 5px; right: 5px; font-size: 0.7rem; }
.pick-status { text-align: center; font-size: 0.75rem; margin-top: 8px; font-weight: 600; }
.status-not-picked { color: #dc3545; }
.status-saved { color: #28a745; }
.score-box { font-weight: bold; font-size: 1.1rem; }
.score-box.winner { color: #28a745; }
.score-box.loser { color: #666; opacity: 0.7; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th { text-align: left; color: #888; font-size: 0.8rem; border-bottom: 2px solid #eee; padding: 8px; font-weight: 600; }
td { padding: 12px 8px; border-bottom: 1px solid #f4f4f4; font-size: 0.95rem; vertical-align: middle; }

.alert-box { padding: 15px; border-radius: 8px; margin-bottom: 15px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.alert-yellow { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; }
.alert-red { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.alert-green { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.dismiss-form { margin: 0; width: 100%; }


/* Soft Blue Button (Who Picked Who) */
.btn-soft {
    background-color: #f0f7ff; 
    color: #002d62; 
    border: 1px solid #cce5ff; 
    padding: 10px; 
    border-radius: 6px; 
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
    display: block;
}

.btn-soft:hover {
    background-color: #e0f0ff;
    border-color: #b3d7ff;
}


.btn-block { display: block; width: 100%; padding: 12px; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; color: white; font-size: 0.9rem; text-align: center; text-decoration: none; box-sizing: border-box; margin-top: 0; }
.btn-red-block { background-color: #dc3545; }
.btn-green-block { background-color: #28a745; }
.btn-gold-block { background-color: #eeb211; color: #333; }

.my-stat-card { background: #eef4fc; border: 1px solid #d0e1f5; border-radius: 8px; padding: 15px; margin-bottom: 20px; display:flex; justify-content:space-around; align-items:center; }
.stat-item { text-align:center; }
.stat-label { font-size:0.75rem; color:#666; text-transform:uppercase; letter-spacing:0.5px; }
.stat-val { font-size:1.4rem; font-weight:bold; color:var(--sec-blue); }
.my-row { background-color: #eef4fc; border-left: 4px solid var(--sec-gold); }

.chal-btn { background: none; border: 1px solid #ccc; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 0.8rem; margin-left: 5px; font-weight:600; }
.chal-btn:hover { background: #eee; }
.chal-btn.active-chal { background: #fff0f0; border-color: #ffcccc; color: #d63384; }
.chal-status { font-size:0.75rem; border:1px solid #eee; border-radius:4px; padding:2px 5px; background:#f9f9f9; color:#666; margin-left:5px; }

.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal-content { background-color: #fefefe; padding: 20px; border: 1px solid #888; width: 80%; max-width: 400px; border-radius: 10px; position: relative; margin: auto; max-height: 90vh; overflow-y: auto; }
.close-btn { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }

.score-inputs { display: flex; gap: 15px; margin: 15px 0; }
.score-input-group { flex: 1; display: flex; flex-direction: column; }
.score-input-group label { font-size: 0.8rem; color: #666; margin-bottom: 5px; font-weight: 600; text-align: center; }
.score-input-group input { width: 100%; padding: 10px; text-align: center; font-size: 1.2rem; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; }

.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #eee; }
.divider { text-align: center; margin: 20px 0; color: #999; font-size: 0.8rem; position: relative; }
.divider::before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: #eee; z-index: -1; }
.divider span { background: white; padding: 0 10px; }
.error-banner { background: #f8d7da; color: #721c24; padding: 10px; border-radius: 5px; margin-bottom: 15px; text-align: center; }
.success-banner { background: #d4edda; color: #155724; padding: 10px; border-radius: 5px; margin-bottom: 15px; text-align: center; }
.delete-btn { width: 100%; background: none; border: 1px solid #dc3545; color: #dc3545; padding: 10px; border-radius: 6px; cursor: pointer; margin-top: 20px; font-size: 0.9rem; }

.award-badge { display:inline-block; background:#002d62; color:white; padding:5px 10px; border-radius:15px; font-size:0.8rem; margin:2px; cursor:pointer; font-weight:600; }
.award-badge:hover { background: #eeb211; color:#002d62; }

/* --- LIVE GAME CARD & BOX SCORE --- */
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.live-game-container { border-top: 4px solid #8B0000; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.live-header-status { font-size: 1.1rem; font-weight: bold; color: #333; }
.live-sub-status { font-size: 0.85rem; color: #d63384; font-weight: 600; }

.box-score-table { width: 100%; font-size: 0.75rem; border-collapse: collapse; margin-top: 10px; color: #555; }
.box-score-table th, .box-score-table td { padding: 3px 6px; text-align: center; border-bottom: 1px solid #eee; }
.box-score-table th { font-weight: normal; color: #999; text-transform: uppercase; font-size: 0.65rem; }
.box-score-table .team-name-cell { text-align: left; font-weight: bold; color: #333; width: 40%; }
.box-score-table .total-cell { font-weight: bold; color: #000; background-color: #f9f9f9; }