:root {
    --primary-bg: #0a1929;
    --secondary-bg: #132f4c;
    --card-bg: #1a2332;
    --accent-red: #dc2626;
    --accent-blue: #3b82f6;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

* {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header Styles */
.app-header {
    background-color: var(--secondary-bg);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* Button Styles */
button, .btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary, button:not(.btn-logout):not(.btn-secondary) {
    background-color: var(--accent-red);
    color: white;
}

.btn-primary:hover, button:not(.btn-logout):not(.btn-secondary):hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.btn-primary:disabled, button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-logout {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
}

.btn-logout:hover {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

/* Input Styles */
input[type="text"],
input[type="number"],
input[type="password"],
select {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Content Area */
.content {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Control Panel */
.control-panel {
    background-color: var(--secondary-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.control-panel label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.control-panel input[type="number"] {
    width: 4rem;
}

/* Week Header */
.week-header {
    margin-bottom: 1.5rem;
}

.week-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.week-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Game Card */
.game-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.game-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.game-matchup {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background-color: var(--secondary-bg);
}

.matchup-text {
    font-size: 1rem;
    font-weight: 600;
}

.game-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.pick-section {
    background-color: var(--secondary-bg);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.pick-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.pick-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--warning-orange);
}

.confidence {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.team-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notes {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

/* Status Messages */
.status-message {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 1rem 0;
}

.loading-message {
    color: var(--accent-blue);
    font-weight: 500;
}

.error-message {
    color: var(--accent-red);
    background-color: rgba(220, 38, 38, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid var(--accent-red);
}

/* Stats Sidebar (for future use) */
.stats-sidebar {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.stats-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success-green);
}

.invalid {
    outline: 1px solid var(--accent-red);
}

.validation-message {
    color: var(--accent-red);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: var(--accent-red);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {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DY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, var(--accent-red);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Loading Progress */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent-blue);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--text-primary);
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: var(--warning-orange);
    background-color: var(--card-bg);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-size: 0.875em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .app-header {
        padding: 0.75rem 1rem;
    }
    
    .app-title {
        font-size: 1.25rem;
    }
}


/* Prediction Outcome Styles */
.game-card.prediction-correct {
    border: 3px solid var(--success-green) !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.5) !important;
}

.game-card.prediction-correct:hover {
    border-color: var(--success-green) !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6) !important;
}

.game-card.prediction-incorrect {
    border: 3px solid var(--accent-red) !important;
    box-shadow: 0 0 16px rgba(220, 38, 38, 0.5) !important;
}

.game-card.prediction-incorrect:hover {
    border-color: var(--accent-red) !important;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.6) !important;

/* History Page Styles */
.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.week-section {
    margin-bottom: 2rem;
}

.prediction-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.result-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

.result-badge.correct {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-green);
    border: 1px solid var(--success-green);
}

.result-badge.incorrect {
    background-color: rgba(220, 38, 38, 0.2);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

/* Week Navigation */
.week-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
}

.week-display {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 120px;
    text-align: center;
}

.btn-nav {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-nav:hover:not(:disabled) {
    background-color: var(--secondary-bg);
    border-color: var(--accent-blue);
}

.btn-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Info Message */
.info-message {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-blue);
    margin: 1rem 0;
}

/* Final and Live Score Badges */
.final-score, .live-score, .upcoming-game {
    padding: 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.final-score {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.live-score {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-orange);
}

.upcoming-game {
    background-color: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}
}
