/* Global Styles */
:root {
    /* Light Theme Colors */
    --primary-color: #013369; /* NFL Blue */
    --primary-color-rgb: 1, 51, 105; /* NFL Blue in RGB */
    --secondary-color: #d50a0a; /* NFL Red */
    --background-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --card-bg-color: #ffffff;
    --header-bg-color: #013369;
    --header-text-color: #ffffff;
    --sidebar-bg-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

/* Dark Theme Colors */
.dark-theme {
    --primary-color: #1e53a0;
    --primary-color-rgb: 30, 83, 160;
    --secondary-color: #ff3c3c;
    --background-color: #1a1a1a;
    --text-color: #f5f5f5;
    --border-color: #444;
    --card-bg-color: #2c2c2c;
    --header-bg-color: #0c1f3d;
    --header-text-color: #f5f5f5;
    --sidebar-bg-color: #252525;
    --success-color: #5cb85c;
    --danger-color: #ff4a56;
    --warning-color: #ffc721;
    --info-color: #47b8d1;
    --settings-text-color: #f0f0f0;
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hidden {
    display: none !important;
}

/* Authentication Section */
#auth-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--header-bg-color);
    color: var(--header-text-color);
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.auth-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s;
    width: 100%;
}

.auth-btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.guest-login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.guest-login-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.guest-login-link a:hover {
    color: white;
    text-decoration: underline;
}

/* Form Styles */
.auth-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-weight: 500;
    text-align: left;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 16px;
    transition: all 0.3s;
}

