/* ========================================
   OddsNWins - Auth & Additional Styles
   ======================================== */

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-greeting {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.header-btn {
    background: rgba(255,193,7,0.2);
    border: 2px solid var(--accent-gold);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.header-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

.admin-btn {
    background: rgba(239,68,68,0.2);
    border-color: #ef4444;
}

.admin-btn:hover {
    background: #ef4444;
}

.logout-btn {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Auth Modal */
.auth-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.auth-modal {
    background: var(--bg-secondary, #0D1642);
    border: 2px solid var(--accent-gold);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.auth-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.auth-modal-close:hover {
    color: #ef4444;
}

.auth-form h2 {
    color: var(--accent-gold);
    font-size: 24px;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 24px;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    color: var(--text-secondary, #E0E0E0);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary, #1A237E);
    border: 2px solid var(--border-color, #3949AB);
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-size: 15px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-gold);
    color: #0D1642;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    background: var(--accent-gold-hover, #FFD54F);
    transform: translateY(-1px);
}

.auth-switch {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
    margin-top: 16px;
}

.auth-switch a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
}

.auth-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #0A0F2C, #0D1642);
    border-top: 2px solid var(--accent-gold);
    padding: 40px 30px;
    margin-top: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    height: 50px;
    margin-bottom: 10px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-social a {
    padding: 8px 16px;
    background: rgba(255,193,7,0.15);
    border: 1px solid rgba(255,193,7,0.3);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--accent-gold);
    color: #0D1642;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.footer-copy {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}

/* ========================================
   ODDS CARDS (Dashboard)
   ======================================== */
.odds-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.odds-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.odds-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
}

.odds-time { color: var(--text-tertiary); }
.odds-book { color: var(--accent-gold); font-weight: 600; }

.odds-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
}

.odds-team { color: #1A237E; }
[data-theme="dark"] .odds-team { color: #1A237E; }
.odds-vs { color: var(--text-tertiary); font-size: 14px; }

.odds-markets {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.market-header, .odds-market {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.market-label {
    font-size: 13px;
    color: #5C6BC0;
    font-weight: 600;
    min-width: 100px;
}

.market-values {
    display: flex;
    gap: 20px;
}

.market-team-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.odds-value {
    font-weight: 700;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
    color: #1A237E;
    padding: 4px 8px;
    background: rgba(255,193,7,0.1);
    border-radius: 6px;
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
    font-size: 16px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
    font-size: 16px;
}

/* ========================================
   HISTORY CARDS
   ======================================== */
.history-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.history-item.status-won { border-left: 4px solid #10b981; }
.history-item.status-lost { border-left: 4px solid #ef4444; }
.history-item.status-pending { border-left: 4px solid #fbbf24; }

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #5C6BC0;
}

.history-status {
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
}

.history-status.status-won { background: #d1fae5; color: #065f46; }
.history-status.status-lost { background: #fee2e2; color: #991b1b; }
.history-status.status-pending { background: #fef3c7; color: #92400e; }

.history-leg {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.03);
}

.history-leg.covered {
    background: rgba(16,185,129,0.1);
    border-left: 3px solid #10b981;
}

.history-leg.not-covered {
    background: rgba(239,68,68,0.1);
    border-left: 3px solid #ef4444;
    opacity: 0.8;
}

.leg-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #1A237E;
}

.leg-covered-icon { font-size: 16px; }
.leg-player { font-weight: 700; }
.leg-prop { color: #5C6BC0; }
.leg-odds { font-weight: 600; margin-left: auto; }

.history-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.result-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.won-btn {
    background: rgba(16,185,129,0.1);
    border-color: #10b981;
    color: #065f46;
}

.won-btn:hover { background: #10b981; color: white; }

.lost-btn {
    background: rgba(239,68,68,0.1);
    border-color: #ef4444;
    color: #991b1b;
}

.lost-btn:hover { background: #ef4444; color: white; }

.leg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 4px;
    cursor: pointer;
    color: #1A237E;
}

.leg-checkbox-label.covered { background: rgba(16,185,129,0.1); }
.leg-checkbox-label.not-covered { background: rgba(239,68,68,0.05); }

/* ========================================
   PERFORMANCE CARDS
   ======================================== */
.performance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.performance-stat-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.perf-stat-icon { font-size: 28px; margin-bottom: 8px; }
.perf-stat-value { font-size: 32px; font-weight: 700; color: #1A237E; }
.perf-stat-label { font-size: 13px; color: #5C6BC0; margin-top: 4px; }

.performance-stat-card.won { border-color: #10b981; }
.performance-stat-card.lost { border-color: #ef4444; }
.performance-stat-card.rate { border-color: var(--accent-gold); }

.performance-money {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.money-stat {
    flex: 1;
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    min-width: 200px;
    color: #1A237E;
}

.profit { color: #10b981; }
.loss { color: #ef4444; }
.won-amount { color: #10b981; }

/* ========================================
   PARLAY LEG CARDS
   ======================================== */
.parlay-leg-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.leg-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.leg-number {
    background: var(--accent-gold);
    color: #0D1642;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.leg-header .leg-player {
    font-weight: 700;
    font-size: 16px;
    color: #1A237E;
    flex: 1;
}

.leg-remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}

.leg-game {
    font-size: 12px;
    color: #5C6BC0;
    margin-bottom: 8px;
}

.leg-prop {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
    color: #1A237E;
}

.prop-type { font-weight: 600; }
.prop-odds { margin-left: auto; font-weight: 700; color: var(--accent-gold); }

.leg-prob, .leg-coverage {
    font-size: 12px;
    color: #5C6BC0;
    margin-bottom: 6px;
}

.leg-contexts {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.add-context-btn {
    background: rgba(255,193,7,0.1);
    border: 1px dashed var(--accent-gold);
    color: var(--accent-gold);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.add-context-btn:hover {
    background: rgba(255,193,7,0.2);
}

/* ========================================
   CONTEXT MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.context-modal {
    background: var(--bg-secondary, #0D1642);
    border: 2px solid var(--accent-gold);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.context-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.context-modal-header h3 {
    color: var(--accent-gold);
    font-size: 20px;
}

.context-modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 28px;
    cursor: pointer;
}

.context-modal-body {
    padding: 25px;
}

.context-instruction {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 15px;
}

.context-factors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.context-factor-item {
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.context-factor-item:hover {
    background: rgba(255,193,7,0.1);
    border-color: rgba(255,193,7,0.3);
}

.context-factor-item.selected {
    background: rgba(255,193,7,0.15);
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(255,193,7,0.2);
}

.factor-emoji { font-size: 24px; display: block; margin-bottom: 4px; }
.factor-name { font-size: 12px; font-weight: 700; color: var(--text-primary, #fff); display: block; }
.factor-desc { font-size: 10px; color: var(--text-tertiary); display: block; margin-top: 2px; }

.factor-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-primary, #fff);
    font-size: 14px;
}

.factor-slider {
    flex: 1;
    accent-color: var(--accent-gold);
}

.factor-impact-value {
    min-width: 40px;
    text-align: right;
    font-weight: 700;
    color: var(--accent-gold);
}

.cumulative-impact {
    text-align: center;
    padding: 10px;
    background: rgba(255,193,7,0.1);
    border-radius: 8px;
    color: var(--accent-gold);
    font-size: 15px;
    margin-top: 10px;
}

.context-factor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255,193,7,0.15);
    border: 1px solid rgba(255,193,7,0.3);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-primary, #333);
}

/* ========================================
   PARLAY SUMMARY
   ======================================== */
.parlay-summary {
    background: var(--card-bg);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 15px;
    color: #1A237E;
}

.summary-value { font-weight: 700; }

.payout-row {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 4px;
}

.payout-value {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
}

.wager-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.wager-input-wrapper input {
    width: 80px;
    padding: 6px 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    font-family: inherit;
}

.parlay-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.secondary-btn {
    background: rgba(255,255,255,0.1) !important;
    border: 2px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.parlay-error {
    text-align: center;
    padding: 30px;
    color: #ef4444;
    font-size: 15px;
}

.empty-parlay {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
}

/* ========================================
   NEWS CARDS
   ======================================== */
.news-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.news-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.news-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.news-badge.injury { background: #fee2e2; color: #991b1b; }
.news-badge.trade { background: #dbeafe; color: #1e40af; }
.news-badge.betting { background: #fef3c7; color: #92400e; }
.news-badge.alert { background: #fce7f3; color: #9d174d; }
.news-badge.general { background: #e0e7ff; color: #3730a3; }

.news-sport { font-size: 12px; color: var(--text-tertiary); font-weight: 600; }
.news-time { font-size: 12px; color: var(--text-tertiary); margin-left: auto; }
.news-title { font-size: 16px; font-weight: 700; color: #1A237E; margin-bottom: 6px; }
.news-content-text { font-size: 14px; color: #5C6BC0; line-height: 1.5; }

/* ========================================
   COMPARISON GRID
   ======================================== */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.comparison-player-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.comparison-player-card h4 {
    color: #1A237E;
    font-size: 18px;
    margin-bottom: 4px;
}

.comparison-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.comparison-stat {
    text-align: center;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 12px;
    }
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-tabs {
        justify-content: center;
    }
    .nav-tab {
        font-size: 12px;
        padding: 8px 14px;
    }
    .auth-modal {
        margin: 20px;
        padding: 30px 20px;
    }
    .odds-teams {
        font-size: 14px;
    }
    .parlay-builder-new {
        flex-direction: column;
    }
    .context-factors-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .performance-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-social {
        gap: 8px;
    }
}
