/* AI Horse Racing Tips - Modern Dark Theme */

/* Base styling */
body {
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* Navigation */
.navbar-dark {
    background-color: #000000 !important;
    border-bottom: 2px solid #00d084;
}

.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.navbar-brand {
    font-weight: 700;
    color: #00d084 !important;
    padding: 0.25rem 0;
}

.navbar-brand:hover {
    color: #00b574 !important;
}

/* Date tabs styling */
.nav-tabs {
    border-bottom: 2px solid #333333;
    margin-bottom: 1rem;
}

.nav-tabs .nav-link {
    background-color: #2a2a2a;
    border: 1px solid #333333;
    color: #ffffff;
    margin-right: 0.25rem;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: #00d084;
    background-color: #333333;
    color: #00d084;
}

.nav-tabs .nav-link.active {
    background-color: #00d084;
    border-color: #00d084;
    color: #000000;
    font-weight: 600;
}

/* Filter controls */
.filter-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.filter-group .badge {
    white-space: nowrap;
    font-size: 0.8rem;
}

.btn-outline-success {
    color: #00d084;
    border-color: #00d084;
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-success:hover,
.btn-outline-success.active {
    background-color: #00d084;
    border-color: #00d084;
    color: #000000;
}

.btn-outline-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 208, 132, 0.25);
}

/* Mobile responsive filters */
@media (max-width: 768px) {
    .filter-group {
        flex-wrap: wrap;
        margin-bottom: 1rem;
    }
    
    .filter-group .btn-group {
        margin-top: 0.25rem;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Cards and sections */
.race-card {
    border: 1px solid #333333;
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: #2a2a2a;
}

.race-card:hover {
    box-shadow: 0 8px 25px rgba(0, 208, 132, 0.15);
    transform: translateY(-3px);
    border-color: #00d084;
}

.race-card .card-header {
    background-color: #000000 !important;
    border-bottom: 2px solid #00d084;
    border-radius: 12px 12px 0 0 !important;
}

.race-card .card-header h5 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #ffffff;
}

.race-details {
    font-size: 0.9rem;
}

/* Tables */
.runners-table {
    margin-bottom: 0;
    background-color: #2a2a2a;
}

.runners-table th {
    background-color: #333333 !important;
    border-bottom: 2px solid #00d084;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #00d084;
}

.runners-table td {
    border-bottom: 1px solid #444444;
    font-size: 0.9rem;
    vertical-align: middle;
    background-color: #2a2a2a;
    color: #ffffff;
}

.runners-table tbody tr:hover {
    background-color: #333333 !important;
}

.runner-number {
    font-weight: 700;
    color: #00d084;
    padding: 4px 8px;
    background-color: #000000;
    border-radius: 6px;
    border: 1px solid #00d084;
}

/* Badges and highlights */
.badge {
    font-size: 0.8rem;
    padding: 0.4em 0.6em;
    border-radius: 6px;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-success {
    background-color: #00d084 !important;
    color: #000000 !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-light {
    background-color: #f8f9fa !important;
    color: #000000 !important;
}

/* Tab styling */
#racecard-tabs .nav-link {
    color: #ffffff;
    border: 2px solid transparent;
    font-weight: 600;
    background-color: #333333;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
}

#racecard-tabs .nav-link.active {
    background-color: #00d084;
    color: #000000;
    border-color: #00d084;
}

#racecard-tabs .nav-link:hover:not(.active) {
    background-color: #444444;
    border-color: #555555;
    color: #00d084;
}

/* Loading and error states */
#loading-indicator {
    margin: 2rem 0;
    color: #00d084;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-color: #00d084;
    border-right-color: transparent;
}

.alert-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #ffffff;
}

/* Text colors */
.text-success {
    color: #00d084 !important;
}

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

/* Container styling */
.racecard-container {
    padding: 0 15px;
}

.container-fluid {
    background-color: #1a1a1a;
}

/* Footer */
footer {
    background-color: #000000 !important;
    border-top: 2px solid #00d084;
    margin-top: 3rem;
}

/* Course section headers */
.course-header {
    color: #00d084;
    font-weight: 700;
    border-bottom: 2px solid #00d084;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Form elements */
code {
    background-color: #000000;
    color: #00d084;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .racecard-container {
        padding: 0 5px;
    }
    
    .race-card .card-header .row {
        text-align: center;
    }
    
    .race-card .card-header .col-md-4 {
        margin-top: 0.5rem;
    }
    
    .runners-table {
        font-size: 0.8rem;
    }
    
    .runners-table th,
    .runners-table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Hide less important columns on mobile, but keep odds column visible */
    .runners-table th:nth-child(n+8):not(:nth-child(11)),
    .runners-table td:nth-child(n+8):not(:nth-child(11)) {
        display: none;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        height: 30px;
        max-width: 150px;
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.race-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Print styles */
@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .race-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        border: 1px solid #000000 !important;
    }
    
    .race-card .card-header {
        background-color: #000000 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .nav-tabs, footer {
        display: none;
    }
}

/* AI Theme accents */
.lightning-accent::before {
    content: "⚡";
    color: #00d084;
    margin-right: 0.5rem;
}

/* Hover effects for better UX */
.btn:hover, .nav-link:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #00d084;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00b574;
}

/* Course Cards - Homepage AI Tips */
.course-card {
    transition: all 0.3s ease;
    border: 1px solid #333333;
    background-color: #2a2a2a;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 208, 132, 0.3) !important;
    border-color: #00d084;
}

.course-card .card-header {
    background: linear-gradient(135deg, #00d084, #00b574) !important;
    border-bottom: none;
}

.course-card .card-body {
    background-color: #2a2a2a;
    color: #ffffff;
}

.course-card .card-footer {
    background-color: #333333;
    border-top: 1px solid #444444;
    color: #cccccc;
}

.course-card .race-title {
    color: #00d084;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.course-card .race-details .badge {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}

.course-card .tip-preview p {
    color: #cccccc;
    font-size: 0.9rem;
}

.course-card .btn-primary {
    background: linear-gradient(135deg, #00d084, #00b574);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.course-card .btn-primary:hover {
    background: linear-gradient(135deg, #00b574, #009960);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 208, 132, 0.4);
}

.course-card .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #00d084 !important;
    font-weight: 600;
}