 /* =================================================================*********
 *  Layout & Structure
 * =================================================================********* */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header-container,
.footer-container,
.hero-content,
.content-posts-grid,
.single-article-container {
    width: 100%;
    max-width: var(--ms-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
 *  Header & Nav
 * ========================================================================== */
.site-header {
    background: var(--ms-header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--ms-header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.site-title a {
    color: var(--ms-primary-color);
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo {
    max-height: calc(var(--ms-header-height) - 20px);
    width: auto;
    display: block;
}

/* Navigation - Desktop */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
}

.main-navigation a {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

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

.main-navigation a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
}

/* Header Actions & Mobile Toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    align-items: center;
}

.lang-switcher li {
    display: flex;
    align-items: center;
}

.lang-switcher a {
    font-size: 1.2rem;
    /* Larger text if names shown */
    text-transform: uppercase;
    opacity: 0.8;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Style for Polylang Flags */
.lang-switcher img {
    width: 35px !important;
    /* Force override */
    max-width: none !important;
    height: auto !important;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s;
    display: block;
}

.lang-switcher a:hover {
    opacity: 1;
    color: var(--ms-primary-color);
}

.lang-switcher a:hover img {
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--ms-primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--ms-text-color);
    transition: 0.3s;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-content ul {
    list-style: none;
    text-align: center;
    padding: 0;
}

.mobile-menu-content li {
    margin: 20px 0;
}

.mobile-menu-content a {
    font-size: 2rem;
    font-family: var(--ms-font-heading);
    color: var(--ms-text-color);
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
}

/* ==========================================================================
 *  Hero Section
 * ========================================================================== */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: var(--ms-primary-color);
    filter: blur(150px);
    opacity: 0.2;
    z-index: -1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero-subtitle {
    color: var(--ms-primary-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #ccc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.slot-machine-graphic {
    width: 300px;
    height: 200px;
    background: #222;
    border: 4px solid var(--ms-primary-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
}

.reel {
    font-size: 4rem;
    font-weight: bold;
    color: var(--ms-primary-color);
    text-shadow: 0 0 10px var(--ms-primary-color);
}

@media (max-width: 900px) {
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        padding: 60px 0 30px;
    }

    .hero-visual {
        margin-bottom: 40px;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }
}


/* ==========================================================================
 *  Buttons
 * ========================================================================== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--ms-primary-color);
    color: #000;
}

.btn-primary:hover {
    background-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.glow-effect {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
 *  Content Cards
 * ========================================================================== */
.content-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 80px 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    transition: 0.3s;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
}

.entry-title {
    font-size: 2.5rem;
    color: var(--ms-primary-color);
    margin-bottom: 25px;
    font-weight: 800;
}

/* ==========================================================================
 *  Premium Typography & Content
 * ========================================================================== */

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.entry-content h2 {
    font-size: 2.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.entry-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--ms-primary-color);
}

.entry-content h3 {
    font-size: 1.8rem;
    color: var(--ms-primary-color);
}

.entry-content h4 {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.entry-content p {
    margin-bottom: 1.8rem;
}

/* Modern Designer Tables */
.entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5rem 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.entry-content th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--ms-primary-color);
    text-align: left;
    padding: 18px 25px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.entry-content td {
    padding: 16px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
}

.entry-content tr:last-child td {
    border-bottom: none;
}

.entry-content tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin-bottom: 2rem;
    padding-left: 20px;
}

.entry-content li {
    margin-bottom: 0.8rem;
}

.entry-content ul li {
    list-style: none;
    position: relative;
    padding-left: 15px;
}

.entry-content ul li::before {
    content: '•';
    color: var(--ms-primary-color);
    position: absolute;
    left: -15px;
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1;
}

/* Spacing Fix for consecutive headings */
.entry-content *+h2,
.entry-content *+h3,
.entry-content *+h4 {
    margin-top: 3.5rem;
}

.entry-content h2+h3,
.entry-content h3+h4 {
    margin-top: 1.5rem;
}

/* Full Width Article Layout */
.single-article-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(20, 20, 20, 0.4);
    padding: 40px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    margin-top: -50px;
    /* Slight overlap with hero for depth */
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .single-article-container {
        padding: 30px 20px;
        margin-top: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}


/* Table Refinement */
.entry-content table {
    border: none;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.4), rgba(15, 15, 15, 0.4));
}

