@import url('https://cdn.jsdelivr.net/gh/rastikerdar/samim-font@v4.0.5/dist/font-face.css');

/* --- الأنماط الأساسية --- */
:root {
    --primary-color: #e50914; /* أحمر CimaNow */
    --secondary-color: #FFD700; /* ذهبي للعضوية المميزة */
    --background-dark: #130438; /* بنفسجي غامق */
    --background-light-dark: #2a1b42; /* لون أفتح قليلا للخلفيات الثانوية */
    --text-light: #FFFFFF;
    --text-dark: #EEEEEE;
    --border-color: #3f2a58; /* لون الحدود مناسب للخلفية البنفسجية */
    --header-scroll-overlay: transparent; /* Always transparent */
    --header-height: 70px; /* Define header height as a variable */

    /* NEW: Dark Mode Specific Variables */
    --text-light-dark: #BBBBBB; /* نص افتح قليلا من text-dark للخلفيات الغامقة */

    /* NEW: Light Mode Specific Variables (will be toggled via .light-mode class) - Kept for potential future use if dark mode toggle is re-added */
    --light-background-primary: #f0f2f5; /* خلفية فاتحة أساسية */
    --light-background-secondary: #ffffff; /* خلفية فاتحة ثانوية للعناصر */
    --light-text-primary: #333333; /* نص داكن للوضع الفاتح */
    --light-text-secondary: #555555; /* نص أفتح قليلا */
    --light-border-color: #cccccc; /* حدود فاتحة */
    --light-header-scroll-overlay: transparent; /* Always transparent */


    /* تدرجات لونية جديدة تتناسب مع الخلفية البنفسجية */
    /* تدرج Hero Slider - من اليمين لليسار (للحاسوب) */
    --gradient-overlay-hero-right: linear-gradient(to left, rgba(19,4,56,0.98) 0%, rgba(19,4,56,0.7) 25%, rgba(19,4,56,0.3) 50%, rgba(19,4,56,0) 75%);
    /* تدرج Hero Slider - من الأسفل للأعلى (للجوال) */
    --gradient-overlay-hero-bottom: linear-gradient(to top, rgba(19,4,56,0.98) 0%, rgba(19,4,56,0.7) 30%, rgba(19,4,56,0.3) 60%, rgba(19,4,56,0) 100%);
    /* تدرج لصف الشعارات الصغيرة */
    --gradient-overlay-small-logos: linear-gradient(to top, rgba(19,4,56,0.9) 0%, rgba(19,4,56,0.6) 50%, rgba(19,4,56,0) 100%);
}

/* Light Mode Styles - kept for potential future use if dark mode toggle is re-added */
body.light-mode {
    background-color: var(--light-background-primary);
    color: var(--light-text-primary);
}
body.light-mode #main-header.scrolled {
    background-color: var(--light-header-scroll-overlay); /* Use light header overlay */
    box-shadow: none; /* No shadow in light mode too */
}
body.light-mode #main-header.scrolled .action-btn {
    color: var(--light-text-primary);
}
body.light-mode .post-card {
    background-color: transparent; /* Changed for new card design */
    color: var(--light-text-primary);
}
body.light-mode .section-header::after {
    background-color: var(--primary-color); /* Primary color stays */
}
body.light-mode .section-header h2 {
    color: var(--light-text-primary);
}
body.light-mode .section-header .view-all {
    color: var(--light-text-secondary);
}
body.light-mode .post-card:hover .post-title {
    color: var(--primary-color);
}
body.light-mode .post-title,
body.light-mode #main-nav a,
body.light-mode .vip-link,
body.light-mode .post-categories { /* Added post-categories */
    color: var(--light-text-primary);
}
body.light-mode a:hover,
body.light-mode #main-nav a.active {
    color: var(--primary-color);
}
body.light-mode .btn-add {
    background-color: transparent; /* Changed to transparent */
    color: var(--light-text-primary);
    border-color: var(--light-border-color);
}
body.light-mode .btn-add:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-text-primary);
    border-color: var(--light-text-primary); /* Adjusted for light mode */
}
body.light-mode #main-footer {
    background-color: var(--light-background-primary);
    color: var(--light-text-secondary);
    border-top-color: var(--light-border-color);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}



