@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;800&family=Inter:wght@300;400;600&family=Orbitron:wght@500;700&display=swap');

:root {
    --bg-dark: #0f0b08;
    --bg-surface: #1a140f;
    --bg-surface-light: #2a1f16;
    
    /* Updated to a vibrant Red and Yellow mix */
    --color-gold: #FFD700; 
    --color-gold-hover: #FFFF00;
    --color-lava: #FF2A00;
    --color-cyan: #00ffd5;
    --color-red: #D50000;
    
    --text-main: #e6dfd8;
    --text-muted: #9e8e7f;
    
    --font-heading: 'Cinzel', serif;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;

    --sidebar-width-collapsed: 80px;
    --sidebar-width-expanded: 300px; /* Increased to fix text cutting off */
    
    --glass-bg: rgba(26, 20, 15, 0.7);
    --glass-border: rgba(255, 215, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    background-image: radial-gradient(circle at 50% 0%, rgba(255, 42, 0, 0.08) 0%, transparent 70%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin-bottom: 1.5rem; font-size: clamp(1rem, 1.1vw, 1.125rem); color: var(--text-muted); }
a { color: var(--color-gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--color-lava); }

/* Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width-collapsed);
    background: var(--bg-surface);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1000;
    overflow-y: auto; /* Fixes content cutting vertically */
    overflow-x: hidden;
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--color-lava);
    border-radius: 4px;
}

.sidebar:hover {
    width: var(--sidebar-width-expanded);
}

.sidebar-logo {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    min-width: var(--sidebar-width-expanded);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo .icon {
    width: 40px;
    height: 40px;
    fill: var(--color-gold);
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px var(--color-lava));
}

.sidebar-logo .brand-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-gold);
    margin-left: 15px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.sidebar:hover .brand-text {
    opacity: 1;
}

.nav-links {
    list-style: none;
    margin-top: 2rem;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 15px 28px;
    color: var(--text-muted);
    min-width: var(--sidebar-width-expanded);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--color-gold);
    transform: scaleY(0);
    transition: transform 0.3s;
    transform-origin: left;
    box-shadow: 0 0 10px var(--color-gold);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--color-gold);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
}

.nav-links a:hover::before, .nav-links a.active::before {
    transform: scaleY(1);
}

.nav-links a svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0;
    transition: transform 0.3s, filter 0.3s;
}

.nav-links a:hover svg, .nav-links a.active svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--color-gold));
}

.nav-links .link-text {
    margin-left: 20px;
    font-family: var(--font-heading);
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-weight: 600;
}

.sidebar:hover .link-text {
    opacity: 1;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    background: var(--bg-surface);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width-collapsed);
    transition: margin-left 0.4s;
    display: flex;
    flex-direction: column;
}

/* Hero Disclaimer */
.hero-disclaimer {
    background: #ff3c381a;
    border-bottom: 1px solid var(--color-red);
    color: var(--text-main);
    text-align: center;
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 10;
}

.hero-disclaimer span {
    color: var(--color-red);
    font-weight: 800;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 10%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.4;
    mix-blend-mode: luminosity;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, transparent 100%),
                radial-gradient(circle at 80% 80%, rgba(255, 42, 0, 0.25) 0%, transparent 60%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    background: transparent;
    color: var(--bg-dark);
    text-decoration: none;
    z-index: 1;
}

.btn-gold {
    background: linear-gradient(45deg, var(--color-gold), var(--color-lava));
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(255, 42, 0, 0.3);
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 42, 0, 0.5);
    color: var(--bg-dark);
}

.btn-gold:hover::before {
    left: 100%;
}

.btn-outline {
    border: 2px solid var(--color-gold);
    color: var(--color-gold);
    border-radius: 4px;
}

.btn-outline:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Sections */
.section {
    padding: 6rem 5%;
    position: relative;
}

.section-dark {
    background: var(--bg-dark);
}

.section-surface {
    background: var(--bg-surface);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    background: var(--bg-surface-light);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s, box-shadow 0.4s;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.15);
    border-color: var(--color-gold);
}

.game-card-img-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
}

.game-card-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-card:hover .game-card-img {
    transform: scale(1.1);
}

.game-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

/* Feature Cards */
.feature-card {
    background: linear-gradient(180deg, var(--bg-surface-light) 0%, var(--bg-surface) 100%);
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 50px; height: 2px;
    background: var(--color-lava);
    box-shadow: 0 0 15px var(--color-lava);
}

.feature-icon {
    width: 60px; height: 60px;
    fill: var(--color-gold);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

/* Game Frame (game page) */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 2px solid var(--color-gold);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 0 50px rgba(255, 42, 0, 0.2), inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
}

.game-container::before, .game-container::after {
    content: '';
    position: absolute;
    width: 30px; height: 30px;
    border: 2px solid var(--color-lava);
}
.game-container::before { top: -10px; left: -10px; border-right: none; border-bottom: none; }
.game-container::after { bottom: -10px; right: -10px; border-left: none; border-top: none; }

.game-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.game-iframe-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Page Headers */
.page-header {
    padding: 8rem 5% 4rem;
    background: url('images/dark-fantasy-glowing-cave.png') center/cover;
    position: relative;
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 11, 8, 0.85);
}

.page-header-content {
    position: relative;
    z-index: 1;
}

/* Footer */
.site-footer {
    background: #0a0705;
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--color-lava);
    position: relative;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--color-gold);
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--color-gold);
    padding-left: 5px;
}

.footer-disclaimer-box {
    background: var(--bg-surface);
    padding: 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    text-align: center;
    margin-bottom: 2rem;
}

.footer-disclaimer-box p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.badge-icon {
    width: 40px; height: 40px;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: var(--text-muted);
}

/* FAQ Accordion */
.faq-item {
    background: var(--bg-surface-light);
    border: 1px solid var(--glass-border);
    margin-bottom: 1rem;
    border-radius: 4px;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-weight: 600;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

.faq-item.active .faq-question {
    color: var(--color-lava);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Particles (CSS hack for subtle floating dust) */
.particles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: var(--color-gold);
    border-radius: 50%;
    opacity: 0;
    animation: float-up 5s infinite linear;
}

@keyframes float-up {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* Generate random particles via CSS */
.particle:nth-child(1) { left: 10%; width: 2px; height: 2px; animation-duration: 6s; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; width: 3px; height: 3px; animation-duration: 8s; animation-delay: 2s; background: var(--color-lava);}
.particle:nth-child(3) { left: 50%; width: 1px; height: 1px; animation-duration: 5s; animation-delay: 1s; }
.particle:nth-child(4) { left: 70%; width: 4px; height: 4px; animation-duration: 7s; animation-delay: 3s; }
.particle:nth-child(5) { left: 90%; width: 2px; height: 2px; animation-duration: 9s; animation-delay: 0.5s; background: var(--color-cyan);}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero {
        padding-top: 6rem;
    }
}