:root {
            --primary-color: #2ec4b6;
            --primary-hover: #20a396;
            --bg-dark: #0f172a;
            --card-bg: #1e293b;
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --border-color: rgba(255, 255, 255, 0.08);
            --imdb-color: #f59e0b;
            --toolbar-bg: rgba(15, 23, 42, 0.9);
            --sidebar-bg: #111827;
        }

        /* متغیرهای رنگی برای تم روشن */
        [data-theme="light"] {
            --bg-dark: #f1f5f9;
            --card-bg: #ffffff;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --border-color: rgba(0, 0, 0, 0.08);
            --toolbar-bg: rgba(255, 255, 255, 0.9);
            --sidebar-bg: #ffffff;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            -webkit-tap-highlight-color: transparent;
            transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        }

        body {
            background-color: var(--bg-dark);
            color: var(--text-main);
            direction: rtl;
            padding-top: 75px;
            padding-bottom: 85px;
            min-height: 100vh;
        }

        /* --- Toolbar --- */
        .toolbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 65px;
            background-color: var(--toolbar-bg);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-color);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        }

        .toolbar-btn {
            background: none;
            border: none;
            color: var(--text-main);
            font-size: 1.3rem;
            cursor: pointer;
            width: 40px;
            height: 40px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 50%;
        }

        .toolbar-btn:hover {
            background-color: rgba(46, 196, 182, 0.1);
            color: var(--primary-color);
        }

        .logo {
            font-weight: 800;
            font-size: 1.3rem;
            color: var(--primary-color);
            letter-spacing: 1px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* --- Sidebar Navigation --- */
        .sidebar {
            position: fixed;
            top: 0;
            right: -280px;
            width: 280px;
            height: 100%;
            background-color: var(--sidebar-bg);
            z-index: 2000;
            transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            padding: 20px;
            box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
            display: flex;
            flex-direction: column;
        }

        .sidebar.active {
            right: 0;
        }

        .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 15px;
        }

        .sidebar-header h3 {
            font-size: 1.1rem;
            color: var(--text-main);
            font-weight: 700;
        }

        /* کلید تغییر حالت تم */
        .theme-switch-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 15px;
            background-color: rgba(46, 196, 182, 0.08);
            border-radius: 10px;
            margin-bottom: 20px;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .theme-btn {
            background: var(--primary-color);
            border: none;
            color: white;
            padding: 6px 12px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: bold;
            transition: background-color 0.2s;
        }

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

        .sidebar-menu {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 15px;
            color: var(--text-muted);
            text-decoration: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 500;
        }

        .sidebar-item:hover {
            background-color: rgba(46, 196, 182, 0.1);
            color: var(--primary-color);
        }

        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1500;
            display: none;
            backdrop-filter: blur(4px);
        }

        /* --- Container --- */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            width: 100%;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 700;
            margin: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-right: 4px solid var(--primary-color);
            padding-right: 10px;
        }

        .section-title span {
            font-size: 0.8rem;
            color: var(--primary-color);
            cursor: pointer;
        }

        /* --- Actors Section --- */
        .actors-scroll {
            display: flex;
            overflow-x: auto;
            gap: 15px;
            padding: 5px 20px 15px 20px;
            scrollbar-width: none;
        }

        .actors-scroll::-webkit-scrollbar {
            display: none;
        }

        .actor-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 80px;
            text-align: center;
            cursor: pointer;
        }

        .actor-image-container {
            position: relative;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            padding: 3px;
            background: linear-gradient(135deg, var(--primary-color), #06b6d4);
            margin-bottom: 8px;
        }

        .actor-image-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
            border: 2px solid var(--bg-dark);
        }

        .actor-name {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }

        /* --- Horizontal Movie List --- */
        .movies-scroll {
            display: flex;
            overflow-x: auto;
            gap: 12px;
            padding: 5px 20px 20px 20px;
            scrollbar-width: none;
        }

        .movies-scroll::-webkit-scrollbar {
            display: none;
        }

        /* کارت فیلم در موبایل (کوچک‌تر و فشرده‌تر شده) */
        .movie-card {
            min-width: 125px;
            max-width: 125px;
            background-color: var(--card-bg);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            position: relative;
            border: 1px solid var(--border-color);  
            text-decoration: none;
        }

        /* سایز مناسب پوستر برای کارت‌های کوچک‌تر موبایل */
        .poster-container {
            position: relative;
            width: 100%;
            height: 175px;
            background-color: #334155;
        }

        .poster-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .movie-year {
            position: absolute;
            top: 6px;
            right: 6px;
            background-color: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(2px);
            color: #fff;
            padding: 2px 6px;
            font-size: 0.65rem;
            font-weight: bold;
            border-radius: 4px;
            z-index: 10;
        }

        .movie-imdb {
            position: absolute;
            top: 6px;
            left: 6px;
            background-color: rgba(245, 158, 11, 0.95);
            color: #000;
            padding: 2px 6px;
            font-size: 0.65rem;
            font-weight: 800;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 2px;
            z-index: 10;
        }

        .movie-title {
            padding: 8px 6px;
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-main);
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* --- Bottom Navigation --- */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 70px;
            background-color: var(--toolbar-bg);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-around;
            align-items: center;
            z-index: 1000;
            padding: 0 10px;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.75rem;
            font-weight: 600;
            gap: 4px;
            flex: 1;
        }

        .nav-item i {
            font-size: 1.25rem;
        }

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

        .nav-item.active i {
            color: var(--primary-color);
            transform: scale(1.1);
        }

        /* --- سیستم واکنش‌گرا برای تبلت و دسکتاپ --- */
        @media (min-width: 768px) {
    .movies-scroll {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 20px;
    }

    .movie-card {
        min-width: 160px;
        max-width: 160px;
        flex-shrink: 0;
    }

    .poster-container {
        height: 230px;
    }

    .actors-scroll {
        justify-content: center;
    }
}
