/* Base reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Mobile optimizations */
* {
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: #0f172a;
    background: radial-gradient(1200px 800px at 10% -10%, #eef2ff 0%, #ffffff 40%) fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(10px);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.site-header .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: block;
    height: 100%;
    padding: 0.5rem 0;
}

.logo img {
    height: 100%;
}

nav a {
    color: #334155;
    text-decoration: none;
    margin-left: 18px;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
}

nav a:hover {
    background: #eef2ff;
    color: #1e40af;
}

nav a:active {
    background: #e0e7ff;
    transform: scale(0.98);
}

/* Typography */
h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(32px, 6vw, 54px);
    margin: 48px 0 16px;
    font-weight: 800;
    background: linear-gradient(90deg, #0f172a 0%, #1d4ed8 50%, #0ea5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
}

h2 {
    font-size: clamp(22px, 3vw, 28px);
    margin: 0 0 2rem;
    font-weight: 800;
    color: #0f172a;
}

h3 {
    font-size: 20px;
    margin: 28px 0 12px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.casino-listing {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.listing-item {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    padding: 1.25rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: center;
    gap: 1rem;
    border: 2px solid transparent;
}

.listing-item:hover {
    border-color: #667eea;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.rank-badge {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.listing-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.listing-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 10px;
    background: #1e222c;
    padding: 10px;
}

.listing-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #222;
}

.listing-sub {
    color: #555;
    font-size: 0.9rem;
}

.listing-perks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.35rem 0.75rem;
    margin-top: 0.5rem;
}

.perk {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.listing-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.btn-primary {
    background: linear-gradient(90deg, #ffa726, #ff6b00);
    color: #fff;
    border: none;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.btn-secondary {
    background: #ede9fe;
    color: #4f46e5;
    border: none;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.listing-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.payment-chip {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 6px 10px;
}

.payment-chip img {
    height: 14px;
}

.casino-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.feature-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 120px;
}

.payment-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.payment-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.payment-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    text-align: center;
}

.casino-item-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.casino-item-heading h3 {
    margin-top: 0;
}

.casino-logo {
    width: 128px;
    height: 128px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    border-radius: 4px;
    background: #000;
    padding: 0.5rem;
}

.casino-logo:hover {
    transform: scale(1.1);
}

p {
    color: #334155;
    font-size: 16px;
    line-height: 1.75;
    margin: 12px 0;
}

ul {
    padding-left: 22px;
    margin: 12px 0 20px;
}

li {
    margin: 8px 0;
    color: #334155;
}

.section.hero {
    margin-top: 16px;
    text-align: center;
}

.section.hero p {
    max-width: 780px;
    margin: 0 auto;
    font-size: 18px;
    color: #475569;
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid transparent;
}

.btn.primary {
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.25);
}

.btn.primary:hover {
    background: #1e40af;
}

.btn.secondary {
    background: #eef2ff;
    color: #1e40af;
    border-color: #c7d2fe;
}

.btn.secondary:hover {
    background: #e0e7ff;
}

.btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.btn {
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Content blocks */
.content {
    padding: 64px 16px 0;
}

.section {
    background: #fafafa;
    border: 1px solid rgba(2, 6, 23, 0.06);
    border-radius: 16px;
    padding: 14px 16px;
    margin-top: 8px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 14px;
    line-height: 1.4;
    vertical-align: top;
}

table tr:first-child td {
    background: #f8fafc;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
}

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

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

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #1d4ed899;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

.scroll-to-top img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* Footer */
footer.site-footer {
    margin-top: 56px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding: 28px 0;
    color: #64748b;
    font-size: 14px;
    background: #ffffffa6;
    backdrop-filter: blur(4px);
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    nav {
        display: flex;
        gap: 8px;
    }

    nav a {
        margin-left: 0;
        font-size: 13px;
        padding: 8px 10px;
        white-space: nowrap;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Typography mobile optimization */
    h1 {
        font-size: clamp(24px, 8vw, 36px);
        margin: 32px 0 12px;
        line-height: 1.1;
    }

    h2 {
        font-size: clamp(20px, 5vw, 24px);
        line-height: 1.2;
    }

    h3 {
        font-size: 18px;
        margin: 24px 0 8px;
        line-height: 1.3;
        gap: 10px;
    }

    p {
        font-size: 15px;
        line-height: 1.6;
        margin: 10px 0;
    }

    .section.hero p {
        font-size: 16px;
        line-height: 1.5;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-top: 16px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 20px;
        font-size: 15px;
        text-align: center;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Content blocks mobile */
    h3+p,
    h3+p+ul {
        padding: 12px 14px;
        margin: 8px 0;
    }

    /* Lists mobile optimization */
    ul {
        padding-left: 18px;
        margin: 10px 0 16px;
    }

    li {
        margin: 6px 0;
        font-size: 14px;
        line-height: 1.5;
    }

    /* Tables mobile optimization */
    table {
        font-size: 12px;
        margin: 16px 0;
        border-radius: 8px;
    }

    table td {
        padding: 8px 10px;
        font-size: 12px;
        line-height: 1.3;
    }

    /* Table wrapper for horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 16px 0;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        position: relative;
    }

    .table-wrapper::after {
        content: "← Swipe to see more →";
        position: absolute;
        top: 8px;
        right: 8px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        pointer-events: none;
        opacity: 0.8;
    }

    .table-wrapper table {
        min-width: 600px;
        margin: 0;
        box-shadow: none;
    }

    .payment-methods {
        justify-content: flex-start;
    }

    .payment-method {
        min-width: 100px;
    }
    
    .listing-item {
        grid-template-columns: 1fr;
    }

    .listing-left {
        align-items: flex-start;
    }

    .listing-actions {
        flex-direction: row;
        justify-content: flex-start;
    }

    /* Footer mobile */
    footer.site-footer {
        padding: 20px 0;
        text-align: center;
        font-size: 13px;
    }

    footer.site-footer .container {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    nav a {
        font-size: 12px;
        padding: 8px 10px;
        min-height: 44px;
    }

    h1 {
        font-size: clamp(20px, 7vw, 28px);
        margin: 24px 0 8px;
    }

    h2 {
        font-size: clamp(18px, 4vw, 20px);
    }

    h3 {
        font-size: 16px;
        margin: 20px 0 6px;
        gap: 8px;
    }

    p {
        font-size: 14px;
        line-height: 1.5;
    }

    .section.hero p {
        font-size: 15px;
    }

    .btn {
        padding: 14px 16px;
        font-size: 14px;
        min-height: 48px;
    }

    h3+p,
    h3+p+ul {
        padding: 10px 12px;
    }

    li {
        font-size: 13px;
    }

    /* Tables for very small screens */
    table {
        font-size: 11px;
    }

    table td {
        padding: 6px 8px;
        font-size: 11px;
    }

    .table-wrapper table {
        min-width: 500px;
    }

    .table-wrapper::after {
        font-size: 10px;
        padding: 3px 6px;
    }

    .casino-item-heading {
        flex-direction: column;
    }

    .rank-badge {
        top: -22px;
        left: 50%;
        transform: translateX(-50%);
    }

    .listing-left {
        flex-direction: column;
    }

    .listing-actions {
        flex-direction: column;
    }

    /* Scroll to top button mobile */
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }

    .scroll-to-top img {
        width: 20px;
        height: 20px;
    }
}