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

:root {
    --primary-color: #ff6600;
    --primary-hover: #e65c00;
    --bg-color: #ffffff;
    --text-color: #222;
    --card-bg: #ffffff;
    --nav-bg: #fff;
    --border-color: #e0e0e0;
    --category-bg: #f5f5f5;
    --category-hover: #ebebeb;
    --footer-bg: #2c3e50;
    --border-radius: 12px;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e4e4e4;
    --card-bg: #2d2d2d;
    --nav-bg: #1c1c1c;
    --border-color: #404040;
    --category-bg: #2d2d2d;
    --category-hover: #3d3d3d;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-brand .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.nav-brand .site-logo {
    height: 45px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-brand .site-logo {
        height: 35px;
        max-width: 150px;
    }
    .nav-brand .logo-text {
        font-size: 20px;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.search-bar {
    display: flex;
    gap: 5px;
    align-items: center;
}

.search-bar input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    width: 200px;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    background: var(--primary-color);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-hover);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
}

.breadcrumbs {
    background: #f8f8f8;
    padding: 12px 0;
    font-size: 14px;
}

.breadcrumbs .container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs .separator {
    color: #999;
}

.category-bar-wrapper {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    position: sticky;
    top: 73px;
    z-index: 999;
}

.category-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 0;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    -webkit-overflow-scrolling: touch;
}

.category-bar::-webkit-scrollbar {
    height: 6px;
}

.category-bar::-webkit-scrollbar-track {
    background: transparent;
}

.category-bar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.category-bar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .category-chip {
    background: #3a3a3a;
    color: #e4e4e4;
    border-color: #555;
}

.category-chip:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.category-chip.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.main-content {
    min-height: 70vh;
    padding: 30px 0;
}

.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.hero-section p {
    font-size: 18px;
    color: #666;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.game-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.game-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.game-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    padding: 15px;
}

.game-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-category {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
}

.play-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.play-btn:hover {
    background: var(--primary-hover);
}

.infeed-ad {
    grid-column: 1 / -1;
    margin: 20px 0;
}

.adsense-ad-banner {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.load-more-container {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    padding: 15px 40px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--primary-hover);
}

.loading-spinner {
    display: inline-block;
    margin-top: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.game-page {
    max-width: 1200px;
    margin: 0 auto;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.game-category-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
}

.game-container {
    margin: 30px 0;
}

.game-frame-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    background: #000;
}

.game-frame-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.game-description {
    margin: 40px 0;
    padding: 25px;
    background: #f8f8f8;
    border-radius: var(--border-radius);
}

.game-description h2 {
    margin-bottom: 15px;
    font-size: 24px;
}

.related-games {
    margin-top: 50px;
}

.related-games h2 {
    margin-bottom: 25px;
    font-size: 28px;
}

.category-header {
    text-align: center;
    margin-bottom: 30px;
}

.category-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.no-games {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

.footer {
    background: #222;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-text {
    text-align: center;
    font-size: 14px;
    color: #999;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--primary-hover);
}

.back-to-top.visible {
    display: flex;
}

@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .search-bar input {
        width: 150px;
    }
    
    .category-bar-wrapper {
        top: 73px;
        padding: 10px 0;
    }
    
    .category-bar {
        gap: 8px;
    }
    
    .category-chip {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .hero-section h1 {
        font-size: 28px;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .game-header h1 {
        font-size: 24px;
    }
    
    .category-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .search-bar {
        width: 100%;
        order: 3;
    }
    
    .search-bar input {
        width: 100%;
    }
}

.static-page {
    padding: 60px 0;
    min-height: 70vh;
}

.static-page .page-content {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.static-page h1 {
    font-size: 36px;
    color: var(--text-color);
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.static-page .last-updated {
    color: #666;
    font-size: 14px;
    font-style: italic;
    margin-bottom: 30px;
}

.static-page .content-section {
    margin-bottom: 35px;
}

.static-page h2 {
    font-size: 26px;
    color: var(--text-color);
    margin-bottom: 15px;
    margin-top: 30px;
}

.static-page h3 {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 12px;
    margin-top: 20px;
}

.static-page p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #444;
}

.static-page ul {
    margin-bottom: 15px;
    padding-left: 30px;
    line-height: 1.8;
}

.static-page ul li {
    margin-bottom: 8px;
    color: #444;
}

.static-page a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.static-page a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.static-page .contact-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.static-page .contact-info h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.static-page strong {
    color: var(--text-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .static-page {
        padding: 30px 0;
    }

    .static-page .page-content {
        padding: 25px 20px;
    }

    .static-page h1 {
        font-size: 28px;
    }

    .static-page h2 {
        font-size: 22px;
    }

    .static-page h3 {
        font-size: 18px;
    }
}

/* SEO Article Section */
.content-section {
    margin: 60px 0 40px;
    padding: 0;
}

.seo-article {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    max-width: 900px;
    margin: 0 auto;
}

[data-theme="dark"] .seo-article {
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.seo-article h2 {
    font-size: 32px;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.seo-article h3 {
    font-size: 24px;
    color: var(--text-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.seo-article p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 18px;
    text-align: justify;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .content-section {
        margin: 40px 0 30px;
    }
    
    .seo-article {
        padding: 25px 20px;
    }
    
    .seo-article h2 {
        font-size: 26px;
    }
    
    .seo-article h3 {
        font-size: 20px;
    }
    
    .seo-article p {
        font-size: 15px;
        text-align: left;
    }
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 50px;
    height: 28px;
    position: relative;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    transition: var(--transition);
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(22px);
}

.theme-toggle-btn i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.theme-toggle-btn .fa-sun {
    left: 6px;
    color: #ffa500;
}

.theme-toggle-btn .fa-moon {
    right: 6px;
    color: #4a5568;
}

[data-theme="dark"] .theme-toggle-btn .fa-moon {
    color: #ffd700;
}

[data-theme="dark"] .footer {
    background: #0d0d0d;
}
