:root {
    --bg-color: #111;
    --card-bg: #1a1a1a;
    --text-color: #eee;
    --text-muted: #aaa;
    --accent-color: #00f2ea;
    /* Cyan/Teal accent */
    --accent-hover: #00c2bb;
    --secondary-accent: #ff0050;
    /* Pink accent for tags or highlights */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Oswald', sans-serif;
    --container-width: 1200px;
    --header-height: 80px;
    --gap: 20px;
}

[data-theme="light"] {
    --bg-color: #f4f4f4;
    --card-bg: #ffffff;
    --text-color: #333;
    --text-muted: #666;
    --accent-color: #008b8b;
    /* Darker Cyan for light mode */
    --accent-hover: #006666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--card-bg);
    height: auto;
    min-height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.header-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 0;
}

.main-nav-container {
    width: 100%;
    border-top: 1px solid #333;
    padding: 10px 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-box {
    position: relative;
    width: 80%;
    max-width: 600px;
}

.search-box input {
    width: 100%;
    padding: 20px;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent-color);
    color: white;
    font-family: var(--font-heading);
}

.search-box input:focus {
    outline: none;
}

.close-search {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section with Vertical Slider */
.hero-section {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--gap);
    height: 600px;
    /* Fixed height for slider containment */
}

.main-feature {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.main-feature img {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.main-feature:hover img {
    transform: scale(1.05);
}

.feature-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.category-tag {
    background-color: var(--secondary-accent);
    color: white;
    padding: 4px 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.feature-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 15px;
}

/* Vertical Slider */
.vertical-slider-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--text-muted);
}

.slider-header h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1.2rem;
}

.slider-nav button {
    background: #333;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-nav button:hover {
    background: var(--accent-color);
    color: #000;
}

.vertical-slider-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.vertical-slider {
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.5s ease;
}

.slider-item {
    display: flex;
    gap: 15px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.slider-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.slider-item img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
}

.slider-item-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    line-height: 1.3;
    font-weight: 600;
}

.slider-item-content .meta {
    font-size: 0.75rem;
}

/* Ad Areas */
.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--text-muted);
    color: var(--text-muted);
    font-family: monospace;
    margin: 40px 0;
    padding: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-leaderboard {
    height: 120px;
}

.ad-sidebar {
    height: 300px;
    margin-bottom: 30px;
}

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 30px;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background-color: var(--accent-color);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.news-card-img {
    height: 200px;
    position: relative;
}

.news-card-img img {
    width: 100%;
    height: 100%;
}

.news-card-content {
    padding: 20px;
}

.news-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar */
.sidebar-widget {
    margin-bottom: 40px;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--text-muted);
    padding-bottom: 10px;
    display: inline-block;
}

.popular-list {
    list-style: none;
}

.popular-list li {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.count {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1;
}

.popular-list h4 {
    font-size: 1rem;
    font-weight: 600;
}

/* Post Details Page */
.post-header {
    padding: 60px 0 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.post-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin: 20px 0;
    line-height: 1.2;
}

.post-meta-large {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.post-featured-img {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content p {
    margin-bottom: 25px;
}

.post-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 40px 0 20px;
    color: var(--text-color);
}

.post-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--text-color);
    margin: 40px 0;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 0 12px 12px 0;
}

.share-bar {
    display: flex;
    gap: 10px;
    margin: 40px 0;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-fb {
    background: #3b5998;
    color: white;
}

.share-tw {
    background: #1da1f2;
    color: white;
}

.share-wa {
    background: #25d366;
    color: white;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 60px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--text-muted);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 15px;
}

@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        height: auto;
    }

    .vertical-slider-container {
        height: 400px;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .post-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav-container {
        display: none;
        width: 100%;
        border-top: 1px solid #333;
    }

    .main-nav-container.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav ul li {
        width: 100%;
        border-bottom: 1px solid #222;
    }

    nav ul li a {
        padding: 15px 0;
        display: block;
    }

    /* Submenus on mobile */
    nav ul li:hover>ul {
        position: static;
        box-shadow: none;
        background: #222;
        padding-left: 20px;
        display: none;
        /* JS click to toggle? or just rely on CSS hover which is flaky on mobile */
    }

    /* Better to just show them or create a sub-toggle. 
       For now, let's just make them visible if parent hovered/clicked or just stack them. 
       Actually, standard simple mobile menu usually just stacks everything. */
    nav ul li ul {
        position: static;
        box-shadow: none;
        background: #151515;
        padding: 0;
    }

    nav ul li:hover>ul {
        display: block;
    }

    .hero-section {
        grid-template-columns: 1fr;
        height: auto;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        gap: 15px;
        font-size: 0.8rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Ad Rotator */
.ad-rotator {
    position: relative;
    width: 100%;
    height: 100%;
}

.ad-slide {
    display: none;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.5s ease-in-out;
}

.ad-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}