/* ========================================
   STARCASINO ONLINE - MAIN STYLESHEET
   Based on design-system.json
   ======================================== */

/* ========================================
   CSS VARIABLES & DESIGN TOKENS
   ======================================== */
:root {
    /* Colors - Primary */
    --color-primary-teal: #1EB5C6;
    --color-primary-deep-blue: #0F4277;
    --color-primary-magenta: #811752;
    
    /* Colors - Neutrals */
    --color-white: #FFFFFF;
    --color-off-white: #F6F6F6;
    --color-panel: #E1DFE3;
    --color-divider: #D6D6DC;
    --color-muted-text: #AAA2B7;
    
    /* Colors - Text */
    --color-text-heading: #24555F;
    --color-text-body: #24555F;
    --color-text-inverse: #FFFFFF;
    --color-text-subtle: #AAA2B7;
    
    /* Colors - Accents */
    --color-accent-gold: #BF9343;
    --color-accent-gray: #B4B1B6;
    --color-accent-purple: #5D245E;
    
    /* Gradients */
    --gradient-hero: linear-gradient(90deg, #0F4277 0%, #811752 100%);
    --gradient-button: linear-gradient(90deg, #0D7C87 0%, #0F4277 100%);
    --gradient-button-hover: linear-gradient(90deg, #0A6A75 0%, #0D3C6B 100%);
    --gradient-button-active: linear-gradient(90deg, #085963 0%, #0A335B 100%);
    
    /* Shadows */
    --shadow-card: 0 10px 28px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-elevated: 0 16px 40px rgba(0,0,0,0.14);
    --shadow-button: 0 4px 10px rgba(15,66,119,0.25), 0 0 20px rgba(30,181,198,0.4);
    --shadow-focus: 0 0 0 3px rgba(30,181,198,0.35);
    
    /* Border Radius */
    --radius-card: 16px;
    --radius-card-small: 12px;
    --radius-button: 10px;
    --radius-input: 10px;
    --radius-chip: 999px;
    --radius-modal: 20px;
    
    /* Typography */
    --font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-size-h1: clamp(28px, 2.2vw, 40px);
    --font-size-h2: clamp(22px, 1.8vw, 32px);
    --font-size-h3: 20px;
    --font-size-body: 16px;
    --font-size-small: 14px;
    --font-size-caption: 12px;
    
    --font-weight-h1: 700;
    --font-weight-h2: 700;
    --font-weight-h3: 600;
    --font-weight-body: 400;
    --font-weight-button: 600;
    
    /* Animation */
    --duration-fast: 120ms;
    --duration-medium: 180ms;
    --duration-slow: 260ms;
    --easing-standard: cubic-bezier(0.2, 0.0, 0.0, 1.0);
    
    /* Spacing */
    --container-max-width: 1200px;
    --container-padding: 20px;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Pulsing glow animation for buttons */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 10px rgba(15,66,119,0.25), 
                    0 0 20px rgba(30,181,198,0.4);
    }
    50% {
        box-shadow: 0 4px 12px rgba(15,66,119,0.3), 
                    0 0 28px rgba(30,181,198,0.55);
    }
}

/* Subtle breathing animation */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.015);
    }
}

/* Slide down animation for mobile menu */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shine effect for button hover - one direction only */
@keyframes shine {
    from {
        left: -100%;
        opacity: 1;
    }
    to {
        left: 100%;
        opacity: 1;
    }
}

/* Combined pulse and breathe animation for content buttons */
@keyframes pulseAndBreathe {
    0%, 100% {
        box-shadow: 0 4px 10px rgba(15,66,119,0.25), 
                    0 0 20px rgba(30,181,198,0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 12px rgba(15,66,119,0.3), 
                    0 0 28px rgba(30,181,198,0.55);
        transform: scale(1.035);
    }
}

/* ========================================
   BASE STYLES
   ======================================== */

body {
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-body);
    color: var(--color-text-body);
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary-teal);
    text-decoration: none;
    transition: color var(--duration-fast) var(--easing-standard);
}

a:hover {
    color: var(--color-primary-deep-blue);
}

a:focus-visible {
    outline: 2px solid var(--color-primary-teal);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text-heading);
}

h1 {
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-h1);
}

h2 {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-h2);
}

h3 {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-h3);
}

p {
    margin-bottom: 1rem;
}

