/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
    color: #E7E5E4;
    background-color: #1C1917;
    font-weight: 400;
}

/* Color System - Dungeon Theme */
:root {
    /* Primary Colors */
    --primary: #F59E0B; /* Torch Gold */
    --primary-dark: #D97706;
    --primary-light: #FCD34D;
    
    /* Secondary Colors */
    --secondary: #92400E; /* Dungeon Brown */
    --secondary-dark: #78350F;
    --secondary-light: #A3A3A3;
    
    /* Accent Colors */
    --accent: #DC2626; /* Ember Red */
    --accent-dark: #B91C1C;
    --accent-light: #FCA5A5;
    
    /* Neutral Colors */
    --background: #1C1917; /* Deep Stone */
    --surface: #2C2417; /* Stone Surface */
    --surface-light: #44403C;
    --text-primary: #E7E5E4;
    --text-secondary: #A3A3A3;
    --text-muted: #78716C;
    
    /* State Colors */
    --success: #16A34A;
    --warning: #EA580C;
    --error: #DC2626;
    
    /* Spacing System (8px base) */
    --space-1: 0.5rem;  /* 8px */
    --space-2: 1rem;    /* 16px */
    --space-3: 1.5rem;  /* 24px */
    --space-4: 2rem;    /* 32px */
    --space-5: 2.5rem;  /* 40px */
    --space-6: 3rem;    /* 48px */
    --space-8: 4rem;    /* 64px */
    --space-10: 5rem;   /* 80px */
    --space-12: 6rem;   /* 96px */
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
    line-height: 1.6;
}

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

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

a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Container System */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-3);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-2);
    }
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    font-family: inherit;
    line-height: 1;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--background);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--surface-light);
}

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.btn-hero {
    padding: var(--space-3) var(--space-6);
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: var(--shadow-lg);
    animation: pulse-glow 2s infinite;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-link {
    background: transparent;
    color: var(--primary);
    padding: var(--space-1) var(--space-2);
}

.btn-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: var(--shadow-xl), 0 0 0 8px rgba(245, 158, 11, 0); }
}

/* Header Styles */
.site-header {
    background: var(--background);
    border-bottom: 1px solid var(--surface);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.nav-logo .logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-6);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 2px 0;
    transition: all var(--transition-fast);
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-container {
        padding: 0 var(--space-2);
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--background) 0%, var(--surface) 50%, var(--secondary-dark) 100%);
    overflow: hidden;
}

.hero-bg {
    position: relative;
    width: 100%;
    z-index: 2;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(146, 64, 14, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--space-3);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-content {
        padding: var(--space-6) var(--space-2);
    }
}

/* Section Styles */
.section-title {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto var(--space-6);
    line-height: 1.6;
}

/* Command Section */
.command-section {
    padding: var(--space-10) 0;
    background: var(--surface);
}

/* Game Demo Section */
.game-demo-section {
    padding: var(--space-10) 0;
    background: linear-gradient(180deg, var(--background) 0%, var(--surface) 100%);
}

.game-container {
    display: flex;
    justify-content: center;
    margin: var(--space-8) 0;
}

.game-image {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    width: 100%;
}

.game-screenshot {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--primary);
    transition: transform var(--transition-normal);
}

.game-screenshot:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .game-image {
        margin: 0 var(--space-2);
    }
}

/* Play Game Button */
.play-game-btn:hover {
    color: black !important;
}

/* About Section */
.about-section {
    padding: var(--space-10) 0;
    background: var(--surface);
}

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

.about-text h2 {
    color: var(--primary);
    margin-bottom: var(--space-4);
}

.about-text h3 {
    color: var(--text-primary);
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
    font-size: 1.3rem;
}

.about-text p {
    margin-bottom: var(--space-3);
    line-height: 1.7;
}


/* Footer Styles */
.site-footer {
    background: var(--background);
    border-top: 1px solid var(--surface);
    padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.footer-rg-logos {
    margin-bottom: var(--space-6);
    text-align: center;
}

.footer-rg-logos h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.rg-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.rg-logo {
    height: 60px;
    width: auto;
    transition: opacity var(--transition-fast);
}

.rg-logo:hover {
    opacity: 0.8;
}

.rg-logo[alt="GamCare"],
.rg-logo[alt="GambleAware"] {
    background: white;
    padding: 8px;
    border-radius: 4px;
}

.support-img[alt="GamCare"],
.support-img[alt="GambleAware"] {
    background: white;
    padding: 8px;
    border-radius: 4px;
}

.footer-disclaimer {
    text-align: center;
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary);
}

.disclaimer-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-2);
}

.disclaimer-subtext {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.footer-col h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    font-size: 1.1rem;
}

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

.footer-col li {
    margin-bottom: var(--space-2);
}

.footer-col a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--surface);
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: var(--space-3);
}

.social-links a {
    font-size: 1.5rem;
    transition: transform var(--transition-fast);
}

.social-links a:hover {
    transform: scale(1.2);
}

@media (max-width: 1024px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
    }
    
    .rg-logos {
        gap: var(--space-3);
    }
    
    .rg-logo {
        height: 40px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--primary);
}

.age-gate {
    text-align: center;
}

.age-gate-header {
    margin-bottom: var(--space-4);
}

.age-gate-logo {
    height: 60px;
    width: auto;
    margin-bottom: var(--space-3);
}

.age-gate h2 {
    color: var(--primary);
    margin-bottom: var(--space-3);
}

.age-gate p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.age-gate-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    margin-bottom: var(--space-4);
}

.rg-links {
    list-style: none;
    text-align: left;
    margin-top: var(--space-3);
}

.rg-links li {
    margin-bottom: var(--space-2);
}

.rg-links a {
    color: var(--primary);
    font-weight: 500;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--primary);
    padding: var(--space-4);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.cookie-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.cookie-content p {
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .age-gate-buttons {
        flex-direction: column;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .cookie-banner,
    .modal-overlay {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}