/* =============================================
   Game Template - Main Stylesheet
   ============================================= */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e30639;
    --primary-hover: rgba(227, 6, 57, 0.77);
    --button-color: #25a504;
    --button-hover: rgba(37, 165, 4, 0.65);
    --text-color: #333;
    --text-light: #666;
    --bg-dark: rgba(0, 0, 0, 0.88);
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --border-radius: 50px;
    --border-radius-sm: 10px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    text-decoration: underline;
}

ul, ol {
    list-style-position: inside;
}

/* =============================================
   Layout
   ============================================= */

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

.section {
    padding: 30px 0;
}

.section h2 {
    font-size: 34px;
    line-height: 1.2;
    margin-top: 20px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.section p {
    margin-bottom: 15px;
}

.section ul,
.section ol {
    margin: 15px 0;
    padding-left: 25px;
}

.section li {
    margin-bottom: 10px;
}

/* =============================================
   Buttons
   ============================================= */

/* Center buttons in content sections (not in tables) */
.section .btn {
    margin: 5px;
}

.btn-wrap {
    text-align: center;
    margin: 25px 0;
}

/* Single button in a paragraph — center it */
.section .container > p > .btn:only-child {
    display: block;
    width: fit-content;
    margin: 20px auto;
}

/* Multiple buttons in a paragraph — center the row */
.section .container > p:has(.btn) {
    text-align: center;
    margin: 25px 0;
}

/* Direct button in container */
.section .container > .btn {
    display: block;
    width: fit-content;
    margin: 20px auto;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 18px;
    text-align: center;
    transition: background-color 0.7s ease;
    cursor: pointer;
    border: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-success {
    background: var(--button-color);
    color: var(--white);
    border-color: var(--button-color);
}

.btn-success:hover {
    background: var(--button-hover);
    border-color: var(--button-hover);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--text-color);
}

/* =============================================
   Header
   ============================================= */

.header {
    background: var(--white);
    padding: 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

body {
    padding-top: 70px;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    height: 70px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav {
    flex: 1;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.nav a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

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

.header-btn {
    flex-shrink: 0;
    padding: 10px 25px;
    font-size: 14px;
    margin-left: auto;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* =============================================
   Game Top Section (Title + Demo + Promo Bar)
   ============================================= */

.page-title {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.2;
    margin-top: 30px;
}

.game-demo-frame {
    max-width: 1000px;
    margin: 24px auto;
    background: var(--white);
    padding: 15px;
    border-radius: 0 0 16px 16px;
}

.game-demo-frame .game-container {
    border-radius: 22px;
    box-shadow: 3px 3px 15px #000;
}

.game-demo-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 0 20px;
    gap: 16px;
}

.game-demo-cta .btn {
    font-size: 18px;
    padding: 15px 30px;
    border-radius: 12px;
}

.game-demo-cta .game-demo-text {
    font-weight: 400;
    font-size: 14px;
    color: var(--text-light);
}

.game-demo-cta .game-demo-text a {
    font-weight: 400;
}

/* =============================================
   Promo Bar (below demo)
   ============================================= */

.promo-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--popup-gradient-from, #1e293b), var(--popup-gradient-to, #0f172a));
    border: 1px solid rgba(0, 251, 255, 0.3);
    border-radius: 12px;
    padding: 14px 24px;
    margin: 20px auto;
}

.promo-bar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.promo-bar-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.promo-bar-name {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.promo-bar-stars {
    color: #ffc107;
    font-size: 14px;
    letter-spacing: 1px;
}

.promo-bar-cta {
    flex-shrink: 0;
    padding: 10px 28px;
    background: linear-gradient(135deg, #fce922, #9e00b3);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 12px rgba(252, 233, 34, 0.3);
}

.promo-bar-cta:hover {
    transform: scale(1.05);
    text-decoration: none;
    color: #fff;
}

/* =============================================
   Table of Contents
   ============================================= */

.toc {
    background: var(--bg-light);
    padding: 25px 30px;
    border-radius: var(--border-radius-sm);
    margin: 30px 0;
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toc h2 {
    font-size: 1.3rem;
    margin: 0;
}

.toc-toggle {
    font-size: 14px;
    color: var(--primary-color);
}

.toc-toggle::before {
    content: '[ Show ]';
}

.toc-open .toc-toggle::before {
    content: '[ Hide ]';
}

.toc-list {
    padding-left: 20px;
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.toc-open .toc-list {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px;
}

.toc li {
    margin-bottom: 10px;
}

.toc a {
    color: var(--text-color);
}

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

/* =============================================
   Media + Text Blocks
   ============================================= */

.media-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin: 30px 0;
}

.media-text img {
    border-radius: var(--border-radius-sm);
}

.media-text.reverse {
    direction: rtl;
}

.media-text.reverse > * {
    direction: ltr;
}

/* =============================================
   Tables
   ============================================= */

.casino-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ddd;
    font-size: 15px;
}

.casino-table th,
.casino-table td {
    padding: 10px 15px;
    text-align: left;
    border: 1px solid #e8e7e7;
    vertical-align: middle;
    line-height: 1.5;
}

.casino-table th {
    background: var(--white);
    color: var(--text-color);
    font-weight: 600;
    font-size: 18px;
    text-align: center;
    padding: 10px;
}

.casino-table tbody tr {
    background: var(--white);
}

.casino-table tbody tr:hover {
    background: #f8f9fa;
}

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

.casino-table td:first-child {
    font-weight: 600;
}

.casino-table img {
    max-width: 120px;
    height: auto;
    border-radius: 5px;
    display: inline-block;
    vertical-align: middle;
}

.casino-table ul {
    padding-left: 18px;
    margin: 0;
}

.casino-table li {
    margin-bottom: 5px;
    font-size: 14px;
}

.casino-table .btn {
    white-space: nowrap;
    padding: 10px 20px;
    font-size: 13px;
}

.casino-table strong {
    display: block;
    margin-top: 5px;
}

.rating {
    color: #ffc107;
    font-size: 1.2rem;
    letter-spacing: -2px;
}

/* Plain tables inside sections (no .casino-table class) */
.section table:not(.casino-table) {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ddd;
    font-size: 15px;
}

.section table:not(.casino-table) th,
.section table:not(.casino-table) td {
    padding: 10px;
    text-align: left;
    border: 1px solid #e8e7e7;
    vertical-align: middle;
    line-height: 1.5;
}

.section table:not(.casino-table) th {
    background: var(--white);
    color: var(--text-color);
    font-weight: 600;
    font-size: 18px;
    text-align: center;
}

.section table:not(.casino-table) tbody tr {
    background: var(--white);
}

.section table:not(.casino-table) tbody tr:hover {
    background: #f8f9fa;
}

.section table:not(.casino-table) tr:last-child td {
    border-bottom: none;
}

/* =============================================
   FAQ Section
   ============================================= */

.faq {
    background: var(--bg-light);
}

.faq-item {
    background: var(--white);
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: #f9f9f9;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-light);
}

/* =============================================
   Footer
   ============================================= */

.footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 0;
}

.footer-nav a {
    color: var(--white);
    font-size: 14px;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    opacity: 0.8;
}

/* =============================================
   Utilities
   ============================================= */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.full-width-img {
    width: 100%;
    border-radius: var(--border-radius-sm);
    margin-top: 20px;
}

/* Game Container */
.game-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    margin: 25px auto;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    cursor: pointer;
}

.game-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.game-container:hover .game-preview {
    transform: scale(1.02);
    filter: brightness(0.7);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 15px;
    padding: 20px 70px;
    cursor: pointer;
    transition: background-color 0.7s ease;
    z-index: 2;
    font-size: 32px;
}

.play-button:hover {
    background: var(--primary-hover);
}

.play-icon {
    font-size: 2rem;
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--border-radius-sm);
}

/* =============================================
   Responsive Design
   ============================================= */

@media (max-width: 992px) {
    .media-text {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .section h2 {
        font-size: 1.75rem;
    }

    .media-text {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .casino-table,
    .info-table,
    .section table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .container {
        padding: 0 15px;
        max-width: 100%;
    }

    .header .container {
        height: 60px;
    }

    .logo img {
        height: 40px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 20px;
    }

    .nav.active {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    .header-btn {
        padding: 10px 20px;
        font-size: 14px;
        order: 1;
    }

    .menu-toggle {
        order: 2;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .promo-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
        gap: 10px;
    }

    .promo-bar-logo {
        width: 80px;
        height: 80px;
    }

    .promo-bar-info {
        align-items: center;
    }

    .promo-bar-cta {
        padding: 10px 28px;
        font-size: 14px;
    }

    .game-demo-cta {
        flex-direction: column;
        align-items: center;
        padding: 0 10px;
        margin-top: 20px;
        gap: 10px;
    }

    .game-demo-cta .btn {
        font-size: 16px;
        padding: 14px 28px;
        width: 100%;
    }

    .play-button {
        padding: 12px 40px;
        font-size: 22px;
        border-radius: 10px;
    }

    .play-icon {
        font-size: 1.4rem;
    }

    .casino-table {
        display: block;
        overflow-x: auto;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .section {
        padding: 20px 0;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .promo-bar-name {
        font-size: 13px;
    }

    .toc {
        padding: 20px;
    }

    .section .btn,
    .faq .btn,
    .btn-wrap .btn {
        display: block;
        width: 100%;
        padding: 16px 24px;
        font-size: 17px;
    }
}

/* =============================================
   Popup Modal
   ============================================= */

.popup-overlay {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 10000;
    max-width: 460px;
    width: calc(100% - 80px);
    background: var(--white);
    border: 1px solid #717785;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-120%);
    transition: transform 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.popup-modal {
    display: flex;
    gap: 15px;
}

.popup-close {
    width: 30px;
    height: 30px;
    background: #eee;
    border: 1px solid #1e232f;
    border-radius: 50%;
    position: absolute;
    left: -15px;
    top: -15px;
    cursor: pointer;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    color: #1e232f;
    padding: 0;
}

.popup-close:hover {
    background: #ddd;
}

.popup-image {
    width: 130px;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
    flex-shrink: 0;
}

.popup-headline {
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.popup-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 50px;
    margin: 10px auto 0;
    background: var(--primary-color);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.7s ease;
}

.popup-info {
    flex: 1;
}

.popup-subtitle {
    margin-top: 10px;
    color: var(--text-color);
    font-size: 14px;
}

.popup-cta:hover {
    background: var(--primary-hover);
    text-decoration: none;
    color: #fff;
}

/* =============================================
   Sticky Bottom Bar
   ============================================= */

.sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(135deg, var(--popup-gradient-from, #1e293b), var(--popup-gradient-to, #0f172a));
    border-top: 1px solid rgba(0, 251, 255, 0.3);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.sticky-bar.visible {
    transform: translateY(0);
}

.sticky-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.sticky-bar-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.sticky-bar-text {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-bar-cta {
    flex-shrink: 0;
    padding: 10px 32px;
    background: linear-gradient(135deg, #fce922, #9e00b3);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 12px rgba(252, 233, 34, 0.3);
}

.sticky-bar-cta:hover {
    transform: scale(1.05);
    text-decoration: none;
    color: #fff;
}

/* =============================================
   Mobile Bottom Bar (fixed, mobile only)
   ============================================= */

.mobile-bottom-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: block;
        position: fixed !important;
        bottom: 0 !important;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 99999;
        background: var(--white);
        border-top: 1px solid #ddd;
        padding: 10px 15px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        transform: translateZ(0);
    }

    .mobile-bottom-cta {
        display: block;
        width: 100%;
        padding: 14px;
        background: var(--primary-color);
        color: #fff;
        font-size: 17px;
        font-weight: 600;
        text-align: center;
        border-radius: 12px;
        text-decoration: none;
        transition: background-color 0.7s ease;
    }

    .mobile-bottom-cta:hover {
        background: var(--primary-hover);
        color: #fff;
        text-decoration: none;
    }

    .footer {
        padding-bottom: 80px;
    }
}

/* =============================================
   Popup & Sticky Bar Responsive
   ============================================= */

@media (max-width: 768px) {
    .popup-overlay {
        display: none !important;
    }

    .sticky-bar-text {
        display: none;
    }

    .sticky-bar-inner {
        justify-content: center;
        gap: 12px;
    }

    .sticky-bar-cta {
        padding: 10px 24px;
    }
}