/* ========================================
   LAYOUT & CONTAINER
   ======================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

section {
    padding: 60px 0;
}

@media (max-width: 768px) {
    section {
        padding: 40px 0;
    }
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.topbar {
    background-color: var(--color-primary-teal);
    color: var(--color-text-inverse);
    padding: 12px 0;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.logo {
    flex-shrink: 1;
    min-width: 0;
    max-width: 180px;
}

.logo img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.topbar-actions {
    display: flex;
    gap: 12px;
}

/* Main Navigation */
.main-nav {
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,249,250,1) 100%);
    border-bottom: 1px solid var(--color-divider);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
}

.main-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(30,181,198,0.3) 50%, transparent 100%);
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 32px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--color-text-body);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    transition: all var(--duration-medium) var(--easing-standard);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, #1EB5C6 0%, #0F4277 100%);
    border-radius: 2px;
    transition: transform var(--duration-medium) var(--easing-standard);
}

.nav-menu a:hover {
    color: var(--color-primary-teal);
    background-color: rgba(30,181,198,0.08);
    transform: translateY(-1px);
}

.nav-menu a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-menu a:active {
    transform: translateY(0);
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(30,181,198,0.1) 0%, rgba(15,66,119,0.1) 100%);
    border: 2px solid rgba(30,181,198,0.3);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: all var(--duration-medium) var(--easing-standard);
}

.burger:hover {
    background: linear-gradient(135deg, rgba(30,181,198,0.2) 0%, rgba(15,66,119,0.2) 100%);
    border-color: rgba(30,181,198,0.5);
    transform: scale(1.05);
}

.burger-inner {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--gradient-button);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: center;
}

.burger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ToC Strip */
.toc-strip {
    background: linear-gradient(180deg, #E8E6EC 0%, #D8D6DC 100%);
    border-bottom: 2px solid rgba(30,181,198,0.2);
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.toc-strip .container {
    padding: 0;
    max-width: 100%;
}

.toc-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px 60px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.toc-nav::-webkit-scrollbar {
    display: none;
}

.toc-item {
    white-space: nowrap;
    padding: 14px 28px;
    color: var(--color-text-body);
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid transparent;
    border-radius: 28px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toc-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30,181,198,0.15), transparent);
    transition: left 0.5s;
}

.toc-item:hover {
    background: linear-gradient(135deg, rgba(30,181,198,0.15) 0%, rgba(15,66,119,0.08) 100%);
    border-color: var(--color-primary-teal);
    box-shadow: 0 6px 16px rgba(30,181,198,0.25);
    transform: translateY(-3px) scale(1.05);
}

.toc-item:hover::before {
    left: 100%;
}

.toc-item.active {
    background: var(--gradient-button);
    color: var(--color-text-inverse);
    border-color: var(--color-primary-teal);
    box-shadow: 0 6px 16px rgba(30, 181, 198, 0.4), 0 0 20px rgba(30,181,198,0.3);
}

.toc-item.active::before {
    display: none;
}

