
/* =========================================
   1. Reset & Variables
   ========================================= */
:root {
    /* Color Palette - Dark Gaming Theme */
    --bg-dark: #0b1116;
    --bg-card: #151e27;
    --bg-header: rgba(11, 17, 22, 0.95);
    
    --primary: #fca311; /* Gold */
    --primary-hover: #ffb700;
    --accent: #e50914; /* Red for CTAs */
    --accent-hover: #f40612;
    
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-link: #38bdf8;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 15px rgba(252, 163, 17, 0.3);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    
    --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --header-height: 4.5rem;
}

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

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, transform 0.2s ease;
}

ul, ol {
    list-style: none;
    margin-bottom: 1.5rem;
}

/* =========================================
   2. Typography
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem !important; /* Override inline style */
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.25rem;
    color: var(--primary);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.main-left ul, .main-left ol {
    padding-left: 1.5rem;
}

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

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

.main-left ol {
    counter-reset: item;
}

.main-left ol li {
    list-style-type: none;
}

.main-left ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    color: var(--primary);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Links in text */
.joy-left p a, .main-left p a {
    color: var(--text-link);
    border-bottom: 1px solid transparent;
}

.joy-left p a:hover, .main-left p a:hover {
    border-bottom-color: var(--text-link);
}

/* =========================================
   3. Layout Components
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Placeholder styling since img src is missing */
.men1 a {
    display: block;
    width: 180px;
    height: 50px;
    background: url('/logo.png') no-repeat center/contain; /* Fallback */
    background-color: rgba(255, 255, 255, 0.05); /* Placeholder */
    border-radius: var(--radius-sm);
}

/* Navigation Menu */
.menn {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.men3, .men4 {
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* "Sign In" / Standard Link style */
.men3 {
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.men3:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
    color: #fff;
}

/* "Register" style */
.men4 {
    background: linear-gradient(135deg, var(--accent) 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.men4:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

/* Mobile Header Logic */
header.mob {
    display: none; /* Hidden by default on desktop if redundant */
}

/* Hero Section / Slider */
.joyl-slide {
    position: relative;
    background: linear-gradient(rgba(11, 17, 22, 0.7), var(--bg-dark)), url('https://via.placeholder.com/1920x600/151e27/ffffff?text=JoyCasino+BG') center/cover;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.jou-abs {
    width: 100%;
    z-index: 2;
}

/* Ensure empty links in slider cover area for clicking */
.joyl-slide > a.href {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

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

/* Flex Container for Main Content and Sidebar */
/* Targeting the inline style div */
.main > .container > div[style*="display:flex"] {
    display: flex !important; /* Enforce */
    gap: 2rem;
    align-items: flex-start;
}

.joy-left {
    flex: 1;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* Sidebar */
.main-right {
    flex: 0 0 300px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--primary);
    position: sticky;
    top: 6rem;
    box-shadow: var(--shadow-glow);
    text-align: center;
    color: var(--primary);
}

.main-right b {
    display: block;
    font-size: 1.2rem;
    color: #fff;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* Sidebar button */
.main-right a.href {
    display: block;
    background: var(--primary);
    color: #000;
    font-weight: bold;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.main-right a.href::before {
    content: "Перейти на зеркало";
}

.main-right a.href:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

/* =========================================
   4. Buttons & Interactive Elements
   ========================================= */
.btn-box {
    text-align: center;
    margin: 2.5rem 0;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(90deg, var(--accent) 0%, #ff4b1f 100%);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff4b1f 0%, var(--accent) 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn:hover::after {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(229, 9, 20, 0.6);
}

/* Scroll to top button */
#scroller {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#scroller:hover {
    transform: translateY(-5px);
    background: #fff;
}

.b-top-but {
    display: none; /* Hide text, use icon instead usually, but here we keep text hidden */
}

#scroller::before {
    content: "↑";
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
}

/* =========================================
   5. Footer
   ========================================= */
footer {
    background: #05090c;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.menu-fo {
    opacity: 0.7;
}

/* =========================================
   6. Forms (Generic styling)
   ========================================= */
input[type="text"], 
input[type="email"], 
input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    margin-bottom: 1rem;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(252, 163, 17, 0.2);
}

/* =========================================
   7. Responsive Design
   ========================================= */

/* Tablet & Smaller */
@media (max-width: 1024px) {
    .main > .container > div[style*="display:flex"] {
        flex-direction: column !important;
    }
    
    .main-right {
        width: 100%;
        flex: none;
        order: -1; /* Show sidebar/mirror info on top or keep below based on preference. Removed order to keep standard flow */
        margin-bottom: 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }

    header {
        padding: 0.5rem 0;
    }

    /* Adjust header for mobile */
    header .container {
        flex-direction: column;
    }
    
    header.mob {
        display: block;
        padding-bottom: 1rem;
    }
    
    /* Hide desktop specific if duplicated, but based on HTML structure, 
       we utilize existing classes */
    
    .menn {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .men3, .men4 {
        width: 100%;
        display: block;
    }
    
    .joy-left {
        padding: 1.25rem;
    }
    
    h1 {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .men1 a {
        margin: 0 auto; /* Center logo */
    }
}

/* Micro-animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(229, 9, 20, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

.btn-size-big {
    animation: pulse 2s infinite;
}

/* Helper Classes */
.image-filters-enabled img {
    filter: brightness(0.9) contrast(1.1);
    transition: filter 0.3s;
}

.image-filters-enabled img:hover {
    filter: brightness(1) contrast(1);
}