body {
    font-family: 'Samim', sans-serif;
    margin: 0;
    background-color: var(--background-dark);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl; /* Right-to-left for Arabic content */
    text-align: right;
}

a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* SVG Icons - General Style */
svg {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
    stroke: none;
    display: inline-block;
}

/* --- Main Header --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent; /* Always transparent */
    z-index: 1000;
    box-shadow: none; /* No shadow */
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
    padding: 0;
    backdrop-filter: none; /* No blur by default */
    -webkit-backdrop-filter: none; /* No blur by default */
}
#main-header.scrolled {
    background-color: transparent; /* Always transparent even when scrolled */
    box-shadow: none; /* No shadow even when scrolled */
    backdrop-filter: none; /* No blur even when scrolled */
    -webkit-backdrop-filter: none; /* No blur even when scrolled */
}

#main-header .header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 15px 60px; /* Adjusted padding-left and padding-right for desktop */
    height: var(--header-height);
    gap: 25px;
}

#logo-container {
    display: flex;
    align-items: center;
}
#logo-container img {
    height: 28px;
    max-height: 28px;
    vertical-align: middle;
}

#main-nav {
    margin-right: 30px;
}
#main-nav ul {
    display: flex;
    gap: 25px;
}

#main-nav a {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    padding: 5px 0;
    white-space: nowrap;
    position: relative;
}
#main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
#main-nav a.active::after,
#main-nav a:hover::after {
    width: 100%;
}

#main-nav a.active,
#main-nav a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.vip-link {
    color: var(--secondary-color) !important;
    border: 2px solid var(--secondary-color);
    padding: 5px 15px !important;
    border-radius: 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.vip-link:hover {
    background-color: rgba(255, 215, 0, 0.2);
    color: var(--secondary-color);
}
.vip-link svg {
    fill: var(--secondary-color);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}
.action-btn svg {
    width: 20px;
    height: 20px;
}

/* --- Hero Slider Section --- */
#hero-slider-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    color: var(--text-light);
    direction: rtl;
    z-index: 5;
}

#hero-slider-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0;
    box-sizing: border-box;
    z-index: 6;
}
.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    filter: none;
    transition: filter 0.8s ease-in-out, transform 0.8s ease-in-out;
}
.hero-slide.active .slide-bg {
    transform: scale(1.05);
}

.slide-content-wrapper {
    position: relative;
    z-index: 10;
    height: 100%;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    /* Adjusted padding-top for desktop to give space from header */
    padding: var(--header-height) 60px 150px 60px; /* Desktop specific padding */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns content higher up in the slide */
    align-items: flex-start; /* Aligns content to the right (start in RTL) */
    text-align: right;
    box-sizing: border-box;
    gap: 15px;
    background: var(--gradient-overlay-hero-right);
    pointer-events: none;
}
.slide-content-wrapper > * {
    pointer-events: auto;
}

.slide-details {
    max-width: 600px;
    width: 100%;
    z-index: 10;
}

.movie-logo {
    max-width: 250px; /* Adjusted for desktop */
    height: auto;
    margin-bottom: 20px; /* Adjusted for desktop */
    filter: drop_shadow(2px 2px 8px rgba(0,0,0,0.9));
    margin-top: 0;
}

.content-meta,
.content-description,
.content-cast-line, /* New class */
.content-extra-info-line { /* New class */
    font-size: 1.1rem; /* Adjusted for desktop */
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 10px; /* Adjusted for desktop */
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    line-height: 1.5;
    text-align: right;
}
.content-meta span {
    margin-left: 15px;
    white-space: nowrap;
}
.content-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 20px; /* Adjusted for desktop */
    color: var(--text-light-dark);
    max-width: 550px;
    text-align: right;
}
.content-cast-line { /* Style for cast line for desktop */
    margin-bottom: 20px; /* Space between cast and buttons */
}
.content-extra-info-line { /* Style for extra info line, placed after buttons for desktop */
    margin-top: 15px; /* Space between buttons and extra info */
    font-size: 1rem;
    color: var(--text-light-dark);
}