/* Mobile Header */
@media (max-width: 968px) {
    .main-nav {
        position: sticky;
        top: 0;
        z-index: 1000;
        padding: 0;
    }
    
    .main-nav .container {
        position: relative;
        max-width: 100%;
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
        box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1);
        padding: 20px 16px;
        border-radius: 0 0 20px 20px;
        z-index: 999;
        max-height: 70vh;
        overflow-y: auto;
        
        /* Grid layout for 2 columns */
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: start;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        padding: 16px 12px;
        border-radius: 12px;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border: 2px solid transparent;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        font-size: 14px;
        font-weight: 600;
        text-align: center;
        display: block;
        position: relative;
        overflow: hidden;
    }
    
    .nav-menu a::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(30,181,198,0.2), transparent);
        transition: left 0.5s;
    }
    
    .nav-menu a:hover {
        background: linear-gradient(135deg, rgba(30,181,198,0.15) 0%, rgba(15,66,119,0.08) 100%);
        border-color: var(--color-primary-teal);
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 16px rgba(30,181,198,0.25);
    }
    
    .nav-menu a:hover::before {
        left: 100%;
    }
    
    .nav-menu a:active {
        transform: translateY(-1px) scale(0.98);
    }
    
    .nav-menu.active {
        display: grid;
        animation: slideDown 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
    
    .burger {
        display: flex;
        width: 100%;
        height: 65px;
        border-radius: 0;
        border: none;
        border-top: 2px solid rgba(30,181,198,0.2);
        border-bottom: 3px solid rgba(30,181,198,0.25);
        background: linear-gradient(135deg, 
            rgba(247,147,26,0.08) 0%, 
            rgba(30,181,198,0.12) 50%, 
            rgba(15,66,119,0.1) 100%);
        justify-content: center;
        align-items: center;
        position: relative;
        overflow: hidden;
        transition: all 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08), 
                    inset 0 1px 0 rgba(255,255,255,0.4);
    }
    
    /* Animated gradient background on hover */
    .burger::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(247,147,26,0.15) 50%, 
            transparent 100%);
        transition: left 0.5s ease;
        z-index: 1;
    }
    
    .burger:hover::before {
        left: 100%;
    }
    
    /* Menu text with icon */
    .burger::after {
        content: '☰  Menu Navigazione';
        position: relative;
        z-index: 2;
        font-size: 17px;
        font-weight: 700;
        background: linear-gradient(135deg, 
            var(--color-primary-teal) 0%, 
            var(--color-primary-deep-blue) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }
    
    .burger:hover {
        background: linear-gradient(135deg, 
            rgba(247,147,26,0.15) 0%, 
            rgba(30,181,198,0.18) 50%, 
            rgba(15,66,119,0.15) 100%);
        box-shadow: 0 4px 16px rgba(30,181,198,0.25), 
                    inset 0 1px 0 rgba(255,255,255,0.5),
                    0 0 20px rgba(247,147,26,0.15);
        border-bottom-color: rgba(30,181,198,0.4);
    }
    
    .burger:hover::after {
        transform: scale(1.05);
        text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    .burger:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0,0,0,0.1), 
                    inset 0 1px 0 rgba(255,255,255,0.3);
    }
    
    /* Active state when menu is open */
    .burger.active {
        background: linear-gradient(135deg, 
            rgba(30,181,198,0.18) 0%, 
            rgba(15,66,119,0.15) 50%, 
            rgba(247,147,26,0.12) 100%);
        border-top-color: rgba(30,181,198,0.3);
        border-bottom-color: rgba(15,66,119,0.3);
        box-shadow: 0 2px 12px rgba(30,181,198,0.3), 
                    inset 0 -2px 8px rgba(0,0,0,0.05);
    }
    
    .burger.active::after {
        content: '✕  Chiudi Menu';
        background: linear-gradient(135deg, 
            #0F4277 0%, 
            #0D7C87 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    /* Hide burger icon lines in mobile full-width mode */
    .burger .burger-inner {
        display: none;
    }
    
    .topbar-inner {
        padding: 0 16px;
        gap: 10px;
    }
    
    .logo {
        max-width: 130px;
    }
    
    .topbar-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .topbar-actions .btn {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
        gap: 6px;
    }
    
    .topbar-actions .btn svg {
        width: 15px;
        height: 15px;
    }
    
    /* Faster pulse animation for mobile header buttons */
    .topbar-actions .btn--primary {
        animation: pulseGlow 2.5s ease-in-out infinite;
    }
    
    
    /* TOC mobile fixes */
    .toc-nav {
        justify-content: flex-start;
        padding: 16px 20px;
        gap: 12px;
    }
    
    .toc-item {
        flex-shrink: 0;
        padding: 12px 22px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .topbar-inner {
        gap: 8px;
    }
    
    .logo {
        max-width: 105px;
    }
    
    .topbar-actions {
        gap: 6px;
    }
    
    .topbar-actions .btn {
        padding: 9px 12px;
        font-size: 12px;
        gap: 5px;
    }
    
    .topbar-actions .btn svg {
        width: 14px;
        height: 14px;
    }
    
    .burger {
        height: 58px;
    }
    
    .burger::after {
        font-size: 15px;
        letter-spacing: 0.6px;
    }
    
    .toc-nav {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .toc-item {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .nav-menu {
        padding: 16px 12px;
        gap: 10px;
    }
    
    .nav-menu a {
        padding: 14px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .topbar-inner {
        gap: 6px;
    }
    
    .logo {
        max-width: 90px;
    }
    
    .topbar-actions {
        gap: 5px;
    }
    
    .topbar-actions .btn {
        padding: 8px 10px;
        font-size: 11px;
        gap: 4px;
    }
    
    .topbar-actions .btn svg {
        width: 13px;
        height: 13px;
    }
    
    .burger {
        width: 100%;
        height: 52px;
    }
    
    .burger::after {
        content: '☰  Menu';
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    .toc-nav {
        padding: 12px 14px;
        gap: 8px;
    }
    
    .toc-item {
        padding: 9px 16px;
        font-size: 12px;
    }
    
    .nav-menu {
        grid-template-columns: 1fr;
        padding: 14px 10px;
        gap: 8px;
    }
    
    .nav-menu a {
        padding: 12px 10px;
        font-size: 12px;
    }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    min-width: 60px;
    font-family: var(--font-family);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-button);
    text-align: center;
    border: none;
    border-radius: var(--radius-button);
    cursor: pointer;
    transition: all var(--duration-medium) var(--easing-standard);
    text-decoration: none;
}

.btn svg {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform var(--duration-medium) var(--easing-standard);
}

.btn:hover svg {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Ensure text is above pseudo-elements */
.btn--primary > * {
    position: relative;
    z-index: 1;
}

.btn--primary {
    background: var(--gradient-button);
    color: var(--color-text-inverse);
    box-shadow: 0 4px 10px rgba(15,66,119,0.25), 0 0 20px rgba(30,181,198,0.4);
    position: relative;
    overflow: hidden;
    border: none;
    animation: pulseGlow 3s ease-in-out infinite;
}

/* Animated shine effect - only on hover, no return animation */
.btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%);
    opacity: 0;
    transition: none;
}

.btn--primary:hover::before {
    animation: shine 0.6s ease forwards;
}

/* Inner glow */
.btn--primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.15) 0%, 
        transparent 50%, 
        rgba(0,0,0,0.1) 100%);
    pointer-events: none;
    border-radius: inherit;
}

.btn--primary:hover {
    background: var(--gradient-button-hover);
    box-shadow: 0 6px 16px rgba(15,66,119,0.35), 
                0 0 30px rgba(30,181,198,0.6),
                inset 0 1px 2px rgba(255,255,255,0.2);
    transform: translateY(-2px) scale(1.02);
    animation: none; /* Stop pulse animation on hover */
}

.btn--primary:active {
    background: var(--gradient-button-active);
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 2px 8px rgba(15,66,119,0.3), 
                0 0 15px rgba(30,181,198,0.4),
                inset 0 2px 4px rgba(0,0,0,0.2);
}

.btn--primary:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus), 
                0 0 0 4px rgba(30,181,198,0.25);
}

