/* --- General Setup & Full-Page Scroll --- */
:root {
    --color-black: #0a0a0a;
    --color-surface: rgba(26, 26, 26, 0.7);
    --color-white: #f5f5f5;
    --color-deep-red: #8B0000;
    --color-neon-red: #ff073a;
    --font-family-fa: 'Vazirmatn', sans-serif;
    --font-family-en: 'Roboto', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--color-black);
    color: var(--color-white);
    line-height: 1.7;
    overflow: hidden;
}
/* Hide scrollbar for various browsers */
body::-webkit-scrollbar { width: 0; background: transparent; }
body { -ms-overflow-style: none; scrollbar-width: none; }
[lang="fa"] { font-family: var(--font-family-fa); }
[lang="en"] { font-family: var(--font-family-en); }

/* --- 1. Preloader --- */
#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--color-black);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.preloader-text {
    font-size: 10vw;
    font-weight: 900;
    color: var(--color-neon-red);
    text-shadow: 0 0 25px var(--color-neon-red);
    margin: 0;
    line-height: 1;
}
.loading-dots {
    display: inline-block;
    color: var(--color-white);
    font-family: var(--font-family-fa);
    font-size: 2vw;
    letter-spacing: 5px;
    margin-top: 1rem;
}
.loading-dots span {
    opacity: 0;
    animation: typing-dot-fade 1.5s infinite;
}
.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot-fade {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* --- Background Poster Style --- */
.background-poster {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    z-index: 0;
    opacity: 0.25;
    transition: background-image 5.5s ease-in-out;
}
.fullpage-section.alt .background-poster {
    background-position: bottom right;
}
.fullpage-section:not(.alt) .background-poster {
    background-position: bottom left;
}


/* --- Main Content Wrapper --- */
#main-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* --- Full-Page Scroll Container --- */
#fullpage-container {
    width: 100%;
    height: 100vh;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#fullpage-container::-webkit-scrollbar { width: 0; background: transparent; }
.fullpage-section {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
}
.section-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}
.section-wrapper > div { width: 100%; }

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0; width: 100%;
    padding: 0.5rem 2%;
    background-color: rgba(10, 0, 44, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-deep-red);
    z-index: 1000;
    display: flex; justify-content: space-between; align-items: center; opacity: 1.2;
}
.logo-container img { height: 50px; }
.controls { display: flex; align-items: center; gap: 20px; }
.lang-switcher a { color: var(--color-white); text-decoration: none; margin: 0 5px; }
.lang-switcher a.active { color: var(--color-neon-red); font-weight: bold; }
#menu-toggle { font-size: 2rem; cursor: pointer; color: var(--color-neon-red); }

/* --- 3. Fullscreen Menu --- */
#slide-out-menu {
    position: fixed; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    z-index: 2000;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}
[dir="rtl"] #slide-out-menu { right: 0; transform: translateX(100%); }
[dir="ltr"] #slide-out-menu { left: 0; transform: translateX(-100%); }
#slide-out-menu.open { transform: translateX(0); }
#slide-out-menu ul { list-style: none; text-align: center; }
#slide-out-menu a {
    display: block; padding: 1rem 0;
    color: var(--color-white); text-decoration: none;
    font-size: 2.5rem; font-weight: bold;
    transition: color 0.3s ease, transform 0.3s ease;
}
#slide-out-menu a:hover { color: var(--color-neon-red); transform: scale(1.1); }
#menu-close {
    position: absolute;
    top: 20px;
    font-size: 3rem;
    color: var(--color-white);
    cursor: pointer;
}
[dir="rtl"] #menu-close { right: 20px; }
[dir="ltr"] #menu-close { left: 20px; }

/* --- Section Content Styling --- */
.section-content {
    display: flex; align-items: top; gap: 4rem;
    width: 100%; max-width: 1400px;
    opacity: 0; transform: translateY(-75px);
    transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s;
    position: relative;
    z-index: 1;
}
.section-content.is-visible { opacity: 1; transform: translateY(100); }
.fullpage-section.alt .section-content { flex-direction: row-reverse; }
.text-content { flex: 1; position: relative; }
.text-only-content { flex-direction: column; text-align: center; }
.section-center-content { text-align: top; }
[dir="rtl"] .text-content { text-align: right; }
[dir="ltr"] .text-content { text-align: left; }
.text-content h2 { font-size: 3.8rem; font-weight: 900; color: var(--color-neon-red); margin-bottom: 1rem; }
.text-only-content h2 { margin-bottom: 0.5rem; }
.text-content p { font-size: 1.8rem; color: #ccc; margin-bottom: 2rem; }
.text-only-content p { margin-bottom: 1rem; }
.slider-content { flex: 1; max-width: 50%; }
.card-slider { width: 100%; border-radius: 10px; overflow: hidden; transform: translateY(-130px); border: 2px solid var(--color-deep-red); }
.card-slider img { width: 100%; height: auto; object-fit: contain; }
.swiper-pagination-bullet-active { background: var(--color-neon-red) !important; }

/* --- Intro Section Specifics --- */
#intro-section .intro-content { text-align: center; animation: fadeIn 3s ease-in-out forwards; }
#intro-section h1 { font-size: 10vw; font-weight: 900; color: var(--color-neon-red); text-shadow: 0 0 25px var(--color-neon-red); margin: 0; line-height: 1; }
#intro-section p { font-size: 2vw; color: var(--color-white); letter-spacing: 3px; margin-top: 1rem; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* --- Floating Elements --- */
.floating-element {
    position: absolute;
    width: 150px !important;
    opacity: 0.3;
    z-index: 0;
    transition: transform 0.5s ease-out, opacity 0.3s ease-in-out;
    will-change: transform, opacity;
}
.floating-element:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* --- Sliders --- */
.games-marquee-slider {
    width: 100%;
    margin-top: 4rem;
    height: 200px;
}
.games-marquee-slider .swiper-slide {
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.games-marquee-slider img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}
.mining-posters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 2rem;
    width: 100%;
    justify-content: center;
    align-items: center;
}
.mining-posters-grid img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

