/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #1A0C55 0%, #9666FF 30%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

/* ===== LAYOUT WRAPPER ===== */
.page-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 16px 40px;
    overflow-x: hidden;
}

/* ===== TOP BAR / HEADER ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 12px;
}

/* Hamburger */
.hamburger {
    width: 26px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 18px;
}

.hamburger span {
    display: block;
    height: 3px;
    border-radius: 4px;
    background: #ffffff;
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 900;
}

/* Sidebar panel */
.mega-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    max-width: 80%;
    height: 100vh;
    background: #a12ad6;
    color: #ffffff;
    padding: 14px 12px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* Close button inside sidebar */
.sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 2px;
    border: 2px solid #ffb347;
    background: transparent;
    color: #ffb347;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

/* Menu items */
.sidebar-menu {
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 12px;
}

.sidebar-link {
    width: 100%;
    border: none;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    padding: 8px 4px;
    cursor: pointer;
}

.sidebar-link .chevron {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.sidebar-has-dropdown.open .chevron {
    transform: rotate(90deg);
}

.sidebar-dropdown {
    list-style: none;
    padding: 0 0 0 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.sidebar-has-dropdown.open .sidebar-dropdown {
    max-height: 200px;
}

.sidebar-sub-link {
    display: block;
    color: #ffffff;
    font-size: 13px;
    padding: 6px 4px;
    opacity: 0.8;
}

.sidebar-sub-link:hover {
    opacity: 1;
}

/* When sidebar is open */
body.sidebar-open .mega-sidebar {
    transform: translateX(0);
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}


/* ===== LOGO + MAIN CTA SECTION ===== */
.hero {
    text-align: center;
    margin-top: 8px;
    margin-bottom: 26px;
}

.hero-logo img {
    max-width: 520px;
    width: 70%;
    height: auto;
    display: block;
    margin: 0 auto 80px;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Base CTA box */
.cta-box {
    position: relative;
    display: flex;
    align-items: center;
    padding: 14px 28px;
    border-radius: 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    min-width: 260px;
    height: 70px;
    overflow: visible;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* Left icon + text */
.cta-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cta-small-icon {
    width: 22px;
    height: 22px;
}

/* Character images (penguin + dragon) */
.cta-character {
    position: absolute;
    bottom: -2px;
    right: -65px;
    height: 110px;
    pointer-events: none;
}

/* Slight size tweaks per character */
.telegram-character {
    height: 115px;
}

.whatsapp-character {
    height: 115px;
}

/* Button gradients */
.telegram {
    background: linear-gradient(to right, #1d8fff, #0a56d8);
}

.whatsapp {
    background: linear-gradient(to right, #24c05b, #128c3a);
}

/* Button hover */
.cta-box:hover {
    filter: brightness(1.1);
}

/* ===== LAST UPDATE LINE ===== */
.update-line {
    text-align: center;
    font-size: 11px;
    margin: 12px 0 24px;
    color: #ffffff;
    opacity: 0.85;
}

.update-line span.label {
    font-weight: bold;
}

/* ===== CARD SECTIONS ===== */
.card {
    margin: 0 auto 16px;
    background: #ffffff;
    border-radius: 2px;
    color: #333333;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    font-size: 14px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #ffffff;
}

.card-header-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.card-header-title {
    font-weight: bold;
}

.card-body {
    padding: 14px 18px;
    background: #ffffff;
}

/* Mega Test ID body - IMPROVED FOR MOBILE */
.test-id-body {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
    flex-wrap: wrap;
    word-break: break-word;
}

.test-id-body strong {
    font-weight: bold;
}

/* Login info styling */
.login-info {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 4px;
    margin-top: 8px;
    word-break: break-all;
}

.login-info p {
    margin: 5px 0;
    font-family: monospace;
    font-size: 14px;
}

/* Download buttons inside cards */
.download-btn {
    display: block;
    width: 100%;
    border-radius: 0;
    text-align: center;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    border: none;
    cursor: pointer;
    outline: none;
}

.download-btn.android {
    background: #34a835;
}

.download-btn.ios {
    background: #ff7a1a;
}

.download-btn.pc {
    background: #2c74e6;
}

.download-extra-link {
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
}

.download-extra-link a {
    color: #245cbf;
    text-decoration: underline;
}

.download-buttons-grid {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.download-buttons-grid .download-btn {
    flex: 1;
    min-width: 120px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 12px 16px 28px;
    }

    .hero-ctas {
        flex-wrap: nowrap !important;
        justify-content: center;
        gap: 20px;
    }

    .cta-left {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
    }

    .cta-left .cta-small-icon {
        width: 26px;
        height: 26px;
    }

    .cta-box {
        min-width: 160px;
        padding: 8px 12px;
        font-size: 12px;
        height: 60px;
    }

    .cta-character {
        height: 85px !important;
        right: -35px !important;
    }

    .telegram-character,
    .whatsapp-character {
        right: -10px !important;
        height: 85px !important;
    }

    .hero-logo img {
        max-width: 85%;
        margin-bottom: 40px;
    }

    .card-header,
    .card-body {
        padding: 12px;
    }

    /* Fix test ID display on mobile */
    .test-id-body {
        flex-direction: column;
        gap: 5px;
    }
    
    .test-id-body span {
        display: inline-block;
        word-break: break-all;
    }

    /* Download buttons grid on mobile */
    .download-buttons-grid {
        flex-direction: column;
        gap: 8px;
    }
    
    .download-buttons-grid .download-btn {
        width: 100%;
    }
}

/* Extra small devices (<=480px) */
@media (max-width: 480px) {
    .page-wrapper {
        padding: 12px 12px 28px;
    }

    .hero-logo img {
        width: 95%;
        margin-bottom: 30px;
    }

    .cta-box {
        min-width: 140px;
        padding: 6px 10px;
        font-size: 11px;
        height: 55px;
    }

    .cta-left .cta-small-icon {
        width: 22px;
        height: 22px;
    }

    .cta-character {
        height: 70px !important;
        right: -25px !important;
    }

    .telegram-character,
    .whatsapp-character {
        height: 70px !important;
        right: -5px !important;
    }

    .card-header {
        padding: 10px;
    }

    .card-header-icon img {
        width: 18px;
        height: 18px;
    }

    .card-body {
        padding: 10px;
    }

    /* Login info better spacing */
    .login-info p {
        font-size: 12px;
        word-break: break-all;
    }
    
    .test-id-body {
        font-size: 13px;
    }
}

.content-box {
    margin: 0 auto 26px;
    background: #ffffff;
    padding: 24px 28px;
    color: #333;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.35);
    text-align: left;
    overflow-x: auto;
}

.content-box h2 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 14px;
    font-weight: bold;
    color: #333;
}

.content-box h3 {
    text-align: left;
    font-size: 17px;
    margin: 18px 0 10px;
    font-weight: bold;
    color: #333;
}

.content-box h4 {
    text-align: left;
    font-size: 15px;
    margin: 18px 0 10px;
    font-weight: bold;
    color: #333;
}

.content-box ol {
    margin-left: 18px;
    margin-bottom: 18px;
}

.content-box ol>li {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.6;
}

.content-box ul {
    margin-top: 4px;
    margin-left: 18px;
    list-style-type: disc;
}

.content-box ul li {
    margin-bottom: 4px;
    font-size: 14px;
}

.content-box a {
    color: #245cbf;
    text-decoration: underline;
}

.content-box p {
    font-size: 15px;
    line-height: 1.6;
    text-align: justify;
}

.address-text {
    margin-top: 4px;
    margin-bottom: 18px;
    word-break: break-word;
}

.contact-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.contact-btn {
    flex: 1 1 160px;
    text-align: center;
    padding: 11px 12px;
    border-radius: 3px;
    background: #0084ff;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    background: #006fe0;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 12px;
    -webkit-overflow-scrolling: touch;
}

.slot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.slot-table th,
.slot-table td {
    border: 1px solid #dcdcdc;
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
}

.slot-table thead th {
    background: #0078ff;
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
}

.slot-table tbody tr:nth-child(even) {
    background: #f7f7f7;
}

.slot-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.slot-table .game-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    flex-wrap: wrap;
}

.slot-table .game-cell img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.slot-table .game-cell a {
    color: #0054c9;
    text-decoration: underline;
    font-weight: 500;
    word-break: break-word;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.info-table th {
    border: 1px solid #dcdcdc;
    padding: 10px 14px;
    background: #f0f0f0;
    font-weight: bold;
    text-align: left;
    vertical-align: middle;
}

.info-table td {
    border: 1px solid #dcdcdc;
    padding: 10px 14px;
    vertical-align: middle;
    word-break: break-word;
}

.info-table tr:nth-child(even) {
    background: #f9f9f9;
}

.info-table tr:nth-child(odd) {
    background: #ffffff;
}

.info-table td:first-child {
    font-weight: bold;
    width: 30%;
}

/* FAQ SECTION */
.faq-section h2 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 14px;
    font-size: 20px;
}

.faq-list {
    background: transparent;
}

.faq-item {
    background: #ffffff;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.faq-question {
    width: 100%;
    text-align: left;
    border: none;
    background: #ffffff;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    font-size: 15px;
    cursor: pointer;
}

.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    margin-right: 10px;
    font-weight: bold;
}

/* Smooth slide answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 14px 0 32px;
    font-size: 15px;
    line-height: 1.6;
    border-top: 1px solid #f1f1f1;
    color: #333;
    transition: max-height 0.25s ease, padding-top 0.25s ease, padding-bottom 0.25s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: 8px 14px 10px 32px;
}

.faq-item.open .faq-question {
    border-bottom: 1px solid #f1f1f1;
}

/* ===== FOOTER ===== */
.footer {
    background: #2a1527;
    color: #ffffff;
    text-align: center;
    padding: 18px 0;
    margin-top: 40px;
    border-top: 4px solid #a88aff;
    font-size: 14px;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    background: #0d6efd;
    color: #ffffff;
    font-size: 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* ===== LOGIN ===== */
.login-demo-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fake-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
}

.input-group input {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: #28a745;
}

.login-btn {
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(to right, #28a745, #1e7e34);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.login-btn:hover {
    opacity: 0.9;
}

/* ===== ADDITIONAL MOBILE FIXES FOR TEST ID ===== */
@media (max-width: 768px) {
    /* Fix for the 66LOTTERY Test ID card */
    .card:first-of-type .card-body {
        padding: 12px;
    }
    
    /* Make login credentials more readable */
    .test-id-body {
        background: #f8f8f8;
        padding: 10px;
        border-radius: 6px;
        margin-bottom: 10px;
    }
    
    .test-id-body strong {
        background: #e0e0e0;
        padding: 2px 6px;
        border-radius: 3px;
    }
    
    /* Ensure no cutoff on left side */
    .page-wrapper {
        padding-left: 12px;
        padding-right: 12px;
    }
}