/* assets/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Dark Theme Variables (Default) */
    --bg-dark: #0f111a;
    --bg-card: #161a25;
    --bg-hover: #1c212f;
    --accent-color: #f79e05; /* Bright Orange/Yellow */
    --accent-hover: #e08e04;
    --text-main: #ffffff;
    --text-muted: #a0a5b5;
    --border-color: rgba(255, 255, 255, 0.05);
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

/* Light Theme Variables */
body.light-theme {
    --bg-dark: #f4f6fa;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    margin-top: 0;
    font-weight: 700;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Navbar */
header {
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    background: var(--accent-color);
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--accent-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    width: 180px;
    font-size: 0.85rem;
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
    user-select: none;
}

/* Mobile Sidebar Drawer */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
}

.mobile-sidebar.active {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-close {
    align-self: flex-end;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 5px 0;
}

.mobile-nav-links a.active, .mobile-nav-links a:hover {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: #000;
}

.btn:active {
    transform: scale(0.98);
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 120px 20px;
    background: radial-gradient(circle at center, rgba(30, 40, 60, 0.4) 0%, var(--bg-dark) 70%);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero h1 .highlight {
    color: var(--accent-color);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: -60px;
}

.stat-card {
    background: rgba(22, 26, 37, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-theme .stat-card {
    background: rgba(255, 255, 255, 0.9);
}

.stat-card .icon {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

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

/* Split Layout for Predictions */
.split-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.sidebar-filters .form-group {
    margin-bottom: 20px;
}

.sidebar-filters label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-filters input, .sidebar-filters select {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-won { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-lost { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-push { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); }

/* Table Wrapper for Responsiveness */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Footer */
footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 40px 30px;
    margin-top: 60px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-col h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: var(--text-muted);
}

.footer-col ul a:hover {
    color: var(--accent-color);
}

.newsletter-form {
    display: flex;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    margin-top: 15px;
}

.newsletter-form input {
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    flex-grow: 1;
    outline: none;
}

.newsletter-form button {
    background: var(--accent-color);
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.footer-bottom {
    max-width: 1400px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Dashboard & Grid Helpers ── */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── RESPONSIVE MEDIA QUERIES ── */

@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .navbar {
        padding: 0 20px;
    }
    .nav-links {
        display: none; /* Hide regular links, show hamburger */
    }
    .menu-toggle {
        display: block;
    }
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 20px;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }
    .split-layout {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .grid-2col, .grid-3col {
        grid-template-columns: 1fr;
    }
    /* Prevent table columns from wrapping and squeezing text on mobile */
    .table-responsive table th,
    .table-responsive table td {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .container {
        padding: 20px 15px;
    }
    .card {
        padding: 15px;
    }
}