/* Content buttons with breathing animation */
main .btn--primary,
section .btn--primary,
.hero-section .btn--primary,
.bonus-section .btn--primary,
.content .btn--primary {
    animation: pulseAndBreathe 3s ease-in-out infinite;
}

/* Keep header buttons without scale animation */
.topbar .btn--primary,
.topbar-actions .btn--primary {
    animation: pulseGlow 2.5s ease-in-out infinite;
}

/* Stop all animations on hover */
main .btn--primary:hover,
section .btn--primary:hover,
.hero-section .btn--primary:hover,
.bonus-section .btn--primary:hover,
.content .btn--primary:hover {
    animation: none;
}

.btn--secondary {
    background-color: var(--color-white);
    color: var(--color-text-body);
    border: 1px solid var(--color-primary-teal);
}

.btn--secondary:hover {
    background-color: var(--color-off-white);
    border-color: var(--color-primary-deep-blue);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    background: var(--gradient-hero);
    padding: 60px 0 80px;
    color: var(--color-text-inverse);
}

.hero-section h1 {
    color: var(--color-text-inverse);
    margin-bottom: 24px;
    text-align: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 32px;
}

.hero-text p {
    color: var(--color-text-inverse);
    margin-bottom: 20px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-inverse);
    font-size: var(--font-size-small);
    opacity: 0.9;
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-image img {
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-elevated);
    width: 100%;
}

.cta-hero {
    width: 100%;
    max-width: 300px;
}

.fact-checked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding: 12px 24px;
    background-color: rgba(255,255,255,0.1);
    border-radius: var(--radius-chip);
    font-size: var(--font-size-small);
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .hero-section {
        padding: 40px 0 50px;
    }
}

/* ========================================
   GAMES SECTION
   ======================================== */
.games-section {
    background-color: var(--color-off-white);
}

.games-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.game-card {
    position: relative;
    background-color: var(--color-white);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-medium) var(--easing-standard);
}

.game-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.game-card h3 {
    padding: 16px;
    font-size: 18px;
    text-align: center;
    color: var(--color-text-heading);
    margin: 0;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 66, 119, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-medium) var(--easing-standard);
}

.game-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-teal);
    box-shadow: var(--shadow-elevated);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .game-card {
        min-width: 160px;
        scroll-snap-align: start;
    }
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */
section[id] {
    scroll-margin-top: 180px;
}

