/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Last Refresh */
.last-refresh {
    text-align: center;
    margin-bottom: 30px;
}

.last-refresh small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.dropdown-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dropdown-group label {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

select {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 1rem;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.3s ease;
}

select:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Matchups container */
.matchups-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    min-height: 400px;
}

/* Loading, error, and no matchups */
.loading, .error, .no-matchups {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.1rem;
    color: #666;
}

.error {
    color: #e74c3c;
}

.error p {
    background: #ffeaea;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

/* Matchup header */
.matchup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.matchup-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Team list */
.team-list {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.team-list h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.team-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.team-card:hover {
    transform: translateY(-2px);
}

/* Matchups */
.matchups {
    padding: 30px;
}

.matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.matchup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.matchup:last-child {
    margin-bottom: 0;
}

.team {
    flex: 1;
    text-align: center;
    padding: 0 15px;
    position: relative;
}

.team-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.score-percentage-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.team-score {
    font-size: 1.4rem;
    font-weight: 700;
    color: #667eea;
    background: white;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    min-width: 80px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.win-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    color: #28a745;
    background: #f8fff9;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #d4edda;
    min-width: 50px;
    text-align: center;
}

.editable-line {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.editable-line:hover {
    background: #ffe6e6;
    border-color: #dc3545;
    transform: scale(1.05);
}

.editable-line::after {
    content: "✎";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.editable-line:hover::after {
    opacity: 0.7;
}

.betting-line-input {
    font-size: 0.9rem;
    font-weight: 600;
    color: #dc3545;
    background: #fff;
    padding: 4px 8px;
    border: 2px solid #007bff;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

.nav-brand .brand-link {
    text-decoration: none !important;
    color: inherit;
    transition: opacity 0.2s ease;
    border: none;
    outline: none;
}

.nav-brand .brand-link:hover {
    opacity: 0.8;
}

.nav-brand h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

/* Dropdown navigation */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 8px 0;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 12px 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

.dropdown-item.active {
    background: #667eea;
    color: white;
}

.main-content {
    padding-top: 0;
}

/* Bet buttons and containers */
.bet-container {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.bet-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.bet-button:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.bet-button:active {
    transform: translateY(0);
}

.bet-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.bet-amount-input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.bet-amount-input:focus {
    outline: none;
    border-color: #667eea;
}

.place-bet-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.place-bet-button:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

.place-bet-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.bet-amount-display {
    background: #e7f3ff;
    color: #0066cc;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #b3d9ff;
    margin-top: 8px;
}

/* My Bets page */
.bets-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    min-height: 400px;
    margin-top: 30px;
}

.no-bets {
    text-align: center;
    padding: 100px 20px;
    color: #666;
}

.no-bets p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.back-to-matchups {
    background: #667eea;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.back-to-matchups:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.bet-display {
    padding: 30px;
}

.bet-display h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.bet-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

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

.bet-week {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    background: white;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
}

.selected-bet {
    position: relative;
}

.bet-indicator {
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    position: absolute;
    top: -10px;
    right: 10px;
    letter-spacing: 0.5px;
}

.bet-timestamp {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.bet-actions {
    text-align: center;
}

.custom-line-indicator {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid #ffeaa7;
    margin-top: 5px;
}

.custom-line-indicator small {
    font-weight: 600;
}

/* Open Bets page */
.open-bets-list {
    padding: 20px;
}

.open-bet-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.open-bet-card:hover:not(.locked) {
    border-color: #667eea;
    transform: translateY(-2px);
}

.open-bet-card.locked {
    background: #f1f3f4;
    border-color: #6c757d;
    opacity: 0.8;
}

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

.bet-bettor {
    color: #667eea;
    font-weight: 600;
}

.locked-indicator {
    background: #6c757d;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bet-matchup-container {
    margin-bottom: 20px;
}

.accept-bet-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
    min-width: 100px;
}

.accept-bet-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.cancel-bet-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
    min-width: 100px;
}

.cancel-bet-button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.cancel-bet-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.accepted-indicator {
    background: #28a745;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.bet-details {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.bet-amount {
    color: #0066cc;
    font-size: 1.1rem;
    font-weight: 600;
}

.bet-timestamp {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .bet-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bet-details {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .open-bet-card {
        padding: 20px 15px;
    }
}

/* Authentication styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.auth-card h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
}

.auth-card p {
    color: #666;
    margin-bottom: 30px;
}

.auth-form {
    text-align: left;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.auth-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.auth-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.field-errors {
    margin-top: 5px;
}

.field-errors small {
    color: #dc3545;
    font-size: 0.875rem;
}

@media (max-width: 600px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

.vs {
    font-weight: 700;
    font-size: 1.2rem;
    color: #666;
    padding: 0 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .controls {
        gap: 20px;
    }
    
    .matchup {
        flex-direction: column;
        gap: 15px;
        padding: 25px 15px;
    }
    
    .vs {
        order: 2;
        padding: 10px 0;
    }
    
    .team:first-child {
        order: 1;
    }
    
    .team:last-child {
        order: 3;
    }
    
    .team {
        width: 100%;
        padding: 0;
    }
    
    .team-score {
        font-size: 1.6rem;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .matchups {
        padding: 20px 15px;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    select {
        min-width: 150px;
    }
}

/* Status indicators for My Bets */
.status-indicator {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-indicator.open {
    background: #28a745;
    color: white;
}

.status-indicator.locked {
    background: #6c757d;
    color: white;
}


/* Payout display styles */
.payout-display {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #ffeaa7;
    margin: 5px 0;
}

.bet-payout {
    color: #28a745;
    font-size: 1rem;
    font-weight: 600;
    margin: 5px 0;
}

.bet-details .bet-payout {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bet-details .bet-payout::before {
    content: "💰";
    font-size: 0.8rem;
}


.bet-profit {
    color: #007bff;
    font-size: 1rem;
    font-weight: 600;
    margin: 5px 0;
}

.bet-details .bet-profit {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bet-details .bet-profit::before {
    content: "📈";
    font-size: 0.8rem;
}

/* Leaderboard styles */
.data-notice {
    text-align: center;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: #fff3cd;
    color: #856404;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
}

.leaderboard-content {
    padding: 0 20px 20px;
}

.leaderboard-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.leaderboard-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.leaderboard-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-table th.rank-col {
    width: 60px;
    text-align: center;
}

.leaderboard-table th.profit-col,
.leaderboard-table th.wins-col,
.leaderboard-table th.losses-col,
.leaderboard-table th.record-col {
    text-align: center;
    width: 100px;
}

.leaderboard-table th.user-col {
    text-align: left;
}

.leaderboard-row {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.leaderboard-row:hover {
    background: #f8f9fa;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-table td {
    padding: 16px 12px;
}

.rank-cell {
    text-align: center;
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.username {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.profit-cell {
    text-align: center;
}

.profit-amount {
    font-size: 1rem;
    font-weight: 700;
}

.profit-amount.positive {
    color: #28a745;
}

.profit-amount.negative {
    color: #dc3545;
}

.wins-cell,
.losses-cell,
.record-cell {
    text-align: center;
}

.win-count {
    color: #28a745;
    font-weight: 600;
}

.loss-count {
    color: #dc3545;
    font-weight: 600;
}

.record {
    font-weight: 600;
    color: #333;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-data p {
    font-size: 1.2rem;
    margin: 0;
}

/* Responsive leaderboard */
@media (max-width: 768px) {
    .leaderboard-table {
        font-size: 0.8rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .username {
        font-size: 0.75rem;
    }
    
    .profit-amount {
        font-size: 0.9rem;
    }
}

/* Partial bet acceptance styles */
.accept-bet-controls {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.partial-amount-input {
    width: 120px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: right;
}

.partial-amount-input:focus {
    outline: none;
    border-color: #007bff;
}

.accept-full-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
    min-width: 100px;
}

.accept-full-button:hover {
    background: #218838;
    transform: translateY(-1px);
}

.already-accepted {
    background: #6c757d;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.accepted-amount {
    color: #28a745;
    font-weight: 600;
}

.remaining-amount {
    color: #fd7e14;
    font-weight: 600;
}

.acceptances-list {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.acceptance-item {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 4px;
}

.acceptance-item:last-child {
    margin-bottom: 0;
}

/* Bet card styling (shared by My Bets and Open Bets) */
.bet-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.bet-card:hover:not(.locked) {
    border-color: #667eea;
    transform: translateY(-2px);
}

.bet-card.locked {
    background: #f1f3f4;
    border-color: #6c757d;
    opacity: 0.8;
}

/* Bet header */
.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bet-matchup {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.bet-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.bet-status.open {
    background: #e3f2fd;
    color: #1976d2;
}

.bet-status.locked {
    background: #fff3e0;
    color: #f57c00;
}

.bet-status.completed {
    background: #e8f5e8;
    color: #2e7d32;
}

/* Bet details grid */
.bet-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.bet-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Bet meta footer */
.bet-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #666;
}

.bet-opponent {
    font-weight: 500;
}

.bet-timestamp {
    text-align: right;
    font-size: 0.85rem;
}

/* Bet actions section for open bets */
.bet-actions {
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 15px;
}

/* Bet acceptances section */
.bet-acceptances {
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 15px;
}

.acceptances-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .bet-card {
        padding: 20px 15px;
    }
    
    .bet-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .bet-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .bet-timestamp {
        text-align: left;
    }
    
    .accept-bet-controls {
        width: 100%;
        align-items: stretch;
    }
    
    .partial-amount-input {
        width: 100%;
    }
}

/* Custom Betting Styles */
.custom-bets-section {
    margin-top: 20px;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    color: white;
    font-size: 1.8rem;
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    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: white;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px 0 25px;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #333;
    font-size: 1.5rem;
    margin: 0;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #333;
}

/* Create Bet Form */
.create-bet-form {
    padding: 0 25px 25px 25px;
}

.create-bet-form .form-group {
    margin-bottom: 20px;
}

.create-bet-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.create-bet-form input,
.create-bet-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.create-bet-form input:focus,
.create-bet-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.create-bet-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    font-weight: normal;
    line-height: 1.4;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-secondary {
    padding: 12px 24px;
    border: 2px solid #6c757d;
    border-radius: 8px;
    background: white;
    color: #6c757d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #6c757d;
    color: white;
}

.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Custom Bet Cards */
.custom-bets-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.custom-bet-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-bet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.bet-header {
    margin-bottom: 15px;
}

.bet-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.bet-creator {
    color: #666;
    font-size: 0.9rem;
}

.bet-details {
    margin-bottom: 20px;
}

.bet-description {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.bet-line {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.1rem;
}

.bet-totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.side-total {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.side-total.over {
    background: #e8f5e8;
    border: 2px solid #28a745;
}

.side-total.under {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.matched-amount {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    background: #f8f9fa;
    border: 2px solid #6c757d;
}

.side-label,
.matched-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.side-amount,
.matched-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.bet-meta {
    color: #666;
    font-size: 0.9rem;
    margin-top: 20px;
    margin-left: 20px;
    padding-top: 20px;
    padding-left: 20px;
    border-top: 1px solid #e1e5e9;
    border-left: 1px solid #e1e5e9;
}

/* User Wager Display */
.user-wager-display {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.wager-info {
    font-weight: 600;
    color: #1565c0;
}

/* Betting Controls */
.betting-controls {
    border-top: 1px solid #e1e5e9;
    padding-top: 20px;
}

.bet-form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.amount-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount-input label {
    font-weight: 600;
    color: #555;
}

.wager-amount {
    width: 120px;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
}

.side-buttons {
    display: flex;
    gap: 10px;
}

.bet-side-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.over-btn {
    background: #28a745;
    color: white;
}

.over-btn:hover {
    background: #218838;
}

.under-btn {
    background: #ffc107;
    color: #212529;
}

.under-btn:hover {
    background: #e0a800;
}

/* Custom Bets in Open Bets */
.bet-card.custom-bet {
    border-left: 4px solid #17a2b8;
}

.bet-status.custom {
    background: #17a2b8;
    color: white;
}


.custom-bet-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.custom-amount-input {
    width: 120px;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
}

/* Responsive Design for Custom Bets */
@media (max-width: 768px) {
    .custom-bets-section {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .bet-totals {
        grid-template-columns: 1fr;
    }
    
    .bet-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .side-buttons {
        justify-content: center;
    }
    
    .custom-bet-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-amount-input {
        width: 100%;
    }
}

/* Mobile Navigation Styles */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.toggle-active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.toggle-active .hamburger:nth-child(2) {
    opacity: 0;
}

.toggle-active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Responsive Styles */
@media (max-width: 968px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 1rem;
        gap: 1rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 99;
    }
    
    .nav-links.nav-active {
        right: 0;
    }
    
    .nav-link {
        width: 100% !important;
        text-align: center !important;
        padding: 15px 20px !important;
        margin: 0 !important;
        border-radius: 8px !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        border: none !important;
        color: white !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        opacity: 1 !important;
    }
    
    .nav-link:hover {
        background: linear-gradient(135deg, #5a7bea 0%, #6b59a7 100%) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    
    .nav-dropdown {
        width: 100%;
        position: static;
    }
    
    .nav-dropdown .dropdown-toggle {
        width: 100% !important;
        text-align: center !important;
        padding: 15px 20px !important;
        margin: 0 0 0.5rem 0 !important;
        border-radius: 8px !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        border: none !important;
        display: block !important;
        color: white !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        opacity: 1 !important;
    }
    
    .nav-dropdown .dropdown-toggle:hover {
        background: linear-gradient(135deg, #5a7bea 0%, #6b59a7 100%) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        box-shadow: none;
        background: transparent;
        border-radius: 8px;
        margin: 0;
        padding: 0;
        transition: all 0.3s ease;
    }
    
    .mobile-dropdown-active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 300px;
        margin: 0.5rem 0 1rem 0;
        padding: 0.5rem 0;
    }
    
    .dropdown-item {
        width: calc(100% - 2rem) !important;
        text-align: center !important;
        padding: 10px 20px !important;
        color: white !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        border-radius: 6px !important;
        margin: 0.25rem 1rem !important;
        font-weight: 600 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
    }
    
    .dropdown-item:hover {
        background: linear-gradient(135deg, #5a7bea 0%, #6b59a7 100%) !important;
        color: white !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
    }
    
    .dropdown-arrow {
        display: inline-block;
        margin-left: 8px;
        transition: transform 0.3s ease;
    }
    
    .mobile-dropdown-active .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* Disable hover behavior on mobile */
    .nav-dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        padding: 0;
        margin: 0;
    }
    
    /* Only show when actively toggled */
    .nav-dropdown.mobile-dropdown-active:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 300px;
        margin: 0.5rem 0 1rem 0;
        padding: 0.5rem 0;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .nav-brand h1 {
        font-size: 1.3rem;
    }
    
    .nav-links {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .nav-link, .nav-dropdown .dropdown-toggle {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}