.content-buttons {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
    gap: 15px;
    z-index: 1002;
    pointer-events: auto;
}
.content-buttons a {
    text-decoration: none;
    padding: 12px 35px; /* Wider buttons for desktop */
    border-radius: 30px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.content-buttons svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.btn-watch {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.btn-watch:hover {
    background-color: #f40612;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}
.btn-add {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-light);
}
.btn-add:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

/* Small Logos Row (Global and Persistent) */
#small-logos-global-row {
    position: relative;
    width: 100%;
    height: 150px;
    z-index: 25;
    background: var(--gradient-overlay-small-logos);
    padding: 20px 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-top: -100px;
    /* REMOVED: border-top: 1px solid rgba(255,255,255,0.1); */ /* Removed the subtle separator line */
}
#small-logos-global-row::-webkit-scrollbar {
    display: none;
}

.small-logo-item {
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    background-color: transparent;
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;

    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    z-index: 51;
}
.small-logo-item:hover,
.small-logo-item.active {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.small-logo-item {
    position: relative;
}

.small-logo-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.small-logo-item:hover::after,
.small-logo-item.active::after {
    transform: scaleX(1);
}

/* Slider navigation dots are removed for all screen sizes */
.slider-nav-dots { display: none; }


/* --- Horizontal Sections for Posts --- */
.horizontal-section {
    max-width: 1400px;
    margin: 60px auto 60px auto; /* Adjusted margin-top for spacing */
    padding: 0 30px;
    direction: rtl;
    position: relative;
    z-index: 20;
    background-color: var(--background-dark);
}
body.light-mode .horizontal-section {
    background-color: var(--light-background-primary);
}

.horizontal-posts-container {
    display: flex; /* Changed to flex for horizontal layout */
    overflow-x: auto; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    white-space: nowrap; /* Prevent items from wrapping */
    padding-bottom: 20px; /* Space for scrollbar or visual spacing */
    gap: 20px; /* Gap between post cards */
    /* Optional: Add scroll snapping for a smoother user experience */
    scroll-snap-type: x mandatory;
}
.horizontal-posts-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}


.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}
.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.section-header .badge {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 400;
}

.section-header .view-all {
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 400;
    opacity: 0.8;
}
.section-header .view-all:hover {
    color: var(--primary-color);
    opacity: 1;
}


/* Post Card for Horizontal Sections */
.post-card {
    display: inline-block; /* Changed for horizontal flex layout */
    flex-shrink: 0; /* Prevent cards from shrinking */
    width: 180px; /* Fixed width for cards */
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    z-index: 21;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    scroll-snap-align: start; /* Snap to start of card */
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}
.post-card:hover .post-poster::after {
    opacity: 1;
}
.post-card:hover .play-button-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}
.post-card:hover .post-info-overlay {
    opacity: 1;
    transform: translateY(0);
}


.post-poster {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
}
.post-poster::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4;
}

.post-badges {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 15;
    pointer-events: none;
}

/* Diagonal Badge Base */
.diagonal-badge {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.75rem;
    height: 25px;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 1;
}
.diagonal-badge span {
    padding: 0 15px;
}

.quality-badge.diagonal-badge {
    top: 15px;
    left: -20px;
    background-color: #2c004d;
    transform: rotate(-45deg);
    transform-origin: 0% 100%;
    min-width: 100px;
}

.dubbed-badge.diagonal-badge {
    top: 50px;
    left: -20px;
    background-color: var(--primary-color);
    transform: rotate(-45deg);
    transform-origin: 0% 100%;
    min-width: 100px;
}

