/* ==========================================
   ESPAÑOLGAMES - COMPLETE WORKING CSS
   ========================================== */

/* CSS VARIABLES */
:root {
    --color-primary: #c00;
    --color-primary-dark: #8b0000;
    --bg-primary: #000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #333;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    zoom: 85%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* CONTAINERS - Both versions */
.container,
.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-main {
    min-height: 100vh;
}

/* SKIP TO CONTENT */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* ========== HEADER ========== */
.top-header-bar {
    background: var(--bg-tertiary);
    border-bottom: 3px solid var(--color-primary);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Logo */
.site-branding {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: bold;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo-link:hover {
    color: #ff4444;
    transform: scale(1.05);
}

/* Search */
.header-search {
    flex: 1;
    max-width: 600px;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 14px;
    color: #333;
}

.search-button {
    padding: 12px 25px;
    background: var(--color-primary);
    color: white;
    font-weight: bold;
    font-size: 13px;
}

.search-button:hover {
    background: var(--color-primary-dark);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-login {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--text-primary);
}

.btn-login:hover {
    background: var(--color-primary);
}

.btn-register {
    background: var(--color-primary);
    color: white;
}

.btn-register:hover {
    background: var(--color-primary-dark);
}

/* ========== NAVIGATION ========== */
.main-navigation {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.nav-menu {
    display: flex;
    justify-content: space-around;
    list-style: none;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background: var(--color-primary);
    color: white;
}

/* ========== HERO SLIDER ========== */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 50px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
}

.slide-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.slide-content .container {
    max-width: 700px;
}

.slide-category {
    display: inline-block;
    padding: 5px 15px;
    background: var(--color-primary);
    color: white;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.slide-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.slide-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.slide-meta {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    font-size: 14px;
}

.slide-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slide-meta i {
    color: var(--color-primary);
}

.slide-actions {
    display: flex;
    gap: 15px;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(200, 30, 30, 0.8);
    border: none;
    color: white;
    font-size: 24px;
    padding: 20px;
    cursor: pointer;
    z-index: 10;
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--color-primary);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.slider-dots .dot.active {
    background: var(--color-primary);
    width: 30px;
    border-radius: 6px;
}

/* ========== SECTIONS ========== */
.section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
}

.section-header h2 i {
    color: var(--color-primary);
    margin-right: 15px;
}

.view-all {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.view-all:hover {
    color: #ff0000;
}

/* ========== GAME CARDS ========== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.game-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(200, 30, 30, 0.3);
}

.game-cover {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
    background: var(--bg-secondary);
}

.game-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.game-card:hover .game-cover img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
}

.badge-new {
    background: var(--color-primary);
    color: white;
}

.game-info {
    padding: 15px;
}

.game-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-category {
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-meta i {
    color: var(--color-primary);
}

.game-rating i {
    color: #f39c12;
}

.game-views i {
    color: var(--color-primary);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #8b0000 0%, #c00 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 30, 30, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
}

/* ========== CATEGORIES ========== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.category-card:hover {
    border-color: var(--color-primary);
    background: rgba(200, 30, 30, 0.1);
    transform: translateY(-5px);
}

.category-icon {
    font-size: 50px;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 3px solid var(--color-primary);
    margin-top: 80px;
}

.footer-main {
    padding: 50px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-heading {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
}

.social-link.facebook { background: #3b5998; }
.social-link.twitter { background: #1da1f2; }
.social-link.youtube { background: #ff0000; }
.social-link.telegram { background: #0088cc; }

.social-link:hover {
    transform: translateY(-3px);
}

.footer-bottom {
    background: var(--bg-primary);
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== DROPDOWN SUBMENU ========== */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 1000;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    margin: 0;
}

.submenu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: none !important;
    background: none !important;
}

.submenu li a:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary);
}

