/* ===============
   CSS VARIABLES - CYBERPUNK CASINO THEME
   =============== */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700;800;900&family=Press+Start+2P&display=swap');

:root {
    /* Primary - Neon Green */
    --primary-color: #00ff41;
    --primary-dark: #00cc34;
    --primary-light: #4dff7a;
    
    /* Secondary - Neon Cyan & Purple */
    --secondary-color: #00d4ff;
    --accent-purple: #9d4edd;
    
    /* Background - Deep Black */
    --bg-color: #000000;
    --bg-elevated: #0a0a0a;
    --bg-card: #121212;
    --bg-hover: #1a1a1a;
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    
    /* Borders */
    --border-color: #222222;
    --border-light: #333333;
    --border-neon: rgba(0, 255, 65, 0.5);
    
    /* Shadows */
    --shadow-sm: 0 0 10px rgba(0, 255, 65, 0.2);
    --shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    --shadow-lg: 0 0 30px rgba(0, 255, 65, 0.4);
    --shadow-xl: 0 0 40px rgba(0, 255, 65, 0.5);
    --shadow-neon: 0 0 25px var(--primary-color);
    
    /* Radii - Techy corners */
    --radius-sm: 2px;
    --radius: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    
    /* Transitions */
    --transition-speed: 0.3s;
    
    /* Fonts */
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Exo 2', sans-serif;
}

/* ===============
   RESET
   =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    min-height: 100vh;
    font-family: var(--font-body);
    background: var(--bg-color);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(157, 78, 221, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body>* {
    position: relative;
    z-index: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===============
   GLOBAL COMPONENTS
   =============== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===============
   HEADER - CYBERPUNK
   =============== */
.header {
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: visible;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 20px;
    overflow: visible;
    width: 100%;
    max-width: 1280px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.header .logo {
    order: 1;
}

.header nav {
    order: 2;
    flex: 1;
    display: flex;
    justify-content: center;
}

.header .header-right {
    order: 3;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 80px;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
    max-height: 40px;
    min-height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--primary-color));
    transition: all 0.3s ease;
    display: block;
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px var(--primary-color));
}

.nav-list {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-list a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    position: relative;
    padding: 10px 20px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-primary) !important;
    padding: 10px 24px;
    border: 2px solid var(--border-color);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-login:hover {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #000 !important;
    padding: 10px 24px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.7);
}

.mobile-menu-toggle {
    display: none !important;
    background: rgba(0, 255, 65, 0.2);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 26px;
    cursor: pointer;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    transition: all 0.3s;
    z-index: 9999;
    position: relative;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: visible;
}

.mobile-menu-toggle:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.6);
}

/* ===============
   ADS BLOCK
   =============== */
.ad-banner-container {
    margin-top: 90px;
    text-align: center;
}

.ad-banner-container a {
    display: block;
    border: 2px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.ad-banner-container img {
    width: 100%;
    height: auto;
    min-height: 60px;
    max-height: 140px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.ad-banner-container a:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    transform: translateY(-4px);
}

.ad-banner-container a:hover img {
    transform: scale(1.03);
    filter: brightness(1.1);
}

/* ===============
   FOOTER - CYBERPUNK
   =============== */
.footer {
    background: var(--bg-elevated);
    padding: 70px 0 30px;
    margin-top: 90px;
    position: relative;
    border-top: 2px solid var(--primary-color);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--secondary-color), var(--accent-purple), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 40px;
    margin-bottom: 48px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 24px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-col p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    padding: 6px 0;
}

.footer-col a::before {
    content: '>';
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    font-weight: 700;
}

.footer-col a:hover {
    color: var(--primary-color);
    padding-left: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.footer-col a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 1px;
}

/* ===============
   RESPONSIVE
   =============== */

