@import url("https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700;800&family=Inter:ital,opsz,wght@0,14..32,300..800;1,14..32,300..800&display=swap");

/* -------------------------------------------------------------
   CinePhrase Theme & Modern 3D Design System Tokens
   Exclusively using Root Variables for Light & Dark Modes
------------------------------------------------------------- */
:root {
    /* Base Colors */
    --text-color: #1a1625;
    --text-muted-custom: #5b6370;
    --text-secondary: #7d8a99;
    --text-hint: #8899aa;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-light: rgba(226, 232, 240, 0.8);

    /* Brand & Accent Colors */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --primary-glow: rgba(79, 70, 229, 0.2);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --card-gradient: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.8) 100%
    );
    --accent-glow: rgba(99, 102, 241, 0.15);

    /* 3D Shadows & Glassmorphic Depth */
    --shadow-3d-sm:
        0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-3d-md:
        0 10px 25px -5px rgba(0, 0, 0, 0.08),
        0 8px 10px -6px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --shadow-3d-lg:
        0 20px 35px -8px rgba(0, 0, 0, 0.12),
        0 12px 18px -6px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    --shadow-3d-hover:
        0 25px 40px -10px rgba(0, 0, 0, 0.16),
        0 16px 22px -8px rgba(0, 0, 0, 0.08), 0 0 20px rgba(79, 70, 229, 0.15);
    --footer-shadow: 0 -4px 15px rgba(0, 0, 0, 0.03);

    /* Video Player Specific Tokens */
    --vp-container-bg: #0b0c14;
    --vp-player-bg: #12131f;
    --vp-video-bg: #050508;
    --vp-glass-bg: rgba(255, 255, 255, 0.12);
    --vp-glass-bg-hover: rgba(255, 255, 255, 0.28);
    --vp-glass-border: rgba(255, 255, 255, 0.2);
    --vp-glass-text: #ffffff;
    --vp-pill-bg: rgba(0, 0, 0, 0.5);
    --vp-overlay-gradient: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.4) 60%,
        transparent 100%
    );
    --vp-controls-gradient: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95),
        rgba(0, 0, 0, 0.6) 70%,
        transparent 100%
    );
    --vp-progress-track: rgba(255, 255, 255, 0.22);
    --vp-progress-fill: linear-gradient(90deg, #ec4899, #f43f5e, #fb7185);
    --vp-progress-glow: rgba(244, 63, 94, 0.8);
    --vp-btn-hover-bg: #ffffff;
    --vp-btn-hover-text: #12111f;
    --vp-badge-accent: #60a5fa;
    --vp-shadow-player:
        0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --vp-shadow-btn: 0 8px 18px rgba(0, 0, 0, 0.35);

    /* Video Card Specific Tokens */
    --card-thumb-bg: #0f111a;
    --card-thumb-icon: #ffffff;
    --card-thumb-icon-hover: #818cf8;
    --card-thumb-radial: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.25) 0%,
        transparent 75%
    );
    --btn-primary-text: #ffffff;
}

body[data-theme="dark"] {
    /* Base Colors */
    --text-color: #f0f4f8;
    --text-muted-custom: #b4bcc7;
    --text-secondary: #8b98a8;
    --text-hint: #7a8899;
    --bg-color: #0d0e15;
    --card-bg: #161824;
    --border-color: #272a3d;
    --border-light: rgba(255, 255, 255, 0.08);

    /* Brand & Accent Colors */
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --primary-light: #1e1b4b;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --card-gradient: linear-gradient(
        180deg,
        rgba(26, 28, 43, 0.9) 0%,
        rgba(20, 22, 34, 0.9) 100%
    );
    --accent-glow: rgba(139, 92, 246, 0.25);

    /* 3D Shadows for Dark Theme */
    --shadow-3d-sm:
        0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-3d-md:
        0 12px 28px -4px rgba(0, 0, 0, 0.6), 0 8px 12px -6px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.07);
    --shadow-3d-lg:
        0 22px 40px -8px rgba(0, 0, 0, 0.7),
        0 14px 20px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --shadow-3d-hover:
        0 30px 50px -10px rgba(0, 0, 0, 0.8),
        0 18px 26px -8px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.35);
    --footer-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);

    /* Video Player Specific Tokens */
    --vp-container-bg: #000000;
    --vp-player-bg: #0a0b12;
    --vp-video-bg: #000000;
    --vp-glass-bg: rgba(255, 255, 255, 0.1);
    --vp-glass-bg-hover: rgba(255, 255, 255, 0.25);
    --vp-glass-border: rgba(255, 255, 255, 0.15);
    --vp-glass-text: #ffffff;
    --vp-pill-bg: rgba(0, 0, 0, 0.6);
    --vp-overlay-gradient: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.45) 60%,
        transparent 100%
    );
    --vp-controls-gradient: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.98),
        rgba(0, 0, 0, 0.7) 70%,
        transparent 100%
    );
    --vp-progress-track: rgba(255, 255, 255, 0.2);
    --vp-progress-fill: linear-gradient(90deg, #f43f5e, #fb7185, #f472b6);
    --vp-progress-glow: rgba(244, 63, 94, 0.9);
    --vp-btn-hover-bg: #ffffff;
    --vp-btn-hover-text: #0d0e15;
    --vp-badge-accent: #93c5fd;
    --vp-shadow-player:
        0 25px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12);
    --vp-shadow-btn: 0 8px 20px rgba(0, 0, 0, 0.5);

    /* Video Card Specific Tokens */
    --card-thumb-bg: #08090f;
    --card-thumb-icon: #f1f5f9;
    --card-thumb-icon-hover: #a5b4fc;
    --card-thumb-radial: radial-gradient(
        circle,
        rgba(139, 92, 246, 0.3) 0%,
        transparent 75%
    );
    --btn-primary-text: #ffffff;
}

