
/* =========================================
   1. Reset & Variables
   ========================================= */
:root {
    /* Colors */
    --color-bg-body: #0f1218;
    --color-bg-surface: #1a1d24;
    --color-bg-card: #242830;
    --color-primary: #ffbe0b;
    --color-primary-dark: #fb5607;
    --color-secondary: #3a86ff;
    --color-text-main: #f8f9fa;
    --color-text-muted: #adb5bd;
    --color-border: #343a40;
    --color-success: #2ec4b6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-surface: linear-gradient(180deg, rgba(36,40,48,0.9) 0%, rgba(36,40,48,1) 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(255, 190, 11, 0.15) 0%, transparent 70%);

    /* Typography */
    --font-family-base: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;

    /* Spacing & Sizes */
    --container-width: 1200px;
    --header-height: 4.5rem;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(251, 86, 7, 0.4);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    font-family: var(--font-family-base);
    line-height: var(--line-height-base);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

ul, ol {
    list-style: none;
    padding-left: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-sm);
}

/* =========================================
   2. Layout & Container
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Fix for the inline style flex container in HTML */
div[style*="display:flex"] {
    display: flex !important;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* =========================================
   3. Header Styling
   ========================================= */
header {
    background-color: rgba(26, 29, 36, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Logo Area */
.men1 a {
    display: block;
    width: 160px;
    height: 50px;
    background: url('https://via.placeholder.com/160x50/333/ffbe0b?text=JOYCASINO') no-repeat center/contain; /* Placeholder for logo */
    filter: drop-shadow(0 0 5px rgba(255, 190, 11, 0.3));
}

/* Mobile/Secondary Header Navigation */
header.mob .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menn {
    display: flex;
    gap: var(--spacing-sm);
}

.menn a.href {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
}

.men3, .men4 {
    padding: 0.6em 1.2em;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-main);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover States for Header Buttons */
.menn a:hover .men3,
.menn a:hover .men4 {
    background: var(--color-bg-surface);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 190, 11, 0.15);
}

.men4 {
    background: var(--gradient-primary);
    color: #111;
    border: none;
}

.menn a:hover .men4 {
    box-shadow: 0 0 15px rgba(251, 86, 7, 0.5);
    background: linear-gradient(135deg, #fb5607 0%, #ffbe0b 100%);
    color: #fff;
}

/* =========================================
   4. Hero / Slider Section
   ========================================= */
.joyl-slide {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: var(--color-bg-surface);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.jou-abs {
    position: absolute;
    inset: 0;
    background: url('https://via.placeholder.com/1920x600/1a1d24/333?text=Welcome+to+JoyCasino') no-repeat center/cover;
    z-index: 1;
}

.jou-abs::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 18, 24, 0.3), var(--color-bg-body));
}

.main1 {
    /* Placeholder for hero content if any */
    height: 100%;
}

/* =========================================
   5. Main Content Area
   ========================================= */
.main {
    flex: 1;
    padding-bottom: 4rem;
}

/* Intro Text Block */
.joy-left > p:first-of-type {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid var(--color-primary);
    padding-left: var(--spacing-md);
}

/* Content Columns */
.joy-left {
    flex: 3;
    min-width: 300px; /* Ensure wrapping on small screens */
}

/* Typography in Main Content */
h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md) !important; /* Override inline style */
    background: linear-gradient(90deg, #fff, var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-primary);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

p {
    margin-bottom: 1.2rem;
    color: var(--color-text-muted);
}

ul, ol {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

ul li, ol li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
}

ul li::before {
    content: '•';
    color: var(--color-primary);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

ol {
    counter-reset: item;
    list-style: none;
}

ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    color: var(--color-primary);
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

/* CTA Button Box */
.btn-box {
    margin: 3rem 0;
    text-align: center;
}

.btn.btn-size-big {
    display: inline-block;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    background: var(--gradient-primary);
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: var(--shadow-glow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

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

.btn.btn-size-big:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(251, 86, 7, 0.6);
}

.btn.btn-size-big:hover::after {
    left: 100%;
}

/* Sidebar (.main-right) */
.main-right {
    flex: 1;
    min-width: 250px;
    background: var(--color-bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    height: fit-content;
    position: sticky;
    top: 6rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.main-right b {
    display: block;
    font-size: 1.25rem;
    color: var(--color-primary);
    margin: 0.5rem 0 1rem;
}

.main-right .href {
    display: block;
    width: 100%;
    height: 200px;
    background: url('https://via.placeholder.com/300x200/333/ffbe0b?text=MIRROR') center/cover;
    border-radius: var(--border-radius-sm);
    margin-top: 1rem;
    transition: var(--transition-smooth);
    opacity: 0.8;
}

.main-right .href:hover {
    opacity: 1;
    transform: scale(1.02);
}

/* =========================================
   6. Footer
   ========================================= */
footer {
    background-color: var(--color-bg-surface);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    margin-top: auto;
    text-align: center;
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.menu-fo {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    word-spacing: 0.2em;
}

/* =========================================
   7. Micro-interactions & Scroll Button
   ========================================= */
#scroller {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#scroller:hover {
    background: var(--color-primary);
    color: #111;
    transform: translateY(-5px);
}

.b-top-but {
    font-size: 0; /* Hide text, maybe add icon via pseudo later */
}

#scroller::before {
    content: '▲';
    font-size: 1.2rem;
}

/* =========================================
   8. Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .joy-left {
        flex: 100%;
    }
    
    .main-right {
        width: 100%;
        margin-top: 2rem;
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    
    .main-right .href {
        width: 150px;
        height: 80px;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    div[style*="display:flex"] {
        flex-direction: column !important;
    }

    header.mob .container {
        flex-direction: column;
        gap: 1rem;
    }

    .menn {
        width: 100%;
        justify-content: center;
    }

    .men3, .men4 {
        flex: 1;
        text-align: center;
    }

    .main-right {
        flex-direction: column;
        text-align: center;
    }

    .main-right .href {
        width: 100%;
        height: 150px;
    }
    
    h1 {
        text-align: center;
    }
    
    .joyl-slide {
        min-height: 250px;
    }
}
