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

/* Rich text / Typography */
.rich-text {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
    color: #fff;
    font-weight: 700;
    line-height: 1.25;
    margin: 24px 0 12px;
}

.rich-text h1 { font-size: 32px; }
.rich-text h2 { font-size: 26px; }
.rich-text h3 { font-size: 20px; }

.rich-text p { margin: 12px 0; }

.rich-text a { color: #ff8787; text-decoration: underline; }
.rich-text a:hover { color: #ffb3b3; }

.rich-text ul,
.rich-text ol {
    margin: 12px 0 12px 20px;
    padding-left: 18px;
}

.rich-text li { margin: 6px 0; }

.rich-text blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 3px solid #ff6b6b;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
}

.rich-text code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.95em;
}

.rich-text pre {
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 16px;
    border-radius: 8px;
    overflow: auto;
    margin: 12px 0;
}

.rich-text hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.25), rgba(255,255,255,0));
    margin: 20px 0;
}

.rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 12px 0;
}

/* Tables inside rich text */
.rich-text table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    background: rgba(20, 15, 30, 0.6);
}

.rich-text thead th {
    background: rgba(255, 107, 107, 0.18);
    color: #fff;
    text-align: left;
}

.rich-text th,
.rich-text td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rich-text tr:last-child td { border-bottom: none; }

.rich-text tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.rich-text tbody tr:hover { background: rgba(255, 107, 107, 0.08); }

.rich-text caption {
    caption-side: bottom;
    padding: 10px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: left;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1428 0%, #2d1b3d 50%, #1a1428 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
.header {
    background: rgba(20, 15, 30, 0.95);
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
}

.logo::before {
    content: "🎰";
    font-size: 28px;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-bar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 15px;
    color: #fff;
    width: 200px;
}

.btn {
    padding: 8px 20px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
    display: inline-block; /* Добавлено, чтобы ссылки вели себя как кнопки */
}

.btn-login {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-register {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: #fff;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 200px;
    height: calc(100vh - 60px);
    background: rgba(20, 15, 30, 0.95);
    padding: 20px 10px;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.sidebar-item:hover {
    background: rgba(255, 107, 107, 0.2);
    color: #fff;
}

.sidebar-item.active {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: #fff;
}

/* Main Content */
.main-content {
    margin-left: 200px;
    margin-top: 60px;
    padding: 20px;
    max-width: 1400px;
}

/* Hero Banner */
.hero-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.banner-card {
    background: linear-gradient(135deg, #2d1b3d, #3d2b4d);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    min-height: 150px;
    transition: transform 0.3s ease;
}

.banner-card:hover {
    transform: scale(1.02);
}

.banner-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

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

.banner-title {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.banner-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.banner-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block; /* Добавлено, чтобы ссылки вели себя как кнопки */
}

.banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Games Section */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-all {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: #ff8787;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.game-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    background: #2a1f3a;
    aspect-ratio: 1;
    text-decoration: none;
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3d2b4d, #4d3b5d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
}

.game-name {
    color: #fff;
    font-size: 12px;
    text-align: center;
    padding: 0 10px;
}

.game-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

/* Providers Section */
.providers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.provider-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.provider-card:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
}

/* Footer */
.footer {
    margin-left: 200px;
    padding: 40px 20px;
    background: rgba(20, 15, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

.footer-section h4 {
    margin-bottom: 15px;
    color: #ff6b6b;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ff6b6b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .footer {
        margin-left: 0;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .hero-banner {
        grid-template-columns: 1fr;
    }

    .search-bar {
        display: none;
    }

    .header-content {
        padding: 0 10px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff8787;
}

/* Mobile Menu Toggle */
.menu-toggle {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}