.section-figure {
    margin: 32px auto;
    text-align: center;
    max-width: 700px;
}

.section-figure img {
    display: inline-block;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card), 0 0 0 1px #000000;
    max-width: 100%;
    height: auto;
}

.content {
    max-width: 900px;
    margin: 0 auto;
}

.content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
}

.content ul, .content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.content li {
    margin-bottom: 8px;
}

/* ========================================
   PROS & CONS
   ======================================== */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin: 32px 0;
}

.pros-col h4, .cons-col h4 {
    font-size: 20px;
    margin-bottom: 16px;
}

.pros-list, .cons-list {
    list-style: none;
    padding: 0;
}

.pros-list li, .cons-list li {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: var(--radius-card-small);
    background-color: var(--color-off-white);
}

.pros-list li svg {
    min-width: 20px;
    color: #22c55e;
}

.cons-list li svg {
    min-width: 20px;
    color: #ef4444;
}

@media (max-width: 768px) {
    .pros-cons {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ========================================
   STEP CARDS
   ======================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    list-style: none;
    margin: 32px 0;
    padding: 0;
}

.step-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    background-color: var(--color-white);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: all var(--duration-medium) var(--easing-standard);
}

.step-card:hover {
    border-color: var(--color-primary-teal);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.step-index {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-button);
    color: var(--color-text-inverse);
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
}

.step-body p {
    margin: 0;
}

@media (max-width: 768px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   BONUS SLIDER
   ======================================== */
.bonus-slider {
    position: relative;
    margin: 40px 0;
}

.bonus-cards-wrapper {
    overflow: hidden;
    padding: 32px 0;
}

.bonus-cards {
    display: flex;
    gap: 24px;
    list-style: none;
    padding: 0 12px;
    transition: transform var(--duration-slow) var(--easing-standard);
}

.bonus-card {
    min-width: calc(50% - 12px);
    flex-shrink: 0;
    background-color: var(--color-white);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-card);
    padding: 32px;
    box-shadow: var(--shadow-card);
    position: relative;
    transition: all var(--duration-medium) var(--easing-standard);
}

.bonus-card:hover {
    border-color: var(--color-primary-teal);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-4px);
}

.bonus-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background-color: var(--color-accent-gold);
    color: var(--color-text-inverse);
    font-size: var(--font-size-small);
    font-weight: 600;
    border-radius: var(--radius-chip);
}

.bonus-title {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: var(--color-text-heading);
}

.bonus-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary-teal);
    margin: 8px 0;
}

.bonus-desc {
    font-size: var(--font-size-small);
    color: var(--color-text-subtle);
    margin: 16px 0;
}

.bonus-card .btn {
    width: 100%;
    margin-top: 16px;
}

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-white);
    border: 1px solid var(--color-divider);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-fast) var(--easing-standard);
    z-index: 10;
}

.slider-prev {
    left: -24px;
}

.slider-next {
    right: -24px;
}

.slider-prev:hover, .slider-next:hover {
    background-color: var(--color-primary-teal);
    color: var(--color-text-inverse);
    border-color: var(--color-primary-teal);
}

.slider-prev svg, .slider-next svg {
    fill: currentColor;
}

@media (max-width: 968px) {
    .bonus-card {
        min-width: calc(50% - 12px);
        padding: 24px;
    }
    
    .slider-prev {
        left: 0;
    }
    
    .slider-next {
        right: 0;
    }
}

@media (max-width: 768px) {
    .bonus-cards-wrapper {
        padding: 24px 0;
    }
    
    .bonus-cards {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 20px 16px 20px;
        gap: 16px;
    }
    
    .bonus-card {
        min-width: calc(100% - 40px);
        max-width: calc(100% - 40px);
        padding: 20px 16px;
        scroll-snap-align: center;
    }
    
    .bonus-title {
        font-size: 17px;
        margin: 0 0 6px 0;
    }
    
    .bonus-amount {
        font-size: 24px;
        margin: 6px 0;
    }
    
    .bonus-desc {
        font-size: 13px;
        margin: 12px 0;
        line-height: 1.5;
    }
    
    .bonus-card .btn {
        margin-top: 12px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .bonus-badge {
        top: 12px;
        right: 12px;
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .slider-prev, .slider-next {
        display: none;
    }
}

@media (max-width: 640px) {
    .bonus-cards-wrapper {
        padding: 20px 0;
    }
    
    .bonus-cards {
        padding: 0 20px 16px 20px;
        gap: 16px;
    }
    
    .bonus-card {
        min-width: calc(100% - 40px);
        max-width: calc(100% - 40px);
        padding: 18px 14px;
    }
    
    .bonus-title {
        font-size: 16px;
        margin: 0 0 6px 0;
    }
    
    .bonus-amount {
        font-size: 22px;
        margin: 6px 0;
    }
    
    .bonus-desc {
        font-size: 12px;
        margin: 10px 0;
        line-height: 1.4;
    }
    
    .bonus-card .btn {
        margin-top: 10px;
        padding: 11px 14px;
        font-size: 13px;
    }
    
    .bonus-badge {
        top: 10px;
        right: 10px;
        padding: 3px 8px;
        font-size: 10px;
    }
}

/* ========================================
   TABLES
   ======================================== */
.table-wrapper {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-white);
}

thead {
    background-color: var(--color-off-white);
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-divider);
}