/* Year Badge (Top Right, not diagonal) */
.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 16;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    pointer-events: none;
}


/* Play Button Overlay */
.play-button-overlay {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
}
.play-button-overlay svg {
    fill: var(--text-light);
    width: 24px;
    height: 24px;
    margin-right: -3px;
}

/* Post Info Overlay (Title and Categories) */
.post-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 10px;
    text-align: center;
    background: linear-gradient(to top, rgba(19,4,56,0.9) 0%, rgba(19,4,56,0.6) 50%, rgba(19,4,56,0) 100%);
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 5;
}

.post-info-overlay .post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-light);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: auto;
    transition: color 0.3s ease;
}

.post-info-overlay .post-categories {
    font-size: 0.85rem;
    font-weight: 400;
    color: #aaa;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Loading Spinner */
.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- Main Footer --- */
#main-footer {
    background-color: var(--background-dark);
    color: var(--text-dark);
    text-align: center;
    padding: 25px;
    font-size: 0.95rem;
    font-weight: 400;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}


/* --- Responsive Styles --- */

/* Desktop / Large Screens */
@media (min-width: 992px) {
    #main-header .header-inner {
        padding: 15px 60px;
    }
}

/* Tablet and below (عرض أقل من 991.98 بكسل) */
@media (max-width: 991.98px) {
    #main-header .header-inner {
        padding: 10px 15px;
        height: 60px;
        justify-content: flex-start;
        gap: 10px;
    }
    #main-nav {
        display: none;
    }
    #logo-container {
        flex-grow: 0;
        order: 0;
        margin: 0;
    }
    #logo-container img {
        height: 25px;
    }
    #search-toggle {
        display: none;
    }
    .header-actions {
        order: 1;
        margin-left: auto;
        gap: 0;
    }

    /* Hero Slider on Mobile */
    #hero-slider-section {
        height: 100vh;
        padding-top: var(--header-height);
        margin-top: calc(-1 * var(--header-height));
    }
    .hero-slide {
        justify-content: flex-end;
        align-items: center;
    }
    .slide-bg {
        filter: brightness(0.7) !important;
    }
    .slide-content-wrapper {
        padding: calc(var(--header-height) + 15px) 20px 120px 20px;
        align-items: center;
        text-align: center;
        background: var(--gradient-overlay-hero-bottom);
        pointer-events: none;
        gap: 10px;
    }
    .slide-content-wrapper > * {
        pointer-events: auto;
    }
    .movie-logo {
        max-width: 200px;
        margin-bottom: 20px;
    }
    .content-meta, .content-description, .content-cast-line, .content-extra-info-line {
        font-size: 1rem;
        font-weight: 400;
        display: block;
        margin-bottom: 10px;
        text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
        text-align: center;
    }
    .content-description {
        -webkit-line-clamp: 3;
        font-size: 0.9rem;
        margin-bottom: 20px;
        max-width: 90%;
    }
    .content-cast-line {
        margin-bottom: 10px;
    }
    .content-extra-info-line {
        margin-top: 10px;
        font-size: 0.95rem;
    }
    .content-buttons {
        flex-direction: row;
        max-width: 400px;
        margin: 15px auto 0 auto;
        gap: 15px;
        justify-content: center;
    }
    .content-buttons a {
        width: auto;
        padding: 10px 25px;
        font-size: 1rem;
    }

    /* Small Logos Row on Mobile - REMOVED BOXES AND SHADOWS */
    #small-logos-global-row {
        height: 100px;
        padding: 10px 15px;
        margin-top: -60px;
        justify-content: center;
        gap: 10px;
    }
    .small-logo-item {
        width: 80px;
        height: 80px;
        border-radius: 8px;
        box-shadow: none; /* إزالة الظل */
        background-color: transparent;
        border: none; /* إزالة الحدود */
    }
    .small-logo-item:hover,
    .small-logo-item.active {
        transform: translateY(0); /* إزالة تأثير الرفع */
        box-shadow: none; /* التأكد من عدم وجود ظل عند التحويم/التفعيل */
        border-color: transparent; /* التأكد من عدم وجود حدود */
    }

    /* Horizontal Sections on Mobile */
    .horizontal-section {
        padding: 0 15px;
        margin-top: 40px;
    }
    .section-header h2 {
        font-size: 22px;
    }
    .post-card {
        width: 140px;
    }
    .diagonal-badge {
        height: 22px;
        font-size: 0.7rem;
    }
    .quality-badge.diagonal-badge {
        top: 10px;
        left: -15px;
        min-width: 80px;
    }
    .dubbed-badge.diagonal-badge {
        top: 38px;
        left: -15px;
        min-width: 80px;
    }
    .year-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
        top: 8px;
        right: 8px;
    }
    .play-button-overlay {
        width: 50px;
        height: 50px;
        top: 50%;
    }
    .play-button-overlay svg {
        width: 20px;
        height: 20px;
    }
    .post-info-overlay .post-title {
        font-size: 1rem;
    }
    .post-info-overlay .post-categories {
        font-size: 0.8rem;
    }
    #main-footer {
        margin-top: 50px;
        padding: 20px;
    }
}

