* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --white: #ffffff;
    --max-width: 1400px;
    --game-card-bg: #ffffff;
    --hover-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--white);
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover,
nav a.active {
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav {
    display: none;
    width: 100%;
    margin-top: 1rem;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    padding: 0.75rem;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color), #5ba3f5);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 8px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.game-card {
    background: var(--game-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    text-decoration: none;
    color: inherit;
}

.game-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-card-image::after {
    content: attr(data-title);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    padding: 0.5rem;
    text-align: center;
}

.game-card:hover .game-card-image::after {
    opacity: 1;
}

.game-card-image:has(img)::after {
    display: none;
}

.game-card-description {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-card-title {
    padding: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-container {
    margin: 2rem 0;
    position: relative;
}

.search-box {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 1rem;
    letter-spacing: 2px;
}

.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
    background: var(--light-bg);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #357abd;
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #1a252f;
}

section {
    margin: 3rem 0;
}

section h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.ad-placeholder {
    background: var(--light-bg);
    border: 2px dashed var(--border-color);
    padding: 1rem;
    text-align: center;
    color: #999;
    margin: 2rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder::before {
    content: "Ad Space";
}

.sidebar {
    width: 300px;
    float: right;
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.content-with-sidebar {
    max-width: 900px;
}

article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

article h1 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

article .meta {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

article h2 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

article h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

article p {
    margin-bottom: 1rem;
    text-align: justify;
}

article ul,
article ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

article li {
    margin-bottom: 0.5rem;
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: bold;
}

form input,
form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

form textarea {
    min-height: 150px;
    resize: vertical;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.error-message {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    display: none;
}

.success-message.show {
    display: block;
}

.game-category {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.game-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-post-item {
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.blog-post-item:last-child {
    border-bottom: none;
}

.blog-post-item h3 {
    margin-bottom: 0.5rem;
}

.blog-post-item h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.blog-post-item h3 a:hover {
    text-decoration: underline;
}

.blog-post-item .excerpt {
    color: #666;
    margin: 1rem 0;
}

footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

footer a {
    color: var(--white);
    text-decoration: none;
    margin: 0 1rem;
}

footer a:hover {
    text-decoration: underline;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    margin: 0;
    opacity: 0.9;
}

.footer-section ul li a:hover {
    opacity: 1;
}

.section-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), #5ba3f5);
    color: var(--white);
    border-radius: 12px;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-section .hero-tagline {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search input {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-size: 0.9rem;
    min-width: 200px;
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.7);
}

.header-search input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    nav {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .sidebar {
        width: 100%;
        float: none;
        margin-left: 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .header-search {
        display: none;
    }

    article h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .footer-sections {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    main {
        padding: 1rem 0;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .hero-tagline {
        font-size: 1rem;
    }
}

