/* --- NAINO GAMES: HYPER-PROFESSIONAL DARK THEME (RESPONSIVE) --- */

:root {
    --accent-color: #bb86fc; /* Primary Violet */
    --accent-glow: #d8baff;  /* Lightest Lilac for deep focus */
    --bg-dark: #000000;      /* Pure Black */
    --bg-card: #0d0d0d;      /* Slightly off-black for card depth */
    --text-light: #ffffff;
    --text-muted: #888888;
    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Dynamic Hero Matching Color - Default to Violet Glow */
    --hero-match-color: var(--accent-glow); 
    
    /* Advanced Glass Variables */
    --glass-bg: rgba(255, 255, 255, 0.05); 
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; } /* Prevent side scroll */

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% -20%, rgba(187, 134, 252, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 100% 50%, rgba(100, 50, 160, 0.08) 0%, transparent 50%);
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden; /* Critical for mobile alignment */
}

strong { 
    color: var(--text-light) !important; 
    font-weight: 900 !important;
}

a { text-decoration: none; color: inherit; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

/* --- NAVIGATION BAR --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; 
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(187, 134, 252, 0.3); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    position: sticky; top: 0; z-index: 1000;
}

.logo {
    font-family: var(--font-head); 
    font-size: 1.5rem; 
    font-weight: 900;
    letter-spacing: 1px; 
    background: linear-gradient(45deg, var(--hero-match-color), var(--accent-color));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px var(--hero-match-color));
    transition: filter 0.6s ease, background 0.6s ease, transform 0.3s;
}

.nav-links {
    display: flex; 
    gap: 20px;
    list-style: none;
}
.nav-links a { 
    text-transform: uppercase; font-weight: 700; font-size: 0.85rem; 
    color: var(--text-muted); position: relative; letter-spacing: 1px;
}
.nav-links a:hover { color: var(--text-light); }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 3px;
    bottom: -6px; left: 0; background: var(--accent-glow);
    transition: width 0.3s; border-radius: 1px;
}
.nav-links a:hover::after { width: 100%; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh; /* Full screen height */
    min-height: 600px; /* Prevent squishing on small phones */
    display: flex; align-items: center; justify-content: center;
    text-align: center; background-size: cover; background-position: center; 
    position: relative; overflow: hidden;
    transition: background-image 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, var(--bg-dark) 5%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.8) 100%);
    z-index: 5;
}

.hero-content { 
    z-index: 10; 
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    transition: opacity 0.6s ease, transform 0.6s ease; 
}
.hero-content.fade-out { opacity: 0; transform: translateY(20px) scale(0.98); }

.hero-title {
    font-family: var(--font-head); font-size: 5rem; font-weight: 900;
    text-transform: uppercase; margin-bottom: 15px; letter-spacing: 4px;
    color: #fff; 
    text-shadow: 0 0 50px var(--hero-match-color), 0 0 10px rgba(0,0,0,0.5); 
    transition: text-shadow 0.6s ease;
    line-height: 1.1;
}
.hero-content p { font-size: 1.2rem; color: #ddd; margin-bottom: 40px; font-weight: 400; letter-spacing: 1px; max-width: 800px; margin-left: auto; margin-right: auto;}

.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;}

/* Main Button */
.btn-main {
    position: relative; overflow: hidden;
    padding: 16px 40px; font-weight: 800; text-transform: uppercase;
    border: none; 
    background: var(--hero-match-color); 
    color: var(--bg-dark); 
    border-radius: 6px; 
    box-shadow: 0 0 25px var(--hero-match-color); 
    z-index: 1; transition: transform 0.3s, box-shadow 0.3s, background 0.6s ease;
    letter-spacing: 1px;
    display: inline-block;
    text-align: center;
}
.btn-main::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: 0.6s; z-index: -1;
}
.btn-main:hover::before { left: 100%; }
.btn-main:hover { transform: translateY(-5px); box-shadow: 0 10px 35px var(--hero-match-color); }

.mobile-btn { 
    background: transparent; 
    border: 2px solid var(--text-light); 
    color: var(--text-light); 
    box-shadow: none; 
}
.mobile-btn:hover { 
    background: var(--hero-match-color); 
    color: var(--bg-dark); 
    box-shadow: 0 0 25px var(--hero-match-color); 
    border-color: var(--hero-match-color);
}

/* Nav Button (Arrow) */
.hero-nav-btn {
    position: absolute;
    bottom: 30px; 
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(10px);
    color: var(--hero-match-color); 
    border: 2px solid var(--hero-match-color); 
    border-radius: 50%;
    font-size: 1.5rem; 
    font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: transform 0.3s, box-shadow 0.3s, background 0.6s ease, border-color 0.6s ease;
    box-shadow: 0 0 15px var(--hero-match-color);
}
.hero-nav-btn:hover {
    transform: scale(1.1) translateX(5px);
    background: var(--hero-match-color); 
    color: var(--bg-dark); 
    box-shadow: 0 0 40px var(--hero-match-color);
}
.hero-nav-btn:active { transform: scale(0.95); }


