*:focus, *:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
:root {
    /* Dark Theme Variables */
    --bg-color: #0f0f0f;
    --text-color: #ffffff;
    --primary-accent: #3b82f6;
    --secondary-accent: #6b21a8;
    --yellow-accent: #facc15;
    --card-bg: #1a1a1a;
    --border-color: rgba(255, 255, 255, 0.2);
    --overlay-bg: rgba(0, 0, 0, 0.85);
    --scrollbar-thumb: #3b82f6;
    --rating-color: #FFD700;
    --nav-bg: rgba(26, 26, 26, 0.5);
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-text: #ffffff;
    --icon-color: rgba(255, 255, 255, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-overlay: rgba(59, 130, 246, 0.15);
      --skeleton-bg-1: #252525;
    --skeleton-bg-2: #353535;
    --skeleton-bg-light-1: #e0e0e0;
    --skeleton-bg-light-2: #f0f0f0;
}

.light-theme {
    /* Light Theme - Inverted Dark Theme */
    --bg-color: #e6e6e6;
    --text-color: #0f0f0f;
    --primary-accent: #1d4ed8;
    --secondary-accent: #5b21b6;
    --yellow-accent: #ca8a04;
    --card-bg: #d9d9d9;
    --border-color: rgba(0, 0, 0, 0.2);
    --overlay-bg: rgba(255, 255, 255, 0.85);
    --scrollbar-thumb: #1d4ed8;
    --rating-color: #d97706;
    --nav-bg: rgba(220, 220, 220, 0.8);
    --input-bg: rgba(0, 0, 0, 0.1);
    --input-text: #1a1a1a;
    --icon-color: rgba(0, 0, 0, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-overlay: rgba(29, 78, 216, 0.15);
    --skeleton-bg-1: var(--skeleton-bg-light-1);
    --skeleton-bg-2: var(--skeleton-bg-light-2);
}

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Body */
body {
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    width: 100%;
    position: relative; /* مهم */
    overflow-x: hidden;
}

.main-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}


/* لایه پس‌زمینه متحرک */
.geometric-background {
    position: fixed; /* تغییر از absolute به fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -3;
}

.shape {
    position: absolute;
    opacity: 0.2;
    transform-origin: center;
    z-index: -3;
}
.square {
    width: 40px;
    height: 40px;
    background: var(--secondary-accent);
    animation: rotate 20s infinite linear;
}

.circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-accent);
    animation: pulse 15s infinite alternate;
}

.triangle {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid var(--yellow-accent);
    animation: float 12s infinite ease-in-out;
}

.rectangle {
    width: 80px;
    height: 30px;
    background: var(--primary-accent);
    animation: slide 18s infinite linear;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.5); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.1; }
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-20px) translateX(20px) rotate(180deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(360deg); }
}

@keyframes slide {
    0% { transform: translateX(-100px) rotate(0deg); }
    50% { transform: translateX(100px) rotate(180deg); }
    100% { transform: translateX(-100px) rotate(360deg); }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
   z-index: -2; 
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: var(--text-color);
    opacity: 0.5;
    animation: sparkle 8s infinite linear;
}

@keyframes sparkle {
    0% { opacity: 0; }
    50% { opacity: 0.8; }
    100% { opacity: 0; }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 80%);
   z-index: -1; 
    animation: pulse-overlay 10s infinite alternate;
}

@keyframes pulse-overlay {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* برای اطمینان از نمایش صحیح در همه دستگاه‌ها */
@media (orientation: portrait) {
    .content {
        width: 90%;
        height: auto;
    }
}

@media (orientation: landscape) {
    .content {
        width: auto;
        max-height: 90%;
    }
}

       
/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background:  var(--nav-bg);
}

.scrolled header {
    background: color-mix(in srgb, var(--bg-color) 60%, transparent);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

h1 span {
    color: var(--yellow-accent);
}
h4 {
    color: var(--text-color);
}


.logo-icon {
    font-size: 1.8rem;
    color: var(--text-color);
}

/* Search */
.search-container {
    padding: 1.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    width: 100%;
    z-index: 100;
}


.search-box input {
    width: 100%;
    padding: 1rem;
    border-radius: 30px;
    border: none;
    background: var(--input-bg);
    color: var(--input-text);
    font-size: 1rem;
    padding-right: 50px;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--icon-color);
}

.close-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--icon-color);
    cursor: pointer;
    font-size: 1.2rem;
    display: none;
}

