/* Mobile-First CSS for FootyPredict */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Native App-Like Behaviors */
html, body {
    /* Prevent overscroll/bounce on iOS */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    
    /* Disable text selection for app-like feel */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Disable tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
}

/* Allow text selection in input fields and content areas */
input, textarea, .selectable-text, .prediction-result, .team-stats {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    font-size: 16px;
}

/* Mobile Navigation */
.mobile-nav {
    background: #2c3e50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* New Navbar Styles */
.navbar {
    background: #2c3e50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

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

.nav-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border: none;
    background: none;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: 0.3s;
}

.nav-menu {
    display: none;
    flex-direction: column;
    background: #34495e;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
}

.nav-menu.active {
    display: flex;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 1rem;
    border-bottom: 1px solid #2c3e50;
    transition: all 0.3s;
    font-weight: 600;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    background-color: #3498db;
    color: white;
}

/* Navbar specific nav-menu styles */
.navbar .nav-menu {
    position: static;
    background: transparent;
    flex-direction: row;
    width: auto;
}

.navbar .nav-link {
    padding: 0.75rem 1.25rem;
    border-bottom: none;
    border-radius: 6px;
    margin: 0 2px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

.navbar .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.navbar .nav-link.active {
    background: #3498db;
    color: white;
}

/* Container and Layout */
.container {
    max-width: 100%;
    padding: 1rem;
    margin: 0 auto;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: #1e90ff;
    font-size: 1.35rem;
    font-weight: 600;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e90ff;
    font-size: 1.1rem;
}

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

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.form-control.inline {
    width: auto;
    display: inline-block;
    margin-left: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

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

/* Prediction Results */
.prediction-results {
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.match-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.prediction-main {
    margin-bottom: 2rem;
}

.outcome-probs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.prob-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    font-weight: bold;
}

.prob-item .label {
    font-weight: bold;
    flex: 1;
    color: white;
}

.prob-item .prob {
    font-weight: bold;
    color: white;
    margin-right: 1rem;
}

.prob-item .odds {
    background: #e74c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.calibration-badge {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.badge-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.badge-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Card Sections */
.card-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.card-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.collapsible .collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.collapse-icon {
    transition: transform 0.3s;
}

.collapsible.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    margin-top: 1rem;
    transition: max-height 0.3s ease;
}

.collapsible.collapsed .collapsible-content {
    display: none;
}

/* Over/Under Section */
.ou-controls {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ou-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ou-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

/* BTTS Section */
.btts-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btts-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

/* Expected Goals */
.xg-display {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.xg-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
}

.xg-item .value {
    font-weight: bold;
    font-size: 1.2rem;
}

/* Scorelines */
.scorelines-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scoreline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

/* Value Bets */
.value-bets-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.value-bet-item {
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    font-weight: bold;
}

.value-bet-item.high-value {
    border-left-color: #e74c3c;
}

.value-bet-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: white;
}

.kelly-suggestion {
    font-size: 0.9rem;
    color: white;
    font-weight: bold;
}

/* Factors */
.factors-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.factor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.factor-impact {
    font-weight: bold;
}

.factor-impact.positive {
    color: #27ae60;
}

.factor-impact.negative {
    color: #e74c3c;
}

/* Charts */
.chart-container {
    position: relative;
    height: 250px;
    margin: 1rem 0;
}

.form-sparklines {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.sparkline-item {
    text-align: center;
}

.sparkline-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.sparkline-item canvas {
    max-height: 60px;
}

/* Favorites & Recent */
.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    flex: 1;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    margin-top: 1rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.match-item {
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.match-item:hover {
    background: #e9ecef;
}

.empty-state {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Model Performance Display */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.performance-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.2s ease;
}

.performance-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.performance-card h4 {
    color: var(--accent-color);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.performance-metrics {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.metric {
    text-align: center;
    flex: 1;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.metric-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.metric-value.score-excellent {
    color: #22c55e;
}

.metric-value.score-good {
    color: #3b82f6;
}

.metric-value.score-average {
    color: #f59e0b;
}

.metric-value.score-poor {
    color: #ef4444;
}

.performance-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.performance-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #3b82f6);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Backtest Styles */
.backtest-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.backtest-controls .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.metric-label {
    font-size: 1rem;
    display: block;
    margin-top: 0.25rem;
}

.metric-desc {
    font-size: 0.8rem;
    opacity: 0.8;
    display: block;
    margin-top: 0.25rem;
}

.chart-desc {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

.roi-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.roi-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.comparison-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comparison-item {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.comparison-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.stat {
    display: flex;
    justify-content: space-between;
}

.value-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.value-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.export-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Team Analysis Styles */
.team-header {
    text-align: center;
}

.team-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    color: #666;
}

.team-stats-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.stat-item {
    text-align: center;
}

.stat-item .value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

.stat-item .label {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

.radar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.attack {
    background: #e74c3c;
}

.legend-color.defense {
    background: #3498db;
}

.legend-color.form {
    background: #27ae60;
}

.form-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-results {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.form-result {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.8rem;
}

.form-result.w {
    background: #27ae60;
}

.form-result.d {
    background: #f39c12;
}

.form-result.l {
    background: #e74c3c;
}

.form-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.fixtures-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fixture-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.fixture-date {
    font-size: 0.9rem;
    color: #666;
}

.fixture-match {
    font-weight: 500;
}

.fixture-venue {
    font-size: 0.9rem;
    color: #3498db;
}

.performance-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.performance-side h4 {
    text-align: center;
    margin-bottom: 0.75rem;
    color: #3498db;
}

.perf-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.perf-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.h2h-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.h2h-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.h2h-matches {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.h2h-match {
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.h2h-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.h2h-result {
    font-weight: 500;
}

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

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

.standings-table th,
.standings-table td {
    padding: 0.5rem 0.25rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.standings-table th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.standings-table tr.current-team {
    background: #e8f4fd;
    font-weight: 500;
}

.standings-table tr.current-team td {
    border-top: 2px solid #3498db;
    border-bottom: 2px solid #3498db;
}

/* Admin Styles */
.admin-header {
    text-align: center;
}

.message {
    border-left: 4px solid #3498db;
}

.message.success {
    border-left-color: #27ae60;
    background: #d5f4e6;
}

.message.error {
    border-left-color: #e74c3c;
    background: #fdf2f2;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-item {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.status-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.status-label {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.status-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 6px;
    font-weight: bold;
}

.status-info p {
    margin-bottom: 0.5rem;
}

.actions-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-form {
    text-align: center;
}

.action-form p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.config-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-item {
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

.logs-container {
    max-height: 300px;
    overflow-y: auto;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.log-entry {
    padding: 0.25rem 0;
    border-bottom: 1px solid #34495e;
}

.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
    .container {
        max-width: 750px;
        padding: 1.5rem;
    }
    
    /* Hide mobile navigation elements */
    .hamburger,
    .nav-toggle {
        display: none !important;
    }
    
    /* Show desktop navigation */
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        background: transparent !important;
        gap: 0;
        position: static !important;
        width: auto !important;
    }
    
    .navbar .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        background: transparent !important;
        gap: 10px;
        position: static !important;
        width: auto !important;
    }
    
    .nav-link {
        border-bottom: none;
        border-radius: 4px;
        margin: 0 0.25rem;
    }
    
    .outcome-probs {
        flex-direction: row;
        gap: 1rem;
    }
    
    .prob-item {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .ou-results,
    .btts-results {
        flex-direction: row;
        gap: 1rem;
    }
    
    .ou-item,
    .btts-item {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .xg-display {
        flex-direction: row;
        gap: 1rem;
    }
    
    .xg-item {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .form-sparklines {
        flex-direction: row;
        gap: 2rem;
    }
    
    .sparkline-item {
        flex: 1;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comparison-grid {
        flex-direction: row;
    }
    
    .comparison-item {
        flex: 1;
    }
    
    .export-buttons {
        flex-direction: row;
    }
    
    .team-meta {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .form-display {
        flex-direction: row;
        align-items: center;
    }
    
    .form-results {
        justify-content: center;
    }
    
    .performance-comparison {
        flex-direction: row;
        gap: 2rem;
    }
    
    .performance-side {
        flex: 1;
    }
    
    .h2h-summary {
        flex-direction: row;
    }
    
    .h2h-stat {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .status-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .actions-grid {
        flex-direction: row;
    }
    
    .action-form {
        flex: 1;
    }
    
    .tools-grid {
        flex-direction: row;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
        padding: 2rem;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .btn-large {
        width: auto;
        padding: 1rem 2rem;
    }
    
    .results-header {
        flex-wrap: nowrap;
    }
    
    .match-actions {
        flex-wrap: nowrap;
    }
}

/* Mobile Navigation - Force hamburger menu on all small screens */
@media (max-width: 767px) {
    /* Show hamburger/nav-toggle on mobile */
    .hamburger,
    .nav-toggle {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Hide navigation menu by default on mobile */
    .nav-menu {
        display: none !important;
    }
    
    .navbar .nav-menu {
        display: none !important;
    }
    
    /* Show navigation when active */
    .nav-menu.active {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #34495e !important;
        z-index: 1001 !important;
    }
    
    .navbar .nav-menu.active {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #34495e !important;
        z-index: 1001 !important;
    }
    
    /* Ensure nav links stack properly on mobile */
    .nav-link {
        display: block !important;
        padding: 1rem !important;
        border-bottom: 1px solid #2c3e50 !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .navbar .nav-link {
        display: block !important;
        padding: 1rem !important;
        border-bottom: 1px solid #2c3e50 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }
}

/* Print Styles */
@media print {
    .mobile-nav,
    .loading-overlay,
    .btn,
    .hamburger {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .spinner {
        border-width: 2px;
    }
    
    .form-result {
        font-size: 0.7rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .card {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .form-control {
        background: #3d3d3d;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .prob-item,
    .ou-item,
    .btts-item,
    .form-stat,
    .perf-stat,
    .h2h-stat,
    .roi-item,
    .value-stat,
    .config-item {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
        font-weight: bold !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Keyboard Navigation */
.btn:focus,
.form-control:focus,
.nav-link:focus,
.tab-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Error States */
.form-control.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Success States */
.form-control.success {
    border-color: #27ae60;
}

.success-message {
    color: #27ae60;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}
