/* Matchday - Apple-inspired Dark Theme */

:root {
    --apple-blue: #2997ff;
    --bg-dark: #000;
    --card-bg: #1a1a1a;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark) !important;
    color: white !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

/* Override Bootstrap's text-muted for dark theme */
.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

h1 {
    font-size: 2.8rem;
    background: #ffffff;
    -webkit-background-clip: text;
    background-clip: text;
}

h2 {
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
}

h2:after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    bottom: -8px;
    left: 0;
    background: linear-gradient(90deg, var(--apple-blue), transparent);
    border-radius: 2px;
}

/* Navbar */
.navbar {
    background-color: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: white !important;
}

.btn-outline-light, .btn-outline-danger {
    border-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: var(--apple-blue);
    border-color: var(--apple-blue);
    transform: translateY(-2px);
}

.btn-outline-danger:hover {
    transform: translateY(-2px);
}

/* Cards */
.card {
    background-color: var(--card-bg) !important;
    border-radius: 16px !important;
    padding: 28px;
    margin-bottom: 28px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    opacity: 0;
    animation: fadeIn 0.6s forwards;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-header {
    background-color: transparent !important;
    border-bottom: none !important;
    font-weight: 600;
    color: white !important;
    padding: 0 !important;
}

.card-body {
    color: rgba(255, 255, 255, 0.85);
}

/* Collapsible Headers */
.card-header .btn-link {
    font-size: 1rem;
    font-weight: 600;
    color: white !important;
    text-decoration: none;
}

.card-header .btn-link:hover {
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

.card-header .btn-link:focus {
    box-shadow: none;
}

.card-header i {
    transition: transform 0.3s ease;
    color: var(--apple-blue);
}

/* Buttons */
.btn-primary {
    background-color: var(--apple-blue) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #1a8ae6 !important;
    transform: translateY(-3px);
}

.btn-outline-secondary {
    background-color: var(--card-bg) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: var(--apple-blue) !important;
    border-color: var(--apple-blue) !important;
    transform: translateY(-3px);
}

/* Forms */
.form-control {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 8px;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--apple-blue) !important;
    box-shadow: 0 0 0 0.2rem rgba(41, 151, 255, 0.25) !important;
    color: white !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-text, .form-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.nav-tabs .nav-link {
    color: rgba(255, 255, 255, 0.6) !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: white !important;
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}

.nav-tabs .nav-link.active {
    color: var(--apple-blue) !important;
    background-color: transparent !important;
    border-bottom-color: var(--apple-blue) !important;
    font-weight: 600;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(41, 151, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.alert-info {
    background-color: rgba(41, 151, 255, 0.15);
    border-color: rgba(41, 151, 255, 0.3);
    color: white;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: white;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.3);
    color: white;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: white;
}

.alert .btn-close {
    filter: invert(1);
}

/* Table */
.table {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.9rem;
}

.table th {
    background-color: rgba(255, 255, 255, 0.05) !important;
    font-weight: 600;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.table-bordered {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

/* Override pandas-generated table styles */
.table-responsive table,
.table-responsive table td,
.table-responsive table th {
    background-color: var(--card-bg) !important;
    color: white !important;
}

.table-responsive table thead th {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Modal */
.modal-content {
    background-color: var(--card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
}

.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.spinner-border {
    color: var(--apple-blue) !important;
}

/* Footer */
.footer {
    margin-top: auto;
    background-color: rgba(0, 0, 0, 0.9) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
    color: var(--apple-blue) !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 80px 20px 40px;
    position: relative;
    overflow: hidden;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    animation: float 4s ease-in-out infinite;
}

.hero-section .lead {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7) !important;
    max-width: 700px;
    margin: 0 auto;
}

/* Download Buttons */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.download-btn {
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    border: 1px solid rgba(41, 151, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    color: white !important;
    text-decoration: none;
    display: block;
}

.download-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(41, 151, 255, 0.15);
    border-color: rgba(41, 151, 255, 0.4);
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .card-body {
        padding: 1rem;
    }
}
