/* --- 1. Global Reset & Variables --- */
:root {
    --bg-main: #121212;
    --bg-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #00ff88; 
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a { text-decoration: none; color: inherit; }
* { box-sizing: border-box; }

/* --- 2. HEADER & NAVIGATION (Perfect Layout) --- */
header {
    background-color: #1a1a1a;
    height: 70px;
    padding: 0 40px;
    display: flex;
    align-items: center; 
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- Active Menu Highlight --- */
.nav-links a.active {
    color: var(--accent); /* Neon Green Text */
}

.nav-links a.active::after {
    width: 100%;
}

/* 1. Left: Logo (Takes 1 part space) */
.logo {
    flex: 1;
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
}
.logo span { color: var(--accent); }

/* 2. Center: Menu Links (Takes 2 parts space - Perfect Center) */
.nav-links {
    flex: 2;
    display: flex;
    justify-content: center; 
    gap: 30px;
}

/* Menu Text Style */
.nav-links a {
    color: #ccc;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s;
    position: relative; 
    display: inline-block; 
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Hover Underline Effect (Only under text) */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after {
    width: 100%; 
}

/* 3. Right: Icons (Takes 1 part space - Pushed Right) */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.search-icon {
    font-size: 20px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}
.search-icon:hover { color: var(--accent); }


.menu-toggle {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

/* --- 3. MOBILE RESPONSIVE (Tablets & Phones) --- */
@media (max-width: 1068px) {
    header {
        padding: 0 20px;
    }

    
    .menu-toggle {
        display: block;
    }

    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%; 
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #1a1a1a;
        flex-direction: column; 
        justify-content: flex-start; 
        align-items: center;
        padding-top: 40px;
        transition: 0.4s ease;
        border-top: 1px solid #333;
    }

    .nav-links.active {
        left: 0; 
    }

    .nav-links a {
        font-size: 20px;
        margin: 15px 0;
        display: inline-block;
    }
}

/* --- 4. HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1542751371-adc38448a05e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ddd;
}

.btn-hero {
    background: var(--accent);
    color: black;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
}
.btn-hero:hover { background: white; transform: scale(1.1); }

/* --- 5. FULLSCREEN SEARCH OVERLAY --- */
.overlay {
    height: 100%;
    width: 100%;
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0, 0.95);
}

.overlay-content {
    position: relative;
    top: 10%;
    width: 80%;
    text-align: center;
    margin: auto;
}

.closebtn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
    cursor: pointer;
    color: white;
    transition: 0.3s;
}
.closebtn:hover { color: var(--accent); }

.search-bar-wrapper {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.overlay input {
    padding: 15px;
    font-size: 30px;
    border: none;
    background: transparent;
    color: white;
    width: 80%;
    outline: none;
}

.overlay button {
    font-size: 30px;
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
}

.suggestion-box {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    width: 80%;
    text-align: left;
    background: #222;
    border-radius: 0 0 10px 10px;
}

.suggestion-box li {
    padding: 15px;
    border-bottom: 1px solid #333;
    color: #ccc;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s;
}
.suggestion-box li:hover {
    background: #333;
    color: var(--accent);
    padding-left: 25px;
}

#searchGridResults { margin-top: 30px; }

/* --- 6. GAME CARDS & LAYOUT --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.games-grid, .related-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 20px 15px;
    margin-top: 20px;
}

.game-card, .related-card {
    background: transparent; 
    border: none;
    box-shadow: none;  
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    position: relative;
    overflow: visible;
}

.game-card:hover, .related-card:hover {
    transform: translateY(-5px);
   /* box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);*/
    border-color: var(--accent);
}
/* --- Hover Effects --- */
.game-card:hover img, .related-card:hover img {
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.25); 
    border-color: var(--accent); 
}
/* --- Solution 1: Square Images (1:1 Ratio) --- */
.game-card img, .related-card img {
    width: 100%;
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    border-radius: 30px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /*border: 1px solid #333;*/
}

.card-info {
    padding: 8px 0 0 0;
    width: 100%;
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.game-card::after {
    display: none; 
}
.card-info span {
    font-size: 13px;
    color: #888;
    display: block;
    margin-top: 2px;
}
/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--accent);
    padding-left: 15px;
    margin-bottom: 15px;
}

.section-header h3 { margin: 0; font-size: 22px; }

.view-all {
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    padding: 5px 10px;
    border-radius: 4px;
    transition: 0.3s;
}
.view-all:hover { background: var(--accent); color: black; }