/* Tablet and mobile menu (1024px and smaller) */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 26px;
        line-height: 1;
    }
    
    .header .header-right {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .header .container {
        justify-content: space-between;
        z-index: 9999;
    }
    
    .nav-list {
        display: none;
    }
    
    .nav-list.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(17, 17, 17, 0.98);
        backdrop-filter: blur(12px);
        padding: 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        gap: 0;
        max-height: 600px;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 20px 24px;
    }
}

/* Tablet and below */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

/* Mobile landscape and below */
@media (max-width: 768px) {
    .container {
        padding: 0 8px;
    }

    .header .container {
        height: 58px;
        padding: 0 8px;
        gap: 8px;
        justify-content: space-between;
    }

    .header .logo {
        order: 1;
        flex-shrink: 0;
        min-width: auto;
    }

    .header nav {
        order: 2;
        flex: 0;
    }

    .header .header-right {
        order: 3;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .logo {
        min-width: auto;
    }

    .logo img {
        height: 34px;
    }

    .mobile-menu-toggle {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 24px;
        line-height: 1;
    }

    .header-auth {
        gap: 8px;
    }

    .header-right {
        gap: 10px;
    }

    .nav-list {
        top: 58px;
    }

    .nav-list.active {
        max-height: 500px;
        padding: 12px 16px;
    }

    .nav-list a {
        padding: 12px 16px;
        width: 100%;
        text-align: left;
        border-radius: var(--radius-sm);
        margin: 2px 0;
    }

    .nav-list a:hover {
        background: var(--bg-hover);
        transform: none;
        color: var(--primary-color);
    }

    .btn-login,
    .btn-register {
        padding: 8px 14px;
        font-size: 11px;
        border-radius: var(--radius-sm);
    }

    .footer {
        padding: 48px 0 20px;
        margin-top: 60px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-col h4 {
        font-size: 15px;
    }

    .footer-col p,
    .footer-col a {
        font-size: 13px;
    }

    .footer-bottom {
        font-size: 12px;
        padding-top: 20px;
    }

    .ad-banner-container {
        margin-top: 72px;
        padding: 0 10px;
    }

    .ad-banner-container img {
        height: auto;
        min-height: 40px;
        border-radius: var(--radius-sm);
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .header .container {
        height: 52px;
        padding: 0 12px;
    }

    .logo img {
        height: 28px;
    }

    .btn-login,
    .btn-register {
        padding: 5px 10px;
        font-size: 11px;
    }

    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .footer {
        padding: 40px 0 20px;
        margin-top: 48px;
    }

    .footer-grid {
        gap: 24px;
    }

    .footer-col h4 {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .footer-col p,
    .footer-col a {
        font-size: 12px;
    }

    .footer-bottom {
        font-size: 11px;
        padding-top: 16px;
    }

    .ad-banner-container {
        margin-top: 64px;
    }

    .ad-banner-container img {
        height: auto;
        min-height: 35px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .header .container {
        height: 52px;
    }

    .logo img {
        height: 26px;
    }

    .btn-login,
    .btn-register {
        padding: 4px 8px;
        font-size: 10px;
    }

    .mobile-menu-toggle {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
}


/* ===============
   TOUCH & MOBILE OPTIMIZATIONS
   =============== */

/* Improve touch targets */
@media (max-width: 768px) {

    a,
    button,
    .btn-login,
    .btn-register,
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-list a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Prevent text selection on buttons */
button,
.btn-login,
.btn-register,
.mobile-menu-toggle {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling for all devices */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

/* Better focus states for accessibility */
a:focus-visible,
button:focus-visible,
.btn-login:focus-visible,
.btn-register:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Optimize images for mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent zoom on input focus (iOS) */
@media (max-width: 768px) {

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
    .header .container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .header {
        border-bottom: 2px solid var(--primary-color);
    }

    .game-card,
    .news-card,
    .feature-card {
        border-width: 2px;
    }
}

/* Dark mode is default, no overrides needed */
@media (prefers-color-scheme: dark) {
    /* Default dark theme */
}