/* Small Mobile Devices (عرض أقل من 575.98 بكسل) - REMOVED BOXES AND SHADOWS */
@media (max-width: 575.98px) {
    #main-header .header-inner {
        padding: 8px 10px;
        height: 55px;
        gap: 5px;
    }
    #logo-container img {
        height: 22px;
    }

    /* Hero Slider on Small Mobile */
    .slide-content-wrapper {
        padding: calc(var(--header-height) + 10px) 10px 80px 10px;
        gap: 8px;
    }
    .movie-logo {
        max-width: 150px;
        margin-bottom: 15px;
    }
    .content-description {
        display: block;
        -webkit-line-clamp: 2;
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    .content-meta, .content-cast-line, .content-extra-info-line {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    .content-buttons {
        flex-direction: column;
        max-width: 250px;
        gap: 8px;
        margin-top: 10px;
    }
    .content-buttons a {
        padding: 8px 15px;
        font-size: 0.9rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        width: 100%;
    }
    .content-buttons a:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }

    /* Small Logos Row on Small Mobile - REMOVED BOXES AND SHADOWS */
    #small-logos-global-row {
        height: 80px;
        padding: 8px 10px;
        margin-top: -40px;
        gap: 8px;
    }
    .small-logo-item {
        width: 60px;
        height: 60px;
        border-radius: 5px;
        box-shadow: none; /* إزالة الظل */
        border: none; /* إزالة الحدود */
    }

    /* Horizontal Sections on Small Mobile */
    .horizontal-section {
        padding: 0 10px;
        margin-top: 30px;
    }
    .section-header h2 {
        font-size: 20px;
    }
    #posts-grid { /* This rule is not used anymore since #latest-additions was removed, but keeping for completeness */
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .post-card { /* Adjusted for very small screens */
        width: 110px;
    }
    .diagonal-badge {
        height: 16px;
        font-size: 0.65rem;
    }
    .quality-badge.diagonal-badge {
        top: 6px;
        left: -10px;
        min-width: 60px;
    }
    .dubbed-badge.diagonal-badge {
        top: 30px;
        left: -10px;
        min-width: 60px;
    }
    .year-badge {
        font-size: 0.6rem;
        padding: 2px 5px;
        top: 6px;
        right: 6px;
    }
    .play-button-overlay {
        width: 40px;
        height: 40px;
    }
    .play-button-overlay svg {
        width: 16px;
        height: 16px;
    }
    .post-info-overlay .post-title {
        font-size: 0.85rem;
    }
    .post-info-overlay .post-categories {
        font-size: 0.7rem;
    }
    #main-footer {
        margin-top: 40px;
        padding: 15px;
        font-size: 0.85rem;
    }
}