/* --- 7. PLAY PAGE ELEMENTS --- */
.game-frame-container {
    width: 100%;
    height: calc(100vh - 140px); 
    min-height: 600px;
	background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #252525;
    padding: 12px 20px;
    border-radius: 0 0 8px 8px;
    margin-bottom: 30px;
    border: 1px solid #333; border-top: none;
}

.btn-fullscreen {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    font-size: 14px;
    display: flex; align-items: center; gap: 8px;
    transition: 0.3s;
}
.btn-fullscreen:hover {
	background: var(--accent);
	color: #000;
}

.related-section {
	margin-top: 50px;
	border-top: 1px solid #333;
	padding-top: 20px;
}

/* --- Missing Game Frame Fix --- */
iframe {
    width: 100%;
    height: 100%;
    max-width: 100%; 
    border: none;
    display: block;
}

/* --- FOOTER DESIGN (Final Alignment Fix) --- */
footer {
    background-color: #0d0d0d;
    color: #fff;
    padding: 80px 0 20px;
    margin-top: 80px;
    border-top: 1px solid #222;
    font-family: 'Segoe UI', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; 
    gap: 30px;
}

/* --- Common Column Style --- */
.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* --- LOGO & TITLE ALIGNMENT FIX --- */
.footer-logo, .footer-title {
    margin-top: 0;
    line-height: 1.2; 
    display: inline-block;
}

/* 1. Logo Styling */
.footer-logo {
    font-size: 28px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.footer-logo span { color: var(--accent); }

/* 2. Title Styling */
.footer-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 30px; 
    color: #fff;
    position: relative;
    letter-spacing: 0.5px;
    padding-top: 8px; 
}

/* Green Line */
.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -12px;
    width: 35px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* --- Content Styling --- */
.footer-about {
    color: #b3b3b3;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 280px;
}

.footer-email {
    color: var(--accent);
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    display: flex; align-items: center; gap: 10px;
}
.footer-email:hover { text-decoration: underline; }

/* Links List */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    color: #b3b3b3;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
    display: block;
}
.footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

/* Newsletter */
.newsletter-form {
    display: flex;
    width: 100%;
    margin-top: 5px;
}
.newsletter-input {
    background: #222;
    border: none;
    padding: 12px 15px;
    color: #fff;
    font-size: 14px;
    flex: 1;
    outline: none;
    border-radius: 4px 0 0 4px;
}
.newsletter-btn {
    background: var(--accent);
    color: #000;
    border: none;
    width: 50px;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    font-size: 18px;
    transition: 0.3s;
    display: flex; justify-content: center; align-items: center;
}
.newsletter-btn:hover { background: #fff; }

/* Copyright */
.copyright {
    text-align: center;
    border-top: 1px solid #222;
    margin-top: 60px;
    padding-top: 25px;
    color: #666;
    font-size: 13px;
}

/* --- Mobile Responsive Fix --- */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr; 
        gap: 40px;
    }
    .footer-title {
        padding-top: 0; 
    }
}

/* --- General Page Styling --- */
.page-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px;
    min-height: 50vh; 
}

.page-title {
    font-size: 36px;
    color: var(--accent); 
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

.page-text {
    color: #ccc;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}
.page-text h2 { color: white; margin-top: 30px; }
.page-text ul { margin-left: 20px; color: #bbb; }

/* --- Contact Form Design --- */
.contact-box {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #333;
    max-width: 600px;
    margin: 0 auto;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: white; margin-bottom: 8px; }

.form-control {
    width: 100%;
    padding: 12px;
    background: #121212;
    border: 1px solid #333;
    color: white;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
}
.form-control:focus { border-color: var(--accent); }

.btn-submit {
    width: 100%;
    background: var(--accent);
    color: black;
    padding: 12px;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}
.btn-submit:hover { background: white; }

/* --- FAQ Accordion Design --- */
.faq-item {
    background: #1e1e1e;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}
.faq-question {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    display: flex; justify-content: space-between; align-items: center;
    transition: 0.3s;
}
.faq-question:hover { color: var(--accent); }
.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #151515;
    color: #bbb;
}
.faq-item.active .faq-answer {
    padding: 15px 20px;
    max-height: 200px; 
}
.faq-icon { transition: 0.3s; }
.faq-item.active .faq-icon { transform: rotate(180deg); color: var(--accent); }