/* --- GAMES LIBRARY --- */
.games-section { 
    padding: 80px 5%; 
    max-width: 1600px; 
    margin: 0 auto; 
    border-top: 1px solid rgba(187, 134, 252, 0.2); 
}

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { 
    font-family: var(--font-head); font-size: 3rem; font-weight: 900; color: #fff;
    display: inline-block; position: relative; padding-bottom: 15px;
}
.section-header h2::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 80px; height: 4px; background: var(--accent-glow); border-radius: 2px;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* SMART GRID SYSTEM */
.games-grid { 
    display: grid; 
    /* This line fixes the overflow issues on mobile */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px; 
}

.game-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 16px; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
}

.game-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent-glow);
    box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 30px rgba(187, 134, 252, 0.5);
}

.card-thumb {
    width: 100%; position: relative; padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.card-thumb img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.game-card:hover .card-thumb img { transform: scale(1.1); }

.card-details { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }

.card-title-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.game-logo {
    width: 50px; height: 50px; margin-right: 15px;
    border-radius: 10px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    border: 2px solid var(--accent-color);
}

.card-details h3 { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: 0.5px; line-height: 1.2;}

.tags { margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 8px;}
.tag { 
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    background: rgba(187, 134, 252, 0.1); 
    padding: 4px 10px; border-radius: 4px; color: var(--accent-glow); 
    border: 1px solid rgba(187, 134, 252, 0.4);
}

.card-details p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; margin-bottom: 20px; flex-grow: 1;}

.card-actions { display: flex; gap: 10px; margin-top: auto; }

.btn-sm {
    flex: 1; text-align: center; padding: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 0.8rem; font-weight: 700; color: #fff; text-transform: uppercase;
    border-radius: 6px; transition: 0.2s;
}
.btn-sm:hover { background: var(--accent-color); border-color: var(--accent-color); box-shadow: 0 0 20px rgba(187, 134, 252, 0.5); }
.mobile-hover:hover { background: #fff; color: #000; box-shadow: 0 0 20px rgba(255,255,255,0.6); }

/* --- INFO & FOOTER --- */
.info-section { padding: 80px 5%; max-width: 900px; margin: 0 auto; border-top: 1px solid #1a1a1a; text-align: center; }
.info-content { text-align: left; color: #ccc; font-size: 1rem; }
.subsection-title { 
    font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--accent-glow); 
    margin: 50px 0 20px; border-bottom: 2px solid rgba(187, 134, 252, 0.3); padding-bottom: 8px; 
}

.channel-grid { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 30px; justify-content: center;}

.youtube-btn-main {
    flex: 1; display: inline-block; text-align: center;
    background: #cc0000; color: #fff; padding: 16px 30px;
    font-weight: 700; text-transform: uppercase; border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5); min-width: 250px;
}
.youtube-btn-main:hover { background: #ff0000; box-shadow: 0 0 30px rgba(255,0,0,0.6); transform: translateY(-4px); }

.contact-email { display: block; font-size: 1.8rem; font-weight: 700; color: var(--accent-glow); margin: 40px 0; text-align: center; word-break: break-all; }

footer { text-align: center; padding: 40px; color: #444; font-size: 0.9rem; background: #000000; border-top: 1px solid #111; }


/* ==========================================================================
   MOBILE & TABLET OPTIMIZATIONS (The Fix)
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-title { font-size: 4rem; }
    .games-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Navbar Adjustment */
    .navbar { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-links { gap: 15px; justify-content: center; width: 100%; flex-wrap: wrap; }
    
    /* Hero Adjustments */
    .hero-title { font-size: 2.8rem; letter-spacing: 2px; }
    .hero-content p { font-size: 1rem; padding: 0 10px; }
    .hero-buttons { flex-direction: column; width: 100%; gap: 15px; }
    .btn-main { width: 100%; }
    
    /* Arrow Button Position */
    .hero-nav-btn { bottom: 20px; right: 20px; width: 45px; height: 45px; }

    /* Grid Adjustments */
    .games-section { padding: 60px 5%; }
    .games-grid { 
        grid-template-columns: 1fr; /* Force 1 column on mobile */
        gap: 25px; 
    }
    .game-card { margin: 0; width: 100%; }
    
    /* Font Sizing */
    .section-header h2 { font-size: 2.2rem; }
    .contact-email { font-size: 1.4rem; }
}

/* Very Small Screens (Old Phones) */
@media (max-width: 380px) {
    .hero-title { font-size: 2.2rem; }
    .logo { font-size: 1.3rem; }
}
