/* ===============
   CSS VARIABLES - LUXURY CASINO THEME
   =============== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    /* Primary - Emerald Green & Gold */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --gold-dark: #d97706;
    
    /* Secondary - Rich Tones */
    --secondary-color: #0ea5e9;
    --secondary-light: #38bdf8;
    --accent-cyan: #06b6d4;
    --accent-rose: #f43f5e;
    
    /* Background - Deep Dark */
    --bg-color: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #171717;
    --bg-hover: #1f1f1f;
    
    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    
    /* Borders */
    --border-color: #262626;
    --border-light: #404040;
    --border-gold: rgba(245, 158, 11, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 20px rgba(245, 158, 11, 0.3);
    --shadow-emerald: 0 0 20px rgba(16, 185, 129, 0.3);
    
    /* Radii - Sharper corners */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-speed: 0.2s;
    
    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', 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-image:
        radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(6, 182, 212, 0.03) 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 - MINIMAL DARK
   =============== */
.header {
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header.scroll-down {
    transform: translateY(0);
}

.header.scroll-up {
    transform: translateY(0);
    box-shadow: var(--shadow-xl);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: none;
    transition: transform var(--transition-speed);
}

.logo:hover img {
    transform: scale(1.03);
}

.nav-list {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-list a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-list a:hover,
.nav-list a.active {
    background: var(--bg-hover);
    color: var(--gold);
    border-color: var(--border-gold);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-primary) !important;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.btn-login:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    color: var(--gold) !important;
}

.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000 !important;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    border: none;
    transition: all 0.2s ease;
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.mobile-menu-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--gold);
    font-size: 22px;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--border-gold);
}

/* ===============
   ADS BLOCK
   =============== */
.ad-banner-container {
    margin-top: 80px;
    text-align: center;
}

.ad-banner-container a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.ad-banner-container img {
    width: 100%;
    height: auto;
    min-height: 50px;
    max-height: 120px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
    transition: transform 0.3s ease;
}

.ad-banner-container a:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
    border-color: var(--border-gold);
}

.ad-banner-container a:hover img {
    transform: scale(1.02);
}

/* ===============
   FOOTER - MINIMAL DARK
   =============== */
.footer {
    background: var(--bg-elevated);
    padding: 60px 0 24px;
    margin-top: 80px;
    position: relative;
    border-top: 1px solid var(--border-color);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), 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: 20px;
    color: var(--text-primary);
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}

.footer-col p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.footer-col a::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s;
}

.footer-col a:hover {
    color: var(--gold);
    padding-left: 6px;
}

.footer-col a:hover::before {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
}

/* ===============
   RESPONSIVE
   =============== */

/* Tablet and below */
@media (max-width: 992px) {
    .nav-list {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .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 16px;
    }

    .header .container {
        height: 56px;
        padding: 0 16px;
    }

    .logo img {
        height: 32px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .header-right {
        gap: 8px;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        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: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .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(--gold);
    }

    .btn-login,
    .btn-register {
        padding: 6px 12px;
        font-size: 12px;
        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(--gold);
    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(--gold);
    }

    .game-card,
    .news-card,
    .feature-card {
        border-width: 2px;
    }
}

/* Dark mode is default, no overrides needed */
@media (prefers-color-scheme: dark) {
    /* Default dark theme */
}