th {
    font-weight: 600;
    color: var(--color-text-heading);
}

tr:hover {
    background-color: rgba(30,181,198,0.06);
}

@media (max-width: 640px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        margin-bottom: 16px;
        border: 1px solid var(--color-divider);
        border-radius: var(--radius-card);
        padding: 16px;
    }
    
    td {
        border: none;
        position: relative;
        padding-left: 50%;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    td:before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        font-weight: 600;
        color: var(--color-text-heading);
    }
}

/* ========================================
   AUTHOR SECTION
   ======================================== */
.author-section {
    background-color: var(--color-off-white);
}

.author-card {
    display: flex;
    gap: 24px;
    padding: 32px;
    background-color: var(--color-white);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    max-width: 900px;
    margin: 0 auto;
}

.author-avatar {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h3 {
    margin: 0 0 12px 0;
}

.author-info p {
    margin-bottom: 12px;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-small);
    color: var(--color-text-subtle);
    margin: 0;
}

@media (max-width: 640px) {
    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq-section {
    background-color: var(--color-white);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--color-white);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-card);
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

.faq-item summary {
    padding: 20px 24px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--duration-fast) var(--easing-standard);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    color: var(--color-primary-teal);
    transition: transform var(--duration-medium) var(--easing-standard);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    color: var(--color-primary-teal);
}

.faq-content {
    padding: 0 24px 24px 24px;
}

.faq-content p {
    margin: 0;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--gradient-hero);
    color: var(--color-text-inverse);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--color-text-inverse);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--color-text-inverse);
    opacity: 0.9;
    transition: opacity var(--duration-fast) var(--easing-standard);
}

.footer-col a:hover {
    opacity: 1;
}

.footer-brand p {
    opacity: 0.9;
    font-size: var(--font-size-small);
    margin-top: 16px;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.payment-methods svg {
    opacity: 0.9;
    transition: opacity var(--duration-fast) var(--easing-standard);
}

.payment-methods svg:hover {
    opacity: 1;
}

.responsible-gaming-logo {
    display: inline-block;
    margin-bottom: 12px;
}

.responsible-text {
    font-size: var(--font-size-small);
    opacity: 0.9;
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-small);
    opacity: 0.9;
    margin: 8px 0;
}

.disclaimer {
    font-size: var(--font-size-caption);
}

@media (max-width: 968px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 54px;
    height: 54px;
    background: var(--gradient-button);
    color: var(--color-text-inverse);
    border: 2px solid rgba(30,181,198,0.3);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(15,66,119,0.3), 
                0 0 24px rgba(30,181,198,0.5);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--duration-medium) var(--easing-standard);
    z-index: 999;
    overflow: hidden;
    animation: pulseGlow 3.5s ease-in-out infinite;
}

#back-to-top::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255,255,255,0.3) 0%, 
        transparent 70%);
    animation: breathe 2s ease-in-out infinite;
}

#back-to-top svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

#back-to-top.visible {
    display: flex;
    opacity: 1;
}

#back-to-top:hover {
    background: var(--gradient-button-hover);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 20px rgba(15,66,119,0.4), 
                0 0 35px rgba(30,181,198,0.7);
    border-color: rgba(30,181,198,0.6);
    animation: none;
}

#back-to-top:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 3px 12px rgba(15,66,119,0.35), 
                0 0 20px rgba(30,181,198,0.5);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .site-header,
    .toc-strip,
    .games-section,
    .bonus-slider,
    .site-footer,
    #back-to-top,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
}
