/* General Styling */
:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #28a745; /* Green */
    --dark-bg: #1a1a1a;
    --light-text: #e0e0e0;
    --card-bg: #2a2a2a;
    --border-color: #444;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--light-text);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff6f61; /* A reddish hover color */
}

p {
    margin-bottom: 1em;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Header */
.main-header {
    background-color: #0f0f0f;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: #fff;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: var(--light-text);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: url('../img/hero-gaming.jpg') no-repeat center center/cover;
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* Article Section */
.article-section {
    padding: 50px 0;
}

.article-section .container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.main-article {
    flex: 3; /* Take 3 parts of space */
    min-width: 300px; /* Minimum width for article */
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.main-article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 25px;
    display: block; /* Ensures no extra space below image */
}

.article-meta {
    font-size: 0.9em;
    color: #bbb;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.article-meta .author {
    color: var(--primary-color);
    font-weight: 600;
}

.main-article h2 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 40px;
}

.main-article h3 {
    color: var(--light-text);
}

.main-article ul, .main-article ol {
    list-style-position: inside; /* Keeps bullet points/numbers inside content flow */
    padding-left: 20px;
    margin-bottom: 1.5em;
}

.main-article ul li, .main-article ol li {
    margin-bottom: 8px;
}

/* Genre Grid */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.genre-item {
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.genre-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Game Recommendations */
.game-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.game-card {
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.game-card h3 {
    margin: 15px 10px 5px 10px;
    color: var(--secondary-color);
}

.game-card p {
    font-size: 0.9em;
    padding: 0 15px 15px;
    color: #ccc;
}


/* Sidebar */
.sidebar {
    flex: 1; /* Take 1 part of space */
    min-width: 250px; /* Minimum width for sidebar */
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sidebar h3 {
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.sidebar .about-author img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.sidebar .about-author p {
    font-size: 0.95em;
    color: #ccc;
}

.sidebar .popular-articles ul {
    list-style: none;
    padding: 0;
}

.sidebar .popular-articles ul li {
    margin-bottom: 10px;
}

.sidebar .popular-articles ul li a {
    color: var(--light-text);
    transition: color 0.3s ease;
}

.sidebar .popular-articles ul li a:hover {
    color: var(--primary-color);
}


/* Footer */
.main-footer {
    background-color: #0f0f0f;
    color: #bbb;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
}

.main-footer a {
    color: #bbb;
    margin: 0 10px;
}

.main-footer a:hover {
    color: #fff;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3em;
    }
    .hero-content p {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        text-align: center;
    }
    .main-nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .main-nav ul li {
        margin: 0 10px 10px 10px;
    }

    .hero-section {
        height: 400px;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content p {
        font-size: 1em;
    }

    .article-section .container {
        flex-direction: column;
        gap: 30px;
    }

    .main-article, .sidebar {
        min-width: unset; /* Remove min-width to allow full width */
        width: 100%;
        padding: 20px;
    }

    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.5em; }

    .genre-grid, .game-recommendations {
        grid-template-columns: 1fr; /* Stack columns on mobile */
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2em;
    }
    .hero-content p {
        font-size: 0.9em;
    }
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}