
/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --color-bg-body: #0f1115;
    --color-bg-card: #1a1d24;
    --color-bg-header: #14161c;
    --color-text-main: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-primary: #f59e0b; /* Amber/Gold */
    --color-primary-hover: #d97706;
    --color-accent: #10b981; /* Emerald Green */
    --color-accent-hover: #059669;
    --color-danger: #ef4444;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    --gradient-dark: linear-gradient(180deg, rgba(26,29,36,0) 0%, #1a1d24 100%);
    
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 1rem;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    /* Effects */
    --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(245, 158, 11, 0.3);
    --transition: all 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);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

ul, ol {
    list-style-position: inside;
    margin-bottom: var(--spacing-sm);
    padding-left: var(--spacing-sm);
}

li {
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

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

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    color: #fff;
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

h3 {
    font-size: 1.5rem;
    color: var(--color-text-main);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-muted);
}

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

.main {
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Flex wrapper from HTML override */
div[style*="display:flex"] {
    display: flex !important;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.joy-left {
    flex: 1;
    min-width: 300px;
    background: var(--color-bg-card);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.main-right {
    flex: 0 0 300px;
    background: #232730;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    height: fit-content;
    border-top: 4px solid var(--color-accent);
    position: sticky;
    top: 20px;
}

/* =========================================
   4. HEADER
   ========================================= */
header {
    background-color: var(--color-bg-header);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

/* Logo styling */
.men1 a {
    display: block;
    width: 150px;
    height: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60'%3E%3Crect width='200' height='60' fill='transparent'/%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' font-family='sans-serif' font-weight='bold' font-size='24' fill='%23f59e0b'%3EJOYCASINO%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Header Buttons Container */
.menn {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.menn a {
    text-decoration: none;
}

.men3, .men4 {
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.men3 {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.men3:hover {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.men4 {
    background: var(--color-accent);
    color: #fff;
    border: 2px solid var(--color-accent);
}

.men4:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-2px);
}

/* Mobile Header Logic */
header:not(.mob) {
    display: none; /* Hide top empty header if mob header exists */
}

header.mob {
    display: block;
}

/* =========================================
   5. HERO / SLIDER SECTION
   ========================================= */
.joyl-slide {
    position: relative;
    width: 100%;
    min-height: 300px;
    background: radial-gradient(circle at center, #2d3748 0%, #0f1115 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

/* Placeholder styling for empty divs in hero */
.joyl-slide::before {
    content: 'WELCOME BONUS 200%';
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255,255,255,0.05);
    position: absolute;
    transform: rotate(-10deg);
}

.jou-abs {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* =========================================
   6. COMPONENTS
   ========================================= */

/* Buttons */
.btn-box {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: var(--gradient-gold);
    color: #fff !important;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px -5px rgba(245, 158, 11, 0.6);
}

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

.btn:active {
    transform: translateY(1px);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: var(--spacing-sm) 0 var(--spacing-md);
    background: #15181e;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    font-size: 0.95rem;
}

thead th {
    background-color: #232730;
    color: var(--color-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid rgba(255,255,255,0.05);
}

tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--color-text-main);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: rgba(255,255,255,0.02);
}

/* Sidebar Specific */
.main-right a.href {
    display: block;
    margin-top: 1rem;
    padding: 0.8rem;
    background: var(--color-accent);
    color: white;
    text-align: center;
    border-radius: var(--border-radius-sm);
    font-weight: bold;
}

.main-right a.href::before {
    content: "Перейти";
}

.main-right a.href:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    background-color: #050505;
    padding: var(--spacing-md) 0;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

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

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

/* =========================================
   8. SCROLL TO TOP
   ========================================= */
#scroller {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: var(--transition);
}

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

.b-top-but {
    font-size: 0; /* Hide text, use icon logic */
}

#scroller::after {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid #fff;
    border-left: 3px solid #fff;
    transform: rotate(45deg);
    margin-top: 4px;
}

/* =========================================
   9. FORMS (General Styles per requirement)
   ========================================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: #0f1115;
    border: 1px solid #2d3748;
    border-radius: var(--border-radius-sm);
    color: white;
    font-family: var(--font-family);
    margin-bottom: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* =========================================
   10. MEDIA QUERIES
   ========================================= */
@media (max-width: 992px) {
    div[style*="display:flex"] {
        flex-direction: column !important;
    }
    
    .main-right {
        order: -1; /* Put sidebar on top or adjust as needed */
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menn {
        width: 100%;
        justify-content: center;
    }
    
    .men3, .men4 {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .joy-left {
        padding: 1rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
    }
}
