/* CSS Variables for Theming */
:root {
    --primary-color: #00f3ff;
    /* Neon Cyan */
    --secondary-color: #ff00ff;
    /* Neon Magenta */
    --bg-dark: #121212;
    --bg-card: #1e1e2e;
    --bg-card-hover: #2a2a40;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --shadow-main: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(0, 243, 255, 0.3);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #333 #121212;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}


html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    /* Wider for gallery view */
    margin: 0 auto;
    padding: 0 15px;
}

/* Button & Utility Styles */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 15px;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #000;
}

/* Header Styles */
.header {
    background: rgba(18, 18, 18, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    max-height: 50px;
    /* Adjust based on header height preference */
    width: auto;
    object-fit: contain;
}

/* Search Bar in Header */
.search-bar {
    flex-grow: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px;
    padding-right: 40px;
    border-radius: 20px;
    border: 1px solid #333;
    background: #1f1f1f;
    color: #fff;
    font-family: inherit;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.nav-buttons {
    flex-shrink: 0;
}

/* MAIN CONTENT - SCROLLING ROWS */
.main-content {
    padding-top: 20px;
    padding-bottom: 50px;
}

.section {
    margin-bottom: 40px;
}

.pt-0 {
    padding-top: 0;
}

.section-heading {
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
}

.category-title {
    font-size: 1.1rem;
    color: #eee;
}

.view-all-small {
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Category Page Header */
.category-header {
    text-align: center;
    margin-bottom: 40px;
}

.category-description {
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 10px auto 0;
}

/* Horizontal Scroll Container */
.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    /* Space for scrollbar */
    scroll-snap-type: x mandatory;
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background: #444;
}

/* Featured Card (Portrait - Top Row) */
.featured-card {
    position: relative;
    min-width: 160px;
    scroll-snap-align: start;
    transition: transform 0.3s;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.rank-number {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 4rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.2);
    z-index: 10;
    line-height: 1;
    font-family: var(--font-heading);
    pointer-events: none;
}

.game-image.portrait {
    height: 240px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Small Game Card (Square-ish - Category Rows) */
.game-card-small {
    min-width: 130px;
    width: 130px;
    scroll-snap-align: start;
}

.img-wrapper {
    width: 130px;
    height: 130px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.game-card-small:hover .img-wrapper img {
    transform: scale(1.1);
}

.game-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ccc;
    text-align: center;
}

.game-card-small:hover .game-name {
    color: #fff;
}

/* Overlay & Buttons */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s;
}

.game-image:hover .game-overlay,
.img-wrapper:hover .play-btn-overlay {
    opacity: 1;
}

.btn-play-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: #000;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 15px var(--primary-color);
}

.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 243, 255, 0.9);
    border: none;
    color: #000;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    /* Centering icon */
    align-items: center;
    justify-content: center;
}

/* Game Modal Overlay (Keep existing) */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-modal.active {
    display: flex;
    opacity: 1;
}

.game-modal-content {
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-modal-header {
    padding: 15px 20px;
    background: #0a0a0e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-controls {
    display: flex;
    gap: 10px;
}

.btn-icon-small {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-icon-small:hover {
    background: var(--primary-color);
    color: #000;
}

.game-frame-container {
    flex: 1;
    background: #000;
    position: relative;
}

.game-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Grid Layout for "All Games" */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding-bottom: 40px;
}

.games-grid .game-card-small {
    width: 100%;
    min-width: 0;
}

.games-grid .img-wrapper {
    width: 100%;
    height: 130px;
}

/* Responsive */
@media (max-width: 768px) {
    .rank-number {
        font-size: 3rem;
    }

    .featured-card {
        min-width: 140px;
    }

    .game-image.portrait {
        height: 200px;
    }

    .search-bar {
        display: none;
        /* Hide detailed search on mobile for clean top bar */
    }
}


/* --- Game Page Layout --- */
.game-page-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.game-column-left {
    flex: 3;
    min-width: 0;
    /* Prevents overflow */
}

.game-column-right {
    flex: 1;
    min-width: 250px;
}

/* Breadcrumb */
.breadcrumb {
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--text-gray);
}

.breadcrumb .current {
    color: var(--primary-color);
}

.breadcrumb .separator {
    margin: 0 5px;
}

/* Game Player Container */
.game-player-container {
    position: relative;
    width: 100%;
    /* Default 16:9 Aspect Ratio */
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: padding-top 0.3s ease;
}