.search-box input:not(:placeholder-shown) ~ .close-icon {
    display: block;
}


.search-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-content: center;
    margin-top: 40px;
    padding: 0 10px;
}

/* استایل برای دستگاه‌های تبلت */
@media screen and (max-width: 1024px) {
    .search-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 5%;
    }
}

/* استایل برای دستگاه‌های موبایل */
@media screen and (max-width: 768px) {
    .search-results {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 5%;
    }
}

#searchResultsInfo {
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-color);
    text-align: center;
}


/* Genres */
.back-button {
    position: fixed;
    top: 20px;
    right: 20px;
    color: var(--text-color);
    font-size: 1.5rem;
    z-index: 1001;
    background: color-mix(in srgb, var(--text-color) 10%, transparent);
    padding: 10px 15px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-button:hover {
    background: color-mix(in srgb, var(--text-color) 20%, transparent);
    transform: translateX(-5px);
}

/* فقط برای صفحه ژانر */
.janer-page .movies-section {
    display: none !important;
}

/* استایل‌های خاص صفحه ژانر */
.janer-results {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
/* استایل ژانرها */
/* استایل باکس نمایش نتایج */

/* اصلاح استایل ژانرها */
#genres-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 0 1.5rem;
    scroll-behavior: smooth;
}

.genre-card {
    min-width: 250px;
    height: 140px;
    background: var(--card-bg);
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.genre-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary-accent);
}
.genres-section {
    margin: 1rem 0;
    position: relative;
}

.horizontal-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-accent);
    padding-bottom: 8rem; /* فضای اسکرولبار */
}

.horizontal-scroll::-webkit-scrollbar {
    height: 2px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-accent);
    border-radius: 1px;
}
.genre-item {
    min-width: 140px;
    height: 75px;
    background: var(--card-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 250;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-color);
    text-align: center;
    line-height: 1.4;
}

.genre-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, var(--hover-overlay), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.genre-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary-accent) 20%, transparent);
}

.genre-item:hover::before {
    opacity: 1;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .genre-card {
        min-width: 180px;
        height: 100px;
        font-size: 0.9rem;
    }
}
/* استایل برای هدر بخش */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    margin-bottom: 1rem;
}

/* گرید نمایش فیلم‌ها */
.movies-grid {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    overflow-x: auto;
}