/* --- Footer Section --- */
#footer-section {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: var(--color-black);
}
#footer-section .footer-content {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    text-align: center;
}
#footer-section .footer-content h1 {
    font-size: 10vw;
    font-weight: 900;
    color: var(--color-neon-red);
    text-shadow: 0 0 25px var(--color-neon-red);
    margin: 0;
    line-height: 1;
}
#footer-section .footer-content p {
    font-size: 2vw;
    color: var(--color-white);
    letter-spacing: 3px;
    margin-top: 1rem;
}

/* --- 2. Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    width: 50px; height: 50px;
    background: var(--color-neon-red);
    color: var(--color-white);
    border: none; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0; visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
[dir="rtl"] #back-to-top { left: 20px; }
[dir="ltr"] #back-to-top { right: 20px; }

/* --- Responsive --- */
@media (max-width: 960px) {
    .section-content, .fullpage-section.alt .section-content { flex-direction: column; gap: 2rem; text-align: center !important; }
    .slider-content { max-width: 100%; width: 100%; }
    .text-content { text-align: center !important; }
    #intro-section h1, #footer-section .footer-content h1 { font-size: 15vw; }
    #intro-section p, #footer-section .footer-content p { font-size: 3.5vw; }
    #slide-out-menu a { font-size: 1.8rem; }
    .mining-posters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* --- Galactic Casino Background --- */
#galactic-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}
/* --- Styles for Blog Page --- */
.posts-grid-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 4rem;
    width: 100%;
}
.post-card {
    background-color: var(--color-surface);
    backdrop-filter: blur(5px);
    border: 1px solid var(--color-deep-red);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(255, 7, 58, 0.2);
}
.post-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}
.post-card h3 {
    color: var(--color-neon-red);
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}
.post-card p {
    color: var(--color-white);
    font-size: 1.3rem;
    line-height: 2;
}
.post-card .post-content {
    display: flex;
    flex-direction: column;
    text-align: right;
}
.post-card .read-more-btn {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--color-white);
    background-color: var(--color-neon-red);
    border: 1px solid var(--color-neon-red);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}
.post-card .read-more-btn:hover {
    background-color: transparent;
    color: var(--color-neon-red);
}
/* --- Hero Post Styles --- */
#hero-post-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}
#hero-post-container .post-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    text-align: right;
    padding: 3rem;
    width: 100%;
    max-width: 1200px;
    transition: all 0.5s ease;
}
#hero-post-container .post-card .post-content {
    flex: 1;
}
#hero-post-container .post-card h3 {
    font-size: 3rem;
}
#hero-post-container .post-card img {
    width: 50%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 0;
}
@media (max-width: 960px) {
    #hero-post-container .post-card {
        flex-direction: column;
        text-align: center;
    }
    #hero-post-container .post-card img {
        width: 100%;
    }
}
/* --- Regular Posts Grid --- */
#regular-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}
/* --- Filter & Search Styles --- */
.filter-and-search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}
#search-input {
    background-color: var(--color-surface);
    color: var(--color-white);
    border: 1px solid var(--color-deep-red);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    width: 100%;
    max-width: 500px;
    font-size: 1.1rem;
    text-align: right;
}
.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.filter-button {
    background-color: var(--color-surface);
    color: var(--color-white);
    border: 1px solid var(--color-deep-red);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-button:hover, .filter-button.active {
    background-color: var(--color-neon-red);
    border-color: var(--color-neon-red);
    color: var(--color-white);
}
/* --- Pagination Controls --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-bottom: 3rem;
}
.page-button {
    background-color: var(--color-surface);
    color: var(--color-neon-red);
    border: 2px solid var(--color-neon-red);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.page-button:hover:not(:disabled) {
    background-color: var(--color-neon-red);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 7, 58, 0.4);
}
.page-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #555;
    color: #888;
}
.current-page {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-white);
}
@media (max-width: 960px) {
    .page-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}