/* Racing-themed styles inspired by Name That Horse logo */

body {
    background: linear-gradient(135deg, #f4e4a1 0%, #f0d882 25%, #e8c547 75%, #d4af37 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2c1810;
}

.container {
    max-width: 900px;
}

/* Racing-themed card styling */
.card {
    border: 2px solid #8b4513;
    border-radius: 12px;
    background: linear-gradient(145deg, #faf8f3 0%, #f5f2e8 100%);
    box-shadow: 0 6px 12px rgba(139, 69, 19, 0.2);
    margin-bottom: 1rem;
}

/* Mode selection cards */
.mode-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
    border-color: #a0522d;
}

.mode-card .display-4 {
    transition: all 0.3s ease;
}

.mode-card:hover .display-4 {
    transform: scale(1.1);
}

/* Align mode card content with flexbox */
.mode-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mode-card .btn {
    margin-top: auto;
    white-space: nowrap;
}

/* Smaller font for mode buttons to fit on one line */
#start-daily-challenge,
#start-classic-game {
    font-size: 0.9rem;
}

.game-card {
    border: 3px solid #a0522d;
    background: linear-gradient(145deg, #ffffff 0%, #faf8f3 100%);
    box-shadow: 0 8px 16px rgba(160, 82, 45, 0.25);
}

.card-header {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #ffffff;
    border-bottom: 2px solid #654321;
    font-weight: 600;
}

/* Racing-themed stat cards */
.card.bg-primary {
    background: linear-gradient(135deg, #4a7c59 0%, #5d8f6b 100%) !important;
    border: 2px solid #3e6b4a;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(74, 124, 89, 0.3);
}

.card.bg-info {
    background: linear-gradient(135deg, #ff7f00 0%, #ff9500 100%) !important;
    border: 2px solid #e06700;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(255, 127, 0, 0.3);
}

.card.bg-success {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%) !important;
    border: 2px solid #654321;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
}

/* Racing-themed button styling */
.btn {
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ff7f00 0%, #ff9500 100%);
    border-color: #e06700;
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e06700 0%, #ff7f00 100%);
    border-color: #cc5500;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #4a7c59 0%, #5d8f6b 100%);
    border-color: #3e6b4a;
    color: #ffffff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #3e6b4a 0%, #4a7c59 100%);
    border-color: #2d5237;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #d4af37 0%, #f0d882 100%);
    border-color: #b8941f;
    color: #2c1810;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #b8941f 0%, #d4af37 100%);
    border-color: #9d7f1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    border-color: #654321;
    color: #ffffff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #654321 0%, #8b4513 100%);
    border-color: #4a2f17;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #8a8680 0%, #a8a199 100%);
    border-color: #6f6c65;
    color: #ffffff;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #6f6c65 0%, #8a8680 100%);
    border-color: #5a5751;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Racing-themed form controls */
.form-control {
    border: 2px solid #a0522d;
    border-radius: 8px;
    background-color: #faf8f3;
    color: #2c1810;
    font-weight: 500;
}

.form-control:focus {
    border-color: #ff7f00;
    box-shadow: 0 0 0 0.3rem rgba(255, 127, 0, 0.25);
    background-color: #ffffff;
    outline: none;
}

/* Racing-themed alerts */
.alert {
    border-radius: 10px;
    border: 2px solid;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.alert-info {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4edda 100%);
    border-color: #4a7c59;
    color: #2c1810;
}

.alert-success {
    background: linear-gradient(135deg, #d4f4dd 0%, #c3e6cb 100%);
    border-color: #4a7c59;
    color: #1e5a28;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1c0c7 100%);
    border-color: #8b4513;
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #d4af37;
    color: #664d03;
}

/* Simple header styling */
.display-4 {
    color: #333333;
    font-weight: 600;
}

.text-muted {
    color: #6c757d !important;
}

/* Racing-themed leaderboard styling */
.leaderboard-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #faf8f3 0%, #f0ede2 100%);
    border: 2px solid #a0522d;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(139, 69, 19, 0.15);
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #d4af37 0%, #f0d882 100%);
    border-color: #b8941f;
    color: #2c1810;
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.leaderboard-rank {
    font-weight: bold;
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* Loading overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Racing-themed icon colors */
.text-warning {
    color: #ff7f00 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.fas, .fa {
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
}

/* Allow smooth racing-themed transitions */
.btn, .card, .form-control, .alert {
    transition: all 0.2s ease;
}

/* Stat cards styling */
.stat-card {
    min-height: auto;
}

.stat-card .card-body {
    padding: 0.75rem 0.5rem;
}

.stat-card h6 {
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stat-card .card-body {
        padding: 0.5rem 0.25rem;
    }
    
    .stat-card h6 {
        font-size: 0.65rem;
    }
    
    .stat-card h5 {
        font-size: 1rem;
    }
    
    .stat-card .fas {
        font-size: 0.75rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}