*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    outline: 0;
    box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted-custom);
}

/* Base Body Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.6;
    transition:
        background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

body[dir="rtl"] {
    font-family: "Alexandria", sans-serif;
}

body[dir="ltr"] {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}

.main {
    flex: 1 0 auto;
}

.section_main {
    min-height: 70vh;
}

img,
video {
    max-width: 100%;
    height: auto;
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

/* -------------------------------------------------------------
   Header / Navbar 3D Glassmorphism
------------------------------------------------------------- */
.navbar {
    background-color: var(--card-bg) !important;
    background: var(--card-gradient) !important;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-3d-sm);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.logo {
    max-height: 38px;
    width: auto;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover {
    transform: scale(1.05);
}

.navbar_all_button .btn {
    border-radius: 12px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.88rem;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-3d-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar_all_button .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3d-md);
    border-color: var(--text-color);
}

.navbar_all_button .btn:active {
    transform: translateY(1px);
}

#theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
}

#theme-toggle:hover {
    transform: rotate(25deg) scale(1.08);
}

body[data-theme="dark"] #theme-toggle .bi-moon {
    display: none;
}

body[data-theme="dark"] #theme-toggle .bi-sun-fill {
    display: inline-block;
}

body[data-theme="light"] #theme-toggle .bi-sun-fill {
    display: none;
}

body[data-theme="light"] #theme-toggle .bi-moon {
    display: inline-block;
}

/* -------------------------------------------------------------
   Footer 3D & Clean Styling
------------------------------------------------------------- */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--footer-shadow);
    margin-top: auto;
}

footer a {
    color: var(--text-muted-custom);
    transition: all 0.25s ease;
    text-decoration: none;
}

footer a:hover {
    color: var(--text-color);
    transform: translateY(-2px);
}

footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-3d-sm);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

footer .social-icons a:hover {
    background: var(--text-color);
    color: var(--bg-color) !important;
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-3d-md);
}

/* -------------------------------------------------------------
   Page Content Typography (Privacy, Terms, etc.)
------------------------------------------------------------- */
.page-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-3d-md);
    margin: 2rem auto;
    max-width: 900px;
}

.page-content h2 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.page-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.page-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* -------------------------------------------------------------
   Bootstrap Overrides & 3D Form Elements
------------------------------------------------------------- */
.form-control,
.form-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-3d-sm);
    border-radius: 12px;
    padding: 0.65rem 1rem;
    transition: all 0.25s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow:
        0 0 0 3px var(--primary-glow),
        var(--shadow-3d-sm);
}

.btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: var(--btn-primary-text) !important;
    box-shadow: var(--shadow-3d-md);
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3d-hover);
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* RTL Helpers */
body[dir="rtl"] .offcanvas-header .btn-close,
body[dir="rtl"] .modal-header .btn-close {
    margin-left: 0;
    margin-right: auto;
}

body[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}

body[dir="rtl"] .form-check .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -1.5em;
}

/* Responsive Rules */
@media (max-width: 768px) {
    .page-content {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .page-content h2 {
        font-size: 1.45rem;
    }

    .page-content h3 {
        font-size: 1.15rem;
    }
}

