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

:root {
    --primary-color: #00b368; /* Slightly darker green for light mode contrast */
    --secondary-color: #0095ff;
    --accent-color: #ff3e3e;
    
    /* Light Mode (Default) */
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.8);
    --text-main: #1a1d21;
    --text-muted: #656d76;
    --border-color: #e1e4e8;
    --ticker-bg: #ffffff;
    --footer-bg: #1a1d21;
    --bg-dark: #0f1520;
}

[data-theme="dark"] {
    --primary-color: #00ff88;
    --secondary-color: #00d4ff;
    --bg-body: #0a0e14;
    --bg-card: #161b22;
    --bg-nav: rgba(22, 27, 34, 0.8);
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --ticker-bg: #161b22;
    --footer-bg: #05070a;
}

body {
    /* Friendly note: We keep the same cinematic feel using a safe theme-relative fallback background. */
    background: radial-gradient(circle at 20% 20%, #1b2636 0%, #0f1520 35%, #090d14 100%);
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    transition: color 0.3s ease;
    padding: 30px 0;
}

/* Boxed Layout Wrapper */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-body); /* This will be white in light mode */
    box-shadow: 0 20px 80px rgba(0,0,0,0.8);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

[data-theme="dark"] .main-wrapper {
    background-color: var(--bg-body); /* This will be dark in dark mode */
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .small.text-muted,
[data-theme="dark"] .trending-item span.text-muted {
    color: #8b949e !important;
}

[data-theme="dark"] .card-sports .text-muted {
    color: #8b949e !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Featured Mosaic Grid */
.featured-mosaic .mosaic-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 100%;
    cursor: pointer;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.mosaic-item:hover img {
    transform: scale(1.05);
}

.mosaic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.mosaic-item.large {
    height: 408px; /* Approx matching 2 small items + gap */
}

.mosaic-item.small {
    height: 200px;
}

.mosaic-item h3 {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.3;
}

.mosaic-item h2 {
    font-size: 1.8rem;
}

/* Social Widgets */
.social-widget.fb .d-flex { background-color: #3b5998; color: white; }
.social-widget.tw .d-flex { background-color: #1da1f2; color: white; }
.social-widget.yt .d-flex { background-color: #ff0000; color: white; }

.social-widget .btn-light {
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 2px;
}

/* Navbar Theme Overrides */
.navbar {
    background-color: var(--footer-bg) !important; /* Keep navbar dark like original */
    padding: 0.5rem 0;
}

.navbar .nav-link {
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.navbar .navbar-brand {
    color: #ffffff !important;
}

.navbar .custom-logo {
    height: 40px;
    width: auto;
    max-width: 220px;
}

.navbar .nav-link img {
    object-fit: contain;
    filter: brightness(1.1);
    transition: transform 0.3s ease;
}

.navbar .menu-item-logo {
    width: auto;
    height: 20px;
    max-width: 24px;
    flex-shrink: 0;
}

.navbar .dropdown-menu {
    background-color: #1a1d21;
    min-width: 220px;
}

.navbar .dropdown-item {
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.navbar .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.navbar .nav-link:hover img {
    transform: scale(1.2);
}

#theme-toggle {
    color: #ffffff;
    transition: transform 0.3s ease;
}

#theme-toggle:hover {
    transform: rotate(30deg);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        gap: 0.25rem;
    }

    .navbar .dropdown-menu {
        background-color: transparent;
        box-shadow: none !important;
        padding-left: 0.75rem;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5rem;
    overflow: hidden;
    margin-top: 76px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, var(--bg-body), transparent);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.badge-live {
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* News Ticker */
.news-ticker {
    padding: 10px 0;
    font-size: 0.9rem;
    margin-top: -1px;
}

.ticker-inner {
    background: var(--ticker-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
}

.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    animation: ticker 30s linear infinite;
    color: var(--text-main);
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Post Cards */
.card-sports {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.card-sports:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.card-sports .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-sports:hover .card-img-top {
    transform: scale(1.05);
}

.card-sports .card-body {
    padding: 1.5rem;
}

.card-sports .card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card-sports .card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Category Badges */
.badge-category {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* Sidebar Styling */
.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.2rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 1.5rem;
}

.trending-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-img {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

/* Buttons */
.btn-premium {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--bg-dark);
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-premium:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transform: scale(1.05);
}

/* Footer */
footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem;
    color: #ffffff !important; /* Force white text */
}

footer a, 
footer p, 
footer li, 
footer div, 
footer span, 
footer h5, 
footer .text-muted {
    color: #ffffff !important;
    opacity: 0.8;
}

footer a:hover {
    opacity: 1;
    color: var(--primary-color) !important;
}

footer .btn-outline-secondary {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

footer .btn-outline-secondary:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #000000 !important;
}

.footer-logo {
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        height: 60vh;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
}

/* Single Post Page */
.single-article {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
}

.single-cover-wrap {
    max-height: 460px;
    overflow: hidden;
}

.single-cover {
    max-height: 460px;
    object-fit: cover;
}

.single-title {
    color: var(--text-main);
    font-size: clamp(1.7rem, 2.6vw, 2.6rem);
    line-height: 1.2;
}

.single-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.single-content {
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.06rem;
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.single-content iframe,
.single-content video {
    max-width: 100%;
    border-radius: 10px;
}

.single-content a {
    color: var(--secondary-color);
    word-break: break-word;
}

.single-footer strong {
    color: var(--text-main);
}

.post-navigation {
    margin-top: 1.5rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.premium-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.premium-post-nav .nav-card {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 16px 18px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.premium-post-nav .nav-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .premium-post-nav .nav-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.premium-post-nav .nav-next {
    text-align: right;
}

.premium-post-nav .nav-next .nav-copy {
    align-items: flex-end;
}

.premium-post-nav .nav-thumb {
    width: 86px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
}

.premium-post-nav .nav-copy {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.premium-post-nav .nav-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.76rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: 700;
    opacity: 0.95;
}

.post-navigation .nav-title {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.35;
    font-size: 1rem;
    text-wrap: balance;
}

@media (max-width: 767.98px) {
    .premium-post-nav {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .premium-post-nav .nav-next {
        text-align: left;
    }

    .premium-post-nav .nav-next .nav-copy {
        align-items: flex-start;
    }
}