/* عنوان بخش */
.section-title {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

/* ساختار اصلی کارت */
.movie-card {
    width: 180px;  /* عرض دقیق مطابق عکس */
    height: 270px; /* نسبت 2:3 */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: var(--card-bg);
    box-shadow: 0 3px 6px var(--shadow-color);
    flex-shrink: 0; /* برای اسکرول افقی */
    border: 0.5px solid var(--border-color);
}


/* تصویر پستر */
.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* نوع محتوا (تغییر نام کلاس از .movie-badge به .movie-type) */
.movie-type {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    backdrop-filter: blur(8px);
    z-index: 1000; /* نمایش روی تصویر */
}

/* اطلاعات فیلم (تغییر نام کلاس از .movie-details به .movie-info) */
.movie-info {
   position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(180deg, transparent 0%, var(--overlay-bg) 50%);
    z-index: 1000; 
}

/* عنوان (اضافه کردن کلاس .movie-title به تگ h3) */
.movie-title {
    color: var(--text-color);
    margin: 15px 0 4px 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* بخش متا (تغییر نام کلاس از .movie-info-row به .meta) */
.meta {
    display: flex;
    align-items: center;
    gap: 8px;
        color: color-mix(in srgb, var(--text-color) 80%, transparent);
    font-size: 11px;
}

/* امتیاز */
.movie-rating {
        color: var(--rating-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.movie-rating i {
    font-size: 12px;
}

/* سال */
.rating-year {
    color: color-mix(in srgb, var(--text-color) 70%, transparent);
}


/* دکمه نمایش بیشتر */
.see-more {
    background: none;
        border-color: var(--primary-accent);
        color: var(--primary-accent);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    
    
}

.see-more:hover {
    background: color-mix(in srgb, var(--primary-accent) 12%, transparent);
    
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
border-top: 1px solid var(--border-color);
      backdrop-filter: blur(10px);
    background: var(--nav-bg);
    z-index: 1000;
}

.nav-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: -1;
}

.nav-item {
	    all: unset;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: color-mix(in srgb, var(--text-color) 60%, transparent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: var(--primary-accent);
}

.nav-item i {
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
    position: relative;
}

.nav-item.active i {
    transform: translateY(-5px);
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.4));
}

.nav-item i::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item.active i::after {
    opacity: 1;
}

/* انیمیشن هنگام کلیک */
@keyframes navBounce {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.nav-item:active i {
    animation: navBounce 0.3s ease;
}
.nav-item span {
    font-size: 0.85rem;
}
/* مخفی کردن تب‌های غیر فعال */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
/* Responsive */
@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    /* لودینگ سرچ */
/* استایل جدید برای لودینگ */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: 70%;
    background: color-mix(in srgb, var(--bg-color) 70%, transparent);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#loading p {
    color: rgba(0, 0, 0, 0.7);;
    font-size: 1.2rem;
    margin-top: 20px;
}

.logo-icon {
    font-size: 24px;
    margin-left: 10px;
        text-decoration: none; 
}


        .theme-icon {
    cursor: pointer; /* تغییر نشانگر به اشاره‌گر */
    user-select: none; /* جلوگیری از انتخاب شدن متن */
    text-decoration: none; /* جلوگیری از نمایش حالت لینک */
            font-size: 20px;
            color: var(--icon-color);
        }


        .about-box {
    background: var(--card-bg);
    max-width: 600px;
    margin: 2rem auto;
    backdrop-filter: blur(10px);
    background:  var(--nav-bg);
    padding: 2rem;
    border-radius: 12px;
}
.theme-toggle-inline {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.theme-option {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;

}
.theme-option.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.theme-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.about-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.about-title::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background: var(--primary-accent);
    position: absolute;
    bottom: -5px;
    left: 0;
    animation: underline-slide 1s ease-out forwards;
}

@keyframes underline-slide {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.about-text {
	    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    line-height: 1.8;
    margin-bottom: 5px;
    font-size: 16px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 1s ease-out forwards;
}

.about-text:nth-child(2) { animation-delay: 0.5s; }
.about-text:nth-child(3) { animation-delay: 1s; }
.about-text:nth-child(4) { animation-delay: 1.5s; }
.about-text:nth-child(5) { animation-delay: 2s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-link {
    margin-top: 15px;
}

.social-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.social-link a:hover {
    color: var(--yellow-accent);
}

.social-link i {
    font-size: 20px;
}

/* اضافه کردن پیشوندهای ضروری */
.example {
    -webkit-transition: all 0.3s ease; /* Safari/Chrome */
    -moz-transition: all 0.3s ease;    /* Firefox */
    -ms-transition: all 0.3s ease;     /* IE/Edge */
    transition: all 0.3s ease;         /* استاندارد */
}

/* استایل آیکون پروفایل */
.profile-icon-container {
    position: relative;
    display: inline-block;
    margin-right: 20px;
}

.profile-icon {
    font-size: 28px;
    color: #f39c12;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-icon:hover {
    color: #e67e22;
    transform: scale(1.1);
}

/* استایل منوی dropdown */
.profile-dropdown {
    display: none;
    position: absolute;
    left: 0;
    background-color: #2c3e50;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 5px;
    overflow: hidden;
}

.profile-dropdown a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.profile-dropdown a:hover {
    background-color: #34495e;
}

.dropdown-header {
    padding: 12px 16px;
    background-color: #1a1a1a;
    color: #f39c12;
    font-weight: bold;
    border-bottom: 1px solid #34495e;
}

.profile-dropdown i {
    margin-left: 8px;
}

/* نمایش منو هنگام کلیک */
.profile-dropdown.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}