/* 🎨 Імпорт шрифтів */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* 🌟 Сучасний Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #334155;
    line-height: 1.7;
    font-size: 17px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 🎨 Анімації */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 📐 Контейнер */
.container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px;
    animation: fadeInUp 0.8s ease-out;
}

/* 🔗 Посилання */
a {
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

a:hover {
    color: #1d4ed8;
    transform: translateY(-2px);
}

/* 🎯 Хедер */
header {
    background: #ffffff;
    color: #1e293b;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(59,130,246,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

header p, header span, header div {
    color: #1e293b;
}

.logo {
    max-width: 120px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.logo:hover {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

nav ul li a {
    color: #64748b;
    font-weight: 600;
    font-size: 17px;
    padding: 12px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

nav ul li a:hover {
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: #3b82f6;
}

/* 🌊 Блоки контенту */
.block {
    background: #ffffff;
    padding: 50px;
    margin: 40px 0;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.8s ease;
}

.block:hover::before {
    left: 100%;
}

.block:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 🎲 Сітка казино */
.casino-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin: 50px 0;
}

/* 🎰 Картки казино */
.casino-card-dark {
    background: #ffffff;
    color: #1e293b;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.casino-card-dark::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    animation: pulse 4s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.casino-card-dark:hover::before {
    opacity: 1;
}

.casino-card-dark:hover {
    transform: translateY(-15px) rotateY(5deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ranking-label {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #3b82f6;
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.8s ease-out;
}

.casino-logo-wrapper {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
}

.casino-logo {
    max-width: 140px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.casino-logo:hover {
    transform: scale(1.2) rotate(-5deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.casino-card-dark h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0;
    color: #1e293b;
}

.stars {
    color: #f59e0b;
    font-size: 22px;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bonus-text {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.visit-btn {
    display: inline-block;
    background: #3b82f6;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 17px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.visit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* 🔤 Типографія */
h2 {
    font-size: 42px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 30px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 4px;
    background: #3b82f6;
    border-radius: 10px;
    animation: slideIn 1s ease-out;
}

h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 25px 0 15px;
    position: relative;
}

p {
    margin-bottom: 22px;
    color: #64748b;
    line-height: 1.8;
}

/* Table wrapper to ensure containment and scrolling */
.table-wrapper {
    overflow-x: auto;
    margin: 35px 0;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on touch devices */
    width: 100%; /* Ensure wrapper fits within parent */
    max-width: 100%; /* Prevent overflow beyond viewport */
    box-sizing: border-box; /* Include padding/margins in width */
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    table-layout: auto; /* Allow columns to adjust based on content */
}

th, td {
    padding: 18px 25px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    white-space: normal; /* Allow text wrapping to reduce column width */
    min-width: 80px; /* Reduced for better mobile fit */
    max-width: 150px; /* Cap column width to prevent excessive stretching */
    overflow-wrap: break-word; /* Ensure long text wraps */
}

th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #e2e8f0;
}

tr:nth-child(even) {
    background: #f8fafc;
}

tr:hover {
    background: rgba(59, 130, 246, 0.05);
    transition: all 0.3s ease;
}

/* Mobile adaptations */
@media (max-width: 768px) {
    .table-wrapper {
        margin: 20px 0; /* Remove negative margins */
        border-radius: 8px; /* Smaller radius for mobile */
        padding: 0 10px; /* Add slight padding to prevent content from touching edges */
    }
    
    table {
        font-size: 13px;
        min-width: 300px; /* Reduced to fit smaller screens */
        border-radius: 8px;
    }
    
    th, td {
        padding: 10px 8px; /* Tighter padding */
        font-size: 12px;
        min-width: 60px; /* Further reduced */
        max-width: 120px; /* Cap width for mobile */
    }
    
    th {
        font-size: 11px;
        position: sticky;
        top: 0;
        z-index: 10;
    }
}

@media (max-width: 480px) {
    .table-wrapper {
        margin: 15px 0;
        padding: 0 5px; /* Even tighter padding */
    }
    
    table {
        font-size: 11px;
        min-width: 250px; /* Minimal width for very small screens */
    }
    
    th, td {
        padding: 8px 5px;
        font-size: 10px;
        min-width: 50px;
        max-width: 100px;
    }
    
    th {
        font-size: 9px;
    }
}

/* 🦶 Футер */
footer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 60px 0;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 10;
}

footer ul {
    list-style: none;
    margin: 25px 0;
}

footer ul li {
    margin: 12px 0;
}

footer ul li a {
    color: #cbd5e1;
    opacity: 0.9;
    font-size: 15px;
    transition: all 0.3s ease;
}

footer ul li a:hover {
    opacity: 1;
    color: #3b82f6;
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icons a:hover {
    background: rgba(59, 130, 246, 0.8);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* 📱 Адаптивність */
@media (max-width: 768px) {
    .container {
        width: 96%;
        padding: 20px;
    }

    header .container {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .casino-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .casino-card-dark {
        padding: 25px;
    }

    h2 {
        font-size: 32px;
    }

    h3 {
        font-size: 24px;
    }

    .block {
        padding: 30px;
    }

    footer .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .block {
        padding: 25px;
        margin: 20px 0;
    }

    .casino-logo-wrapper {
        height: 90px;
    }

    .casino-logo {
        max-width: 110px;
    }

    .visit-btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    h2 {
        font-size: 28px;
    }

    nav ul li a {
        padding: 10px 15px;
        font-size: 15px;
    }
}

/* Додайте цей CSS код в ваш файл стилів */

.top-brands {
    padding: 60px 20px;
    background: #f5f5f5;
}

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

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
    font-weight: 700;
}

.brands-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1.5fr;
    background: #2c3e50;
    color: white;
    font-weight: 600;
    padding: 20px;
    gap: 20px;
}

.header-item {
    text-align: center;
    font-size: 16px;
}

.brand-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1.5fr;
    padding: 25px 20px;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s ease;
}

.brand-row:hover {
    background: #f9f9f9;
}

.brand-row:last-child {
    border-bottom: none;
}

.brand-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    max-width: 150px;
    max-height: 60px;
    object-fit: contain;
}

.rating-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stars {
    display: flex;
    gap: 3px;
}

.star {
    font-size: 24px;
    color: #ddd;
}

.star.active {
    color: #ffd700;
}

.rating-text {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.bonus-cell {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 5px;
}

.bonus-cell strong {
    font-size: 16px;
    color: #333;
}

.bonus-detail {
    font-size: 14px;
    color: #666;
}

.action-cell {
    display: flex;
    justify-content: center;
}

.play-button {
    background: #e74c3c;
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.play-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* Мобільна версія */
@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .table-header {
        display: none;
    }
    
    .brand-row {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px 15px;
    }
    
    .brand-cell {
        padding-bottom: 10px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .brand-logo {
        max-width: 120px;
        max-height: 50px;
    }
    
    .rating-cell {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .rating-cell::before {
        content: "Hodnotenie: ";
        font-weight: 600;
        color: #666;
    }
    
    .bonus-cell::before {
        content: "Uvítací Bonus:";
        font-weight: 600;
        color: #666;
        display: block;
        margin-bottom: 8px;
    }
    
    .play-button {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .top-brands {
        padding: 40px 10px;
    }
    
    .star {
        font-size: 20px;
    }
}