.submenu-icon {
    font-size: 10px;
    margin-left: 5px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .header-wrapper {
        flex-wrap: wrap;
    }
    
    .header-search {
        order: 3;
        flex-basis: 100%;
    }
    
    .slide-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .slide-title {
        font-size: 28px;
    }
    
    .slide-actions {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide mobile menu button on desktop */
.mobile-menu-toggle {
    display: none;
}

/* Newsletter styling */
.newsletter-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.newsletter-heading {
    font-size: 24px;
    margin-bottom: 10px;
}

.newsletter-input-group {
    display: flex;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.newsletter-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    color: #333;
}

.newsletter-button {
    padding: 12px 25px;
    background: #c00;
    color: white;
    font-weight: bold;
}
/* Hide mobile navigation completely on desktop */
.mobile-navigation,
.mobile-nav-overlay,
.mobile-nav-title {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-navigation,
    .mobile-nav-overlay {
        display: block !important;
    }
    
    .mobile-nav-title {
        display: inline-block !important;
    }
}


/* ===== MOBILE HEADER FIX - SIRF TOGGLE MEIN SAB KUCH ===== */
@media screen and (max-width: 992px) {
    /* Header layout - SAME */
    .header-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
    }
    
    /* 1. LOGO - SAME TO SAME */
    .site-branding {
        order: 1;
    }
    
    .logo-link {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 28px !important;
        font-weight: bold;
        color: #c00 !important;
        text-transform: uppercase;
        letter-spacing: 2px;
    }
    
    .logo-text {
        font-size: 28px !important;
    }
    
    /* 2. SEARCH BAR - AS IT IS, NO CHANGE */
    .header-search {
        order: 2;
        flex: 1;
        max-width: 500px;
        margin: 0 -15px;
    }
    
    .search-input {
        display: block !important;  /* SHOW INPUT */
        padding: 12px 20px;
        border: none;
        font-size: 14px;
    }
    
    .search-button {
        background: #c00 !important;
        padding: 12px 25px !important;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .button-text {
        display: inline !important;  /* SHOW "BUSCAR" TEXT */
    }
    
    /* 3. THREE LINE TOGGLE - RIGHT SIDE */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        order: 3;
        background: #c00 !important;
        border: none;
        border-radius: 4px;
        padding: 12px 15px;
        margin-left: -10px;
        width: auto;
    }
    
    .hamburger-line {
        width: 22px;
        height: 2px;
        background: white !important;
        margin: 3px 0;
    }
    
    /* HIDE sab kuch jo toggle mein jayega */
    .header-actions,
    .main-navigation,
    .btn-login,
    .btn-register,
    .notification-btn,
    .user-avatar-btn,
    .user-menu-dropdown,
    .nav-menu {
        display: none !important;
    }
    
    /* ===== TOGGLE MENU - SAB KUCH ANDAR ===== */
    .mobile-navigation {
        display: block !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: #000 !important;
        z-index: 9999;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .mobile-navigation.active {
        right: 0;
    }
    
    .mobile-nav-overlay {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.8);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
    }
    
    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: #0a0a0a !important;
        border-bottom: 3px solid #c00 !important;
    }
    
    .mobile-nav-title {
        display: inline-block !important;
        color: white !important;
        font-size: 18px;
        font-weight: bold;
        text-transform: uppercase;
    }
    
    .mobile-nav-close {
        background: #c00 !important;
        color: white !important;
        border: none;
        border-radius: 4px;
        padding: 10px 15px;
        cursor: pointer;
    }
    
    /* TOGGLE MEIN LOGIN/REGISTER BUTTONS */
    .mobile-auth-buttons {
        padding: 20px;
        border-bottom: 1px solid #333;
    }
    
    .mobile-auth-buttons .btn-login,
    .mobile-auth-buttons .btn-register {
        display: block !important;
        width: 100%;
        padding: 12px 20px;
        margin-bottom: 10px;
        text-align: center;
        border-radius: 4px;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 13px;
        text-decoration: none;
    }
    
    .mobile-auth-buttons .btn-login {
        background: transparent !important;
        border: 2px solid #c00 !important;
        color: white !important;
    }
    
    .mobile-auth-buttons .btn-register {
        background: #c00 !important;
        color: white !important;
    }
    
    /* TOGGLE MEIN NAVIGATION MENU */
    .mobile-nav-content .nav-menu {
        display: block !important;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-nav-content .nav-menu li {
        border-bottom: 1px solid #333 !important;
    }
    
    .mobile-nav-content .nav-menu a {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        color: white !important;
        text-decoration: none;
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .mobile-nav-content .nav-menu i {
        margin-right: 15px;
        width: 20px;
        color: #c00 !important;
    }
    
    /* SUBMENU */
    .mobile-nav-content .submenu {
        display: none;
        padding-left: 35px;
        background: #0a0a0a !important;
    }
    
    .mobile-nav-content .submenu.active {
        display: block;
    }
    
    .mobile-nav-content .has-submenu > a:after {
        content: "\f078";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        margin-left: auto;
        color: white;
    }
}
/* ===== MOBILE MENU FIX - EMPTY NAHI RAHEGA ===== */
@media screen and (max-width: 992px) {
    .mobile-auth-buttons {
        padding: 20px;
        border-bottom: 1px solid #333;
    }
    
    .mobile-auth-buttons .btn-login,
    .mobile-auth-buttons .btn-register {
        display: block !important;
        width: 100%;
        padding: 12px 20px;
        margin-bottom: 10px;
        text-align: center;
        border-radius: 4px;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 13px;
        text-decoration: none;
    }
    
    .mobile-auth-buttons .btn-login {
        background: transparent;
        border: 2px solid #c00;
        color: white;
    }
    
    .mobile-auth-buttons .btn-register {
        background: #c00;
        color: white;
    }
    
    .mobile-nav-content .nav-menu {
        display: block !important;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-nav-content .nav-menu li {
        border-bottom: 1px solid #333;
    }
    
    .mobile-nav-content .nav-menu a {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        color: white;
        text-decoration: none;
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .mobile-nav-content .nav-menu i {
        margin-right: 15px;
        width: 20px;
        color: #c00;
    }
    
    .mobile-nav-content .submenu {
        display: none;
        padding-left: 35px;
        background: #0a0a0a;
    }
    
    .mobile-nav-content .submenu.active {
        display: block;
    }
    
    .mobile-nav-content .has-submenu > a:after {
        content: "\f078";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        margin-left: auto;
        color: white;
    }
}


/* ===== MOBILE HEADER - NON-STICKY ===== */
@media screen and (max-width: 992px) {
    .top-header-bar {
        position: relative !important;  /* Sticky hatao */
        top: auto !important;
        z-index: 1020;
    }
}

/* Desktop par sticky rahega */
@media screen and (min-width: 993px) {
    .top-header-bar {
        position: sticky;
        top: 0;
        z-index: 1020;
    }
}



/* ===== MOBILE SLIDER - ZOOM OUT FORCE ===== */
@media screen and (max-width: 992px) {
    .hero-slider {
        height: 280px !important;
    }
    
    .slide {
        background-size: 100% auto !important;  /* Width 100%, height auto */
        background-position: center !important;
    }
    
    .slide img {
        width: 100% !important;
        height: auto !important;  /* Height auto */
        object-fit: scale-down !important;  /* Scale down */
    }
}
.slide-title {
        font-size: 18px !important;  /* Title size kam */
    }