/* Portrait Mode for Vertical Games */
.game-player-container.portrait-mode {
    /* 9:16 Aspect Ratio approx */
    padding-top: 160%;
    max-width: 450px;
    /* Constrain width on desktop so it's not huge */
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    .game-player-container.portrait-mode {
        max-width: 100%;
        /* Full width on mobile */
        padding-top: 150%;
    }

    /* Enhance mobile play area */
    .game-player-container {
        border-radius: 4px;
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }
}

.game-cover,
#game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    z-index: 2;
}

.game-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.play-overlay {
    position: relative;
    z-index: 3;
}

.btn-play-large {
    font-size: 1.2rem;
    padding: 15px 40px;
    background: var(--primary-color);
    border: none;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    transition: transform 0.2s;
    border-radius: 5px;
}

.btn-play-large:hover {
    transform: scale(1.05);
}

/* Game Actions Bar */
.game-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #1e1e2e;
    padding: 15px;
    border-radius: 8px;
}

.game-page-title {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-action {
    background: none;
    border: 1px solid #444;
    color: #ccc;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Ad Placeholder */
.ad-placeholder {
    width: 100%;
    height: 100px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    border: 1px dashed #333;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Game Info Grid */
.game-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.game-details-box,
.game-description-box {
    background: #1e1e2e;
    padding: 20px;
    border-radius: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.detail-row:last-child {
    border-bottom: none;
}

.label {
    color: var(--text-gray);
}

.value {
    font-weight: bold;
    color: #fff;
}

.tags-container {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-btn {
    background: #333;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
}

.tag-btn:hover {
    background: var(--primary-color);
    color: #000;
}

/* Sidebar Grid */
.sidebar-heading {
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.sidebar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .game-page-layout {
        flex-direction: column;
    }

    .sidebar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .sidebar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .game-info-grid {
        grid-template-columns: 1fr;
    }

}

/* --- Navigation Links --- */
.nav-buttons .nav-link {
    display: inline-block;
    color: var(--text-gray);
    margin-right: 15px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-buttons .nav-link:hover {
    color: var(--primary-color);
}

.nav-buttons .nav-link.active {
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Contact Page Styles --- */
.contact-page-container {
    max-width: 800px;
    margin: 40px auto;
    text-align: center;
}

.contact-page-container .page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.contact-card {
    background: #1e1e2e;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-main);
    border: 1px solid #333;
}

.intro-text {
    font-size: 1.1rem;
    color: #ddd;
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.contact-section {
    background: #121212;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    text-align: left;
    transition: transform 0.3s;
}

.contact-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-section .section-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-section p {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.contact-email {
    display: inline-block;
    background: #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #555;
    transition: all 0.3s;
}

.contact-email:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.contact-footer {
    border-top: 1px solid #333;
    padding-top: 20px;
    color: #bbb;
}

.contact-footer .small-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 10px;
}

.contact-footer a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive adjustments for Contact */
@media (max-width: 600px) {
    .contact-page-container {
        margin: 20px 10px;
    }

    .contact-card {
        padding: 20px;
    }

    .contact-section {
        text-align: center;
        border-left: none;
        border-top: 4px solid var(--secondary-color);
    }

    .contact-section .section-title {
        justify-content: center;
    }

}

/* --- Privacy Policy Page Styles --- */
.policy-page-container {
    max-width: 900px;
    margin: 40px auto;
}

.policy-page-container .page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.policy-content {
    background: #1e1e2e;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-main);
    border: 1px solid #333;
}

.policy-section {
    margin-bottom: 30px;
}

.policy-section h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.policy-section p {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 15px;
}

.policy-section ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
    color: #ccc;
}

.policy-section ul li {
    margin-bottom: 8px;
}

.policy-section h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.subsection {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 2px solid #333;
}

.policy-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .policy-content {
        padding: 20px;
    }

    .policy-page-container .page-title {
        font-size: 2rem;
    }

}

/* --- Footer Styles --- */
.site-footer {
    background: #0f0f13;
    color: #ccc;
    padding: 60px 0 20px;
    margin-top: 60px;
    border-top: 1px solid #222;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #aaa;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: #222;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary-color);
    color: #000;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

}

/* --- About Us Page Styles --- */
.about-page-container {
    max-width: 900px;
    margin: 40px auto;
    text-align: center;
}

.about-page-container .page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.about-content {
    background: #1e1e2e;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-main);
    border: 1px solid #333;
    text-align: left;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-section h2 i {
    color: var(--primary-color);
}

.about-section p {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.about-card {
    background: #121215;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
    transition: transform 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.about-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.about-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.about-card p {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        padding: 20px;
    }
}