/* Style for select dropdowns to make text visible */
select.form-control {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

select.form-control option {
    background-color: var(--header-bg-color);
    color: white;
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.15);
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.auth-links {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-switch, .forgot-password {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.form-switch a, .forgot-password a {
    color: white;
    text-decoration: underline;
    cursor: pointer;
}

.form-switch a:hover, .forgot-password a:hover {
    text-decoration: none;
}

.auth-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 15px 0;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-separator span {
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Dashboard */
header {
    background-color: var(--header-bg-color);
    color: var(--header-text-color);
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
}

.site-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mode-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

.mode-badge.demo {
    background-color: var(--warning-color);
}

.mode-badge.live {
    background-color: var(--success-color);
}

.user-info {
    display: flex;
    align-items: center;
    margin-right: 20px;
    font-weight: 500;
}

/* Remove the old logout button styles as it's now in the settings menu */

/* Navigation Bar */
.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: flex-end;
    margin-right: 0;
    padding-right: 0;
}

.nav-link {
    color: var(--header-text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--header-text-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    font-weight: 700;
}

.nav-link.active::after {
    width: 100%;
}

/* Settings Menu */
.settings-dropdown {
    position: relative;
    display: inline-block;
    margin-left: auto;
    margin-right: 0;
}

.settings-btn {
    background-color: transparent;
    border: none;
    color: var(--header-text-color);
    cursor: pointer;
    font-size: 18px;
}

.settings-content {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background-color: var(--card-bg-color);
    min-width: 280px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    padding: 0;
    color: var(--text-color);
}

/* Removed hover display for settings menu - now controlled by JS */

.settings-section {
    padding: 15px;
}

.settings-heading {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-color);
    opacity: 0.9;
    font-weight: 600;
}

.settings-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0;
}

.settings-btn-full {
    width: 100%;
    padding: 8px 12px;
    margin-top: 12px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.settings-btn-full:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.user-avatar {
    font-size: 24px;
    color: var(--primary-color);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-email {
    font-size: 12px;
    opacity: 0.7;
}

.theme-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-option {
    padding: 8px 12px;
    border-radius: 4px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    color: var(--text-color);
}

.theme-option:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
}

.theme-option.active {
    background-color: rgba(var(--primary-color-rgb), 0.2);
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

/* Notification settings styles */
.notification-settings {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-option {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-option:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
}

.notification-label {
    font-weight: 600;
    margin-left: 8px;
    font-size: 14px;
}

.notification-description {
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.7;
    margin-left: 24px;
}

.notification-checkbox {
    vertical-align: middle;
}

.dark-theme .theme-option {
    color: var(--settings-text-color);
}

.dark-theme .theme-option i {
    color: var(--settings-text-color);
}

.dark-theme .theme-option.active {
    background-color: rgba(var(--primary-color-rgb), 0.4);
    color: var(--header-text-color);
}

/* Week Selector */
.week-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.week-selector button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--primary-color);
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-around;
    background-color: var(--card-bg-color);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.status-item .label {
    font-weight: bold;
    color: var(--primary-color);
}

/* Team Selection */
.team-selection {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.selection-info {
    margin-bottom: 15px;
    color: var(--text-color);
    opacity: 0.8;
}

.future-week-message {
    color: var(--warning-color);
    font-weight: 600;
    border-left: 3px solid var(--warning-color);
    padding-left: 10px;
    margin-bottom: 20px;
}

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

.team-card {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: var(--card-bg-color);
}

.team-card:hover:not(.disabled) {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.team-card.selected {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.team-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.team-card.previously-picked {
    opacity: 0.7;
    background-color: rgba(var(--primary-color-rgb), 0.05);
    border: 1px dashed var(--border-color);
}

.team-card .team-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 5px;
}

.team-card .team-abbr {
    font-weight: bold;
}

.selection-confirmation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.selection-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.change-pick-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.change-pick-link:hover {
    text-decoration: underline;
}

#confirm-selection {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#confirm-selection:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Odds Section */
.odds-section {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.odds-card {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 2fr;
    align-items: center;
    gap: 10px;
}

.odds-teams {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.odds-team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.odds-logo {
    width: 25px;
    height: 25px;
}

.odds-value {
    text-align: center;
    font-weight: bold;
}

.odds-spread {
    text-align: center;
}

.odds-details {
    text-align: right;
}

.positive-odds {
    color: var(--success-color);
}

.negative-odds {
    color: var(--danger-color);
}

/* Weather Section */
.weather-section {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.weather-card {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s;
}

/* Removed hover effects on weather cards */

.game-teams {
    padding-right: 15px;
}

.game-matchup {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.game-stadium, .game-time {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

.weather-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.weather-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.weather-icon {
    font-size: 24px;
    color: var(--primary-color);
}

.weather-temp {
    font-size: 20px;
    font-weight: bold;
}

.weather-details {
    font-size: 14px;
}

.weather-condition {
    margin-bottom: 3px;
}

.weather-precip, .weather-wind {
    opacity: 0.8;
}

.no-data-message {
    text-align: center;
    padding: 20px;
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
}

/* Participants Table */
.participants-table {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.table-container {
    overflow-x: auto;
}

#participants-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

#participants-table th, 
#participants-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

#participants-table th {
    background-color: var(--primary-color);
    color: white;
}

#participants-table tbody tr:hover:not(.placeholder-row) {
    background-color: rgba(0,0,0,0.1);
}

.placeholder-row {
    height: 42px; /* Matches the height of regular rows */
    opacity: 0.6;
    display: table-row !important; /* Force display */
    transition: opacity 0.5s ease-in-out; /* Add transition for smoother appearance/disappearance */
}

/* Add fade-in animation for the entire table */
#participants-table tbody tr {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.active-status {
    color: var(--success-color);
}

.eliminated-status {
    color: var(--danger-color);
}

.blurred-pick {
    filter: blur(4px);
    user-select: none;
}

.winning-pick {
    color: var(--success-color);
    font-weight: bold;
}

.losing-pick {
    color: var(--danger-color);
    text-decoration: line-through;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
}

.close-modal:hover {
    opacity: 1;
}

.mt-10 {
    margin-top: 10px;
}

.reset-result, .verification-code-display {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

.reset-result.hidden, .hidden {
    display: none;
}

#temp-password, #verification-code-display {
    font-weight: bold;
    font-family: monospace;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 3px 6px;
    border-radius: 3px;
    color: var(--primary-color);
    font-size: 18px;
    letter-spacing: 1px;
    display: inline-block;
    margin: 5px 0;
}

.reset-note, .verification-note {
    font-size: 13px;
    font-style: italic;
    margin-top: 10px;
    opacity: 0.8;
    color: var(--text-color);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--card-bg-color);
    color: var(--text-color);
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 1000;
    max-width: 350px;
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.toast-icon {
    font-size: 24px;
    margin-right: 15px;
    color: var(--success-color);
}

.toast-message {
    font-size: 16px;
    font-weight: 500;
}

.toast-progress {
    height: 4px;
    background-color: var(--primary-color);
    width: 0;
    transition: width 3s linear;
}

.toast-notification.show .toast-progress {
    width: 100%;
}

/* Footer Styles */
.page-footer {
    background-color: transparent;
    color: #555;
    padding: 15px 0;
    text-align: center;
    margin-top: 40px;
}

.page-footer p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .status-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .selection-confirmation {
        flex-direction: column;
        gap: 10px;
    }
    
    .odds-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .odds-teams {
        align-items: center;
    }
    
    .odds-details {
        text-align: center;
    }
    
    .main-nav {
        margin: 10px 0 0 0;
    }
    
    header .container {
        flex-direction: column;
    }
    
    .user-info {
        margin-top: 10px;
    }
}