.entry-content td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
}

.entry-content tr:hover td {
    color: #fff;
    background: rgba(212, 175, 55, 0.05);
}

.entry-content th {
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

/* ==========================================================================
 *  Footer
 * ========================================================================== */
.site-footer {
    margin-top: auto;
    background-color: #000;
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widgets {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col h3 {
    color: var(--ms-primary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-menu ul {
    list-style: none;
}

.footer-menu a {
    opacity: 0.6;
}

.footer-menu a:hover {
    opacity: 1;
    color: var(--ms-primary-color);
}

.site-info {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.5;
}

/* ==========================================================================
 *  404 Page
 * ========================================================================== */
.error-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 100px 20px;
    overflow: hidden;
}

.error-content {
    z-index: 2;
    position: relative;
}

.page-title.glitched-text {
    font-size: 10rem;
    line-height: 1;
    color: var(--ms-primary-color);
    margin: 0;
    text-shadow: 2px 2px 0px rgba(255, 0, 255, 0.5), -2px -2px 0px rgba(0, 255, 255, 0.5);
    animation: glitch 1s infinite alternate-reverse;
}

.error-404 h2 {
    font-size: 2.5rem;
    margin-top: 20px;
    text-transform: uppercase;
}

.error-404 p {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-bottom: 40px;
}

.slot-symbols-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.03);
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 50px;
    user-select: none;
    pointer-events: none;
}

@keyframes glitch {
    0% {
        text-shadow: 2px 2px 0px rgba(255, 0, 255, 0.5), -2px -2px 0px rgba(0, 255, 255, 0.5);
    }

    25% {
        text-shadow: -2px 2px 0px rgba(255, 0, 255, 0.5), 2px -2px 0px rgba(0, 255, 255, 0.5);
    }

    50% {
        text-shadow: 2px -2px 0px rgba(255, 0, 255, 0.5), -2px 2px 0px rgba(0, 255, 255, 0.5);
    }

    75% {
        text-shadow: -2px -2px 0px rgba(255, 0, 255, 0.5), 2px 2px 0px rgba(0, 255, 255, 0.5);
    }

    100% {
        text-shadow: 2px 0px 0px rgba(255, 0, 255, 0.5), -2px 0px 0px rgba(0, 255, 255, 0.5);
    }
}

@media (max-width: 768px) {
    .page-title.glitched-text {
        font-size: 6rem;
    }

    .slot-symbols-bg {
        font-size: 8rem;
    }
}

/* ==========================================================================
 *  Demo Mode Styles
 * ========================================================================== */
.slot-demo-wrapper {
    position: relative;
    display: block;
    /* Wraps content properly */
    width: fit-content;
    margin: 0 auto;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
    isolation: isolate;
    /* Create stacking context for proper z-index layering */
}

.slot-demo-wrapper:hover {
    transform: scale(1.02);
}

.slot-graphic {
    display: block;
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    border: 4px solid var(--ms-primary-color);
    transition: filter 0.3s ease;
}

/* Blur for Demo Mode */
.slot-graphic.highlight-blur,
.slot-graphic.force-blur,
.is-demo {
    filter: blur(1px);
    -webkit-filter: blur(1px);
}

.demo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    /* Lower than demo-ui-simulation (25) */
    background: rgba(0, 0, 0, 0.3);
    /* Semi-transparent darkening instead of backdrop-filter */
    transition: background 0.3s;
}

.slot-demo-wrapper:hover .demo-overlay {
    background: rgba(0, 0, 0, 0.15);
    /* Lighter on hover */
}

.demo-btn {
    font-size: 1.2rem;
    padding: 15px 40px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    background-color: var(--ms-primary-color);
    color: #000;
    pointer-events: none;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ==========================================================================
   Demo Simulation UI (v1.5.5)
   ========================================================================== */
.demo-ui-simulation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 25;
    /* Higher than .demo-overlay (20) */
    padding: 20px;
    pointer-events: none;
}

.demo-badge {
    position: absolute;
    top: 25px;
    left: 25px;
    background: var(--ms-primary-color);
    color: #000;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 900;
    border-radius: 4px;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    display: block !important;
}

.demo-top-right {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    gap: 12px;
}

.demo-icon-square {
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    position: relative;
    display: block !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.demo-icon-square::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}


/* ==========================================================================
   Bonus Popup (v1.5.4 - Bulletproof Grid Centering)
   ========================================================================== */
.bonus-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    background: rgba(0, 0, 0, 0.94) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 999999999 !important;

    /* GRID CENTERING - Most stable for mobile */
    display: none !important;
    place-items: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Force Grid layout when visible */
.bonus-popup-overlay.show-popup {
    display: grid !important;
    opacity: 1 !important;
}

.bonus-popup-content {
    position: relative !important;
    background: linear-gradient(145deg, #1e1e1e, #000) !important;
    border: 2px solid var(--ms-primary-color) !important;
    padding: 50px 30px 40px !important;
    border-radius: 28px !important;
    width: 100% !important;
    max-width: 440px !important;
    text-align: center !important;
    box-shadow: 0 0 100px rgba(0, 0, 0, 1) !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    transform: scale(0.9) !important;
    opacity: 1 !important;

    /* Safety for small screens */
    max-height: 85vh !important;
    max-height: 85dvh !important;
    overflow-y: auto !important;
    margin: auto !important;
}

.bonus-popup-overlay.show-popup .bonus-popup-content {
    transform: scale(1) !important;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: 0.3s;
}

.popup-title {
    font-size: 2rem;
    color: var(--ms-primary-color);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* MOBILE PERFECTION v1.5.4 */
@media (max-width: 600px) {
    .bonus-popup-overlay {
        padding: 15px !important;
    }

    .bonus-popup-content {
        padding: 40px 20px 30px !important;
        max-width: 320px !important;
        border-radius: 20px !important;
    }

    .popup-title {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }

    .close-popup {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1.6rem;
    }
}

/* Prevent scroll when popup is open */
body.popup-open {
    overflow: hidden !important;
}


/*
 * End of main styles
 */

/* ==========================================================================
 *  Final Professional Edge-to-Edge System (v1.1.5)
 *  Justified text and full-width layout without breaking header/hero.
 * ========================================================================== */
@media (max-width: 1100px) {

    /* Kill layout boxing for the main content area */
    .single-article-container,
    #primary,
    #content,
    .site-main,
    .site-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Maintain proper padding for Header & Footer (not 0) */
    .header-container,
    .footer-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
    }

    /* Article Polish: No cards, just pure content */
    article.post {
        background: rgba(15, 15, 15, 0.7) !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 40px 0 !important;
    }

    /* Text: Edge-to-Edge + Justified */
    .entry-header,
    .entry-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .entry-content,
    .entry-content p,
    .entry-content li {
        text-align: justify !important;
        text-justify: inter-word !important;
        hyphens: auto !important;
        line-height: 1.6 !important;
    }

    /* Hero Section: Keep it Premium and Centered */
    .hero-section {
        flex-direction: column-reverse;
        text-align: center !important;
        padding: 40px 15px !important;
    }

    .hero-visual {
        margin-bottom: 30px !important;
    }

    .hero-content {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
        margin: 0 auto 20px !important;
        text-align: center !important;
    }

    .hero-desc {
        font-size: 1rem !important;
        margin: 0 auto 30px !important;
        text-align: center !important;
    }

    .hero-actions {
        justify-content: center !important;
        gap: 10px !important;
    }
}