@font-face {
    font-family: 'FF Shamel Sans One';
    src: url('../fonts/FFShamelFamily-SansOneBold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    /* --- Light Mode Colors (Updated to Deep Purple & Pink Palette) --- */
    --bg-primary: #FFFEFC;
    /* الخلفية الأساسية (أبيض كريمي ناعم) */
    --text-primary: #251127;
    /* عناوين / نصوص أساسية (أرجواني عميق) */
    --text-secondary: #080C14;
    /* نصوص ثانوية (أسود كربوني) */
    --card-bg: #FFFFFF;
    /* خلفية البطاقات (أبيض ناصع) */
    --btn-primary-bg: #FF3D5E;
    /* اللون المميز للأزرار (وردي مشرق) */
    --btn-primary-hover: #FF5C78;
    /* وردي أفتح للتحويم */
    --primary-yellow: #FFD429;
    /* الأصفر الذهبي للتمييز والـ Glow */
    --primary-green: #2ecc71;
    --primary-light-blue: #FF3D5E; 
    --headline-red: #FF3D5E; 
    
    --header-bg: rgba(37, 17, 39, 0.92);
    /* Navbar Background (أرجواني عميق شفاف) */
    --nav-link: #FFFEFC;
    --nav-link-hover: #FFD429;
    --border-color: rgba(37, 17, 39, 0.1);
    --glow-color: #FFD429;
    --select-btn-bg: #251127;
    --dark-text: #FFFEFC;
    /* نص فاتح للأزرار الداكنة */

    /* --- Shared Metrics --- */
    --card-pad: 28px;
    --hero-text: #251127;
    --logout-btn: #d9534f;
    --logout-hover: #c9302c;
    --input-bg: #FFFFFF;
    --input-text: #251127;
    --input-border: rgba(37, 17, 39, 0.2);
    --success-bg: #D4EDDA;
    --success-border: #c3e6cb;
    --success-text: #155724;
    --error-bg: #F8D7DA;
    --error-border: #f5c6cb;
    --error-text: #721C24;
}

/* --- Dark Mode Colors (Deep Carbon & Night Blue) --- */
body.dark-mode {
    --bg-primary: #080C14;
    /* الخلفية الأساسية (أسود كربوني) */
    --text-primary: #F7F4FA;
    /* نصوص فاتحة (أبيض ناعم) */
    --header-bg: rgba(17, 24, 39, 0.7);
    /* أزرق ليلي شفاف */
    --nav-link: #F7F4FA;
    --nav-link-hover: #FF3D5E;
    --btn-primary-bg: #FF3D5E;
    --btn-primary-hover: #FF5C78;
    --border-color: rgba(247, 244, 250, 0.1);
    --glow-color: #FFD429;
    --select-btn-bg: #111827;

    --primary-yellow: #FFD429;
    --primary-green: #2ecc71;
    --primary-sky-blue: #FF3D5E;
    --primary-aqua-blue: #FF3D5E;

    --bg-secondary: #111827;
    /* Surface */
    --card-bg: #111827;
    /* خلفية الكروت (أزرق ليلي داكن) */
    --text-secondary: #FFD429;
    /* نصوص ثانوية ذهبية للتباين */
    --dark-text: #080C14;
    --hero-text: #F7F4FA;
    --video-bg: #04060A;
    --lecture-list-bg: #0D131F;
    --lecture-item-bg: #111827;
    --lecture-item-hover: #1A2333;
    --logout-btn: #FFD429;
    --logout-hover: #E5C040;
    --input-bg: #0D131F;
    --input-text: #F7F4FA;
    --input-border: #1F2937;
    --headline-red: #FFD429;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'FF Shamel Sans One', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


body {
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7; /* Increased for better bold text readability */
    font-size: 15px;  /* Slightly adjusted base size */
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit
}

.glow {
    animation: glow-effect 1.5s infinite alternate
}

@keyframes glow-effect {
    0% {
        box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color), 0 0 15px var(--glow-color)
    }

    100% {
        box-shadow: 0 0 15px var(--glow-color), 0 0 20px var(--glow-color), 0 0 25px var(--glow-color)
    }
}

.main-header {
    position: relative;
    top: 15px;
    width: 95%;
    max-width: 1200px;
    margin: 15px auto;
    border-radius: 50px;
    z-index: 999;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 0;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.1), 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    pointer-events: auto;
}

.main-header-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2000;
    pointer-events: none;
}

.has-fixed-mobile-header {
    padding-top: 210px;
}

.main-header.scrolled {
    background: var(--header-bg);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.1), 0 4px 30px rgba(0, 0, 0, 0.2);
}


.main-header .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse
}

.main-header .logo img {
    height: 75px;
    width: auto;
    display: block
}

.main-header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px
}

.main-header nav ul li a {
    color: var(--nav-link);
    font-size: 1.05rem;
    transition: color 0.3s
}

.main-header nav ul li a:hover {
    color: var(--nav-link-hover);
}

.main-header nav ul li a.nav-auth-link {
    color: var(--primary-yellow);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.main-header nav ul li a.nav-auth-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-user-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-user-name:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width:768px) {
    .has-fixed-mobile-header {
        padding-top: 180px;
    }

    .main-header-wrapper {
        position: fixed;
    }

    .main-header nav {
        padding: 7px 8px
    }

    .main-header .logo img {
        height: 50px;
        /* تصغير اللوجو في الموبايل */
    }

    .main-header {
        position: relative;
        top: 10px;
        left: auto;
        transform: none;
        width: 95%;
        margin: 0 auto;
        border-radius: 50px;
        z-index: 1;
    }

    /* Keep the decorative lights visible under the fixed mobile header */
    .has-fixed-mobile-header .stage {
        margin-top: 6px !important;
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 480px) {
    .main-header .container {
        padding: 0 10px;
    }
    .main-header nav ul {
        gap: 4px;
    }
    .theme-switch {
        --toggle-size: 9px !important;
        margin-left: 5px !important;
    }
    .main-header .logo img {
        height: 40px;
    }
    .main-header nav ul li a.nav-auth-link {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    .nav-user-name {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

.hero {
    display: flex;
    flex-direction: row;
    /* الصورة شمال والكلام يمين */
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px;
    background-color: var(--bg-primary);
    margin-top: -80px;
    /* سحب القسم للأعلى لتقليل الفراغ */
    z-index: 1;
    /* للتأكد من أن المحتوى يظل تحت الهيدر اللاصق */
    position: relative;
    overflow: hidden;
    text-align: right;
    /* يخلي الكلام لليمين */
}

/* Keep the light branch visible between header and hero */
.has-fixed-mobile-header .stage {
    position: relative;
    z-index: 5;
}

.has-fixed-mobile-header .hero {
    margin-top: 0;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--bg-primary);
    opacity: 0.08;
    z-index: 1
}

.hero .text {
    flex: 1 1 50%;
    padding: 10px 20px;
    position: relative;
    /* <<< ضروري عشان z-index يشتغل */
    z-index: 2;
    /* <<< يرفع الكلام والزر فوق .hero::before */
}

.hero .text h1 {
    font-size: 2.2rem; /* Reduced from 2.8rem */
    margin-bottom: 20px;
    color: var(--hero-text);
    line-height: 1.6; /* Increased from 1.25 for better spacing */
}

.hero .text p {
    font-size: 1.1rem; /* Reduced from 1.25rem */
    margin-bottom: 25px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.hero .text a.btn {
    display: inline-block;
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    padding: 14px 30px;
    border-radius: 30px;
    transition: background 0.3s;
    position: relative;
    z-index: 5;
    letter-spacing: 0.5px;
}

.hero .text a.btn:hover {
    background: var(--btn-primary-hover);
}

.hero .text a.btn.brown-btn {
    background: var(--btn-primary-bg);
    color: #fff;
}

.hero .text a.btn.brown-btn:hover {
    background: var(--btn-primary-hover);
}

.hero .image {
    flex: 1 1 50%;
    text-align: left;
}

.hero .image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

@media (max-width:768px) {
    .hero {
        flex-direction: column-reverse
    }
}

.full-bg-section {
    width: 100%;
    background-color: var(--bg-primary);
    padding: 30px 10px;
    overflow: hidden
}

.wide-image-section {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

.full-bg-section .image-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px
}

.animated-img {
    width: 320px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-in-out
}

.animated-img.show {
    opacity: 1;
    transform: translateY(0)
}

@media (max-width:768px) {
    .animated-img {
        width: 280px
    }
}

.animated-img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 15px var(--btn-primary-bg)) drop-shadow(0 0 35px rgba(27, 235, 203, 0.6));
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 2
}

.study-years-slider {
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px
}

.study-year-card {
    flex: 1 1 30%;
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s
}

.study-year-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6)
}

.study-year-card h3 {
    font-size: 1.65rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-green);
    display: inline-block;
    padding-bottom: 8px;
    line-height: 1.3;
}

.study-year-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

section {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.courses-list {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px
}

.course-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5)
}

.course-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.course-card .content {
    padding: 15px 20px
}

.course-card .content h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.2rem
}

.course-card .content p {
    color: var(--text-secondary);
    font-size: 1rem
}

.custom-footer {
    position: relative;
    background-image: url('/assets/img/شريط-.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 500px 20px 80px;
    overflow: hidden
}

.footer-logo {
    position: relative;
    top: -80px;
    /* رفع اللوجو لفوق */
    margin-bottom: 10px;
}

.footer-overlay {
    width: 300px;
    height: auto;
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10
}

.footer-content {
    position: relative;
    z-index: 3
}

.footer-logo-second {
    max-width: 400px;
    height: auto;
    margin: -200px auto 55px;
    display: block;
    position: relative;
    z-index: 5;
    transform: scale(1) translateY(50px);
    transform-origin: center
}

.social-icons {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    justify-content: center;
    position: relative;
    z-index: 25;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #fff;
    text-decoration: none;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-link.youtube {
    background: #FF0000;
}

.social-link.facebook {
    background: #1877F2;
}

.social-link.tiktok {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link i {
    font-size: 24px;
    transition: all 0.4s ease;
}

/* Hover Effects */
.social-link:hover {
    transform: translateY(-8px) scale(1.1);
    color: #fff;
}

.social-link.youtube:hover {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
}

.social-link.facebook:hover {
    box-shadow: 0 0 30px rgba(24, 119, 242, 0.8);
}

.social-link.tiktok:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.social-link:hover i {
    transform: scale(1.15);
}

.footer-rights-box {
    background: rgba(37, 17, 39, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    position: relative;
    z-index: 20;
}

.footer-menu {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.footer-copyright {
    color: var(--primary-yellow);
    font-weight: 600;
    margin-top: 10px;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-menu a {
    color: #2ecc71;
    text-decoration: none;
    margin: 0 5px;
    font-weight: 800;
    transition: 0.3s ease;
}

.footer-menu a:hover {
    color: #ffe066;
    text-shadow: 0 0 10px rgba(255, 255, 120, 0.8);
}



@media (max-width:768px) {
    .footer-overlay {
        width: 200px;
        top: -60px
    }
}

@media (max-width:768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 20px 10px
    }

    .hero .text h1 {
        font-size: 1.6rem
    }

    .hero .text p {
        font-size: 1rem
    }

    .hero .text a.btn {
        width: 90%;
        margin: 10px auto;
        display: block
    }

    .hero .image img {
        max-width: 90%;
        margin: 0 auto
    }
}

.full-bg-section.no-padding {
    padding: 0
}

.full-square-image {
    width: 100%;
    height: auto;
    display: block
}

@media (max-width:768px) {
    .study-years-slider {
        flex-direction: column;
        align-items: center
    }

    .study-year-card {
        width: 90%;
        flex: none
    }
}

@media (max-width:768px) {
    .courses-list {
        grid-template-columns: 1fr
    }

    .course-card img {
        height: auto
    }
}

@media (max-width:768px) {
    .custom-footer {
        padding: 250px 10px 30px;
        background-position: center top;
        text-align: center;
    }

    .custom-footer .social-icons {
        position: static;
        /* يشيل الوضع الثابت */
        flex-direction: row;
        /* يخليهم صف جنب بعض */
        justify-content: center;
        margin-top: 15px;
        /* مسافة تحت اللوجو */
    }
}

@media (max-width:768px) {

    img[alt="السنوات الدراسية"],
    img[alt="الكورسات المقترحة"] {
        max-width: 80% !important
    }
}

.footer-overlay-inside {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    object-fit: contain
}

.register-page {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    padding: 60px 20px
}

.register-form {
    flex: 1 1 420px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6)
}

.register-form h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center
}

.register-form label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600
}

.register-form input,
.register-form select {
    width: 100%;
    background: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    transition: border 0.3s
}

.register-form input:focus,
.register-form select:focus {
    border-color: var(--primary-green);
    outline: none
}

.register-form button {
    width: 100%;
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    border: none;
    border-radius: 30px;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 14px
}

.register-form button:hover {
    background: var(--btn-primary-hover);
}

.register-image {
    flex: 1 1 500px;
    display: flex;
    justify-content: center;
    align-items: center
}

.register-image img {
    aspect-ratio: 3 / 4;
    height: 900px;
    border-radius: 10px;
    object-fit: cover
}

@media (max-width:768px) {
    .register-page {
        padding: 40px 15px
    }

    .register-form {
        padding: 30px 20px
    }

    .register-image img {
        height: 400px
    }
}

.video-section {
    background: var(--video-bg);
    color: var(--text-primary);
    padding: 40px 20px;
    border-radius: 15px;
    max-width: 1100px;
    margin: 40px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .6)
}

.video-section video {
    width: 100%;
    max-width: 900px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: block;
    margin: 20px auto;
    background: #000
}

.lecture-title {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.6rem
}

.lecture-list-container {
    max-width: 900px;
    margin: 0 auto
}

.lecture-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px
}

.lecture-list li {
    background: var(--lecture-item-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background .3s
}

.lecture-list li:hover {
    background: var(--lecture-item-hover);
}

.lecture-list li.active {
    background: var(--primary-green);
    color: var(--dark-text);
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: var(--primary-green);
    font-weight: 700
}

.toggle-arrow {
    transition: transform .3s
}

.toggle-arrow.open {
    transform: rotate(90deg)
}

.instructor-section {
    text-align: center;
    margin: 40px 0
}

.instructor-section img {
    max-width: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .6)
}

.recommended-courses {
    background: var(--bg-primary);
    padding: 40px 20px
}

.recommended-courses h3 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem
}

.recommended-courses .courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto
}

.recommended-courses .courses-list a {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    padding: 15px 10px;
    transition: transform .3s;
    font-weight: 600
}

.recommended-courses .courses-list a:hover {
    transform: translateY(-6px)
}

.recommended-courses .courses-list img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px
}

@media (max-width: 768px) {
    .recommended-courses img {
        margin-bottom: 30px;
        /* المسافة اللي تعجبك */
    }
}

footer {
    background: #000;
    color: var(--primary-green);
    text-align: center;
    padding: 25px 10px;
    margin-top: 40px;
    font-size: .95rem
}

.login-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    padding: 60px 20px;
    max-width: 1100px;
    margin: 50px auto
}

.login-form {
    flex: 1 1 420px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6)
}

.login-form h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center
}

.login-form label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600
}

.login-form input {
    width: 100%;
    background: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    transition: border 0.3s
}

.login-form input:focus {
    border-color: var(--primary-green);
    outline: none
}

.login-form button {
    width: 100%;
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    border: none;
    border-radius: 30px;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 14px
}

.login-form button:hover {
    background: var(--btn-primary-hover);
}

.login-image {
    flex: 1 1 360px;
    display: flex;
    justify-content: center;
    align-items: center
}

.login-image img {
    max-width: 100%;
    border-radius: 10px
}

@media (max-width:768px) {
    .login-container {
        padding: 40px 15px;
        flex-direction: column-reverse
    }

    .login-form {
        padding: 30px 20px
    }
}

.scrollable-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center
}

.course-card {
    flex: 1 1 calc(33.333% - 40px);
    box-sizing: border-box;
    max-width: calc(33.333% - 40px)
}

@media (max-width:992px) {
    .course-card {
        flex: 1 1 calc(50% - 40px);
        max-width: calc(50% - 40px)
    }
}

@media (max-width:576px) {
    .course-card {
        flex: 1 1 100%;
        max-width: 100%
    }
}

.scrollable-courses::-webkit-scrollbar {
    height: 8px
}

.scrollable-courses::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px
}

.course-card {
    min-width: 300px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s
}

.course-card:hover {
    transform: translateY(-6px)
}

.course-card img {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover
}

.course-card .content {
    padding: 15px
}

.course-card .content h3 {
    color: var(--primary-yellow);
    font-size: 1.2rem;
    margin-bottom: 10px
}

.course-card .content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 12px
}

.course-button {
    background: var(--primary-yellow);
    color: var(--dark-text);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s
}

.course-button:hover {
    background: var(--btn-primary-hover);
}

.arrow {
    cursor: pointer;
    transition: transform .3s ease;
    margin-right: 6px
}

.open>.arrow {
    transform: rotate(90deg)
}

.sub-lectures {
    display: none;
    margin-right: 20px
}

.sub-lectures li {
    margin: 4px 0
}

h1,
h2 {
    text-align: center;
    color: #333
}

.stats {
    display: flex;
    justify-content: space-between;
    margin: 30px 0
}

.stat-box {
    flex: 1;
    background-color: var(--primary-green);
    margin: 0 10px;
    padding: 20px;
    border-radius: 10px;
    text-align: center
}

.stat-box h3 {
    font-size: 28px;
    color: var(--dark-text);
    margin: 0
}

.stat-box p {
    margin-top: 10px;
    font-size: 16px;
    color: #555
}

form {
    display: flex;
    flex-direction: column
}

form label {
    margin-top: 15px;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold
}

form input[type="text"],
form select,
form textarea,
form input[type="file"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box
}

form textarea {
    resize: vertical;
    min-height: 100px
}

form button[type="submit"],
button[type="button"] {
    margin-top: 25px;
    padding: 12px;
    background-color: var(--btn-primary-bg);
    color: var(--dark-text);
    border: none;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease
}

form button[type="submit"]:hover,
button[type="button"]:hover {
    background-color: var(--btn-primary-hover);
}

.alert-success {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center
}

.alert-error {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 600
}

.alert-error ul {
    list-style: none;
    margin: 0;
    padding: 0
}

.courses-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    justify-content: center;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 15px
}

.courses-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    justify-content: center;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 15px
}

.course-item {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    background: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease
}

.course-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px)
}

.course-item img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: transform 0.3s ease
}

.course-item:hover img {
    transform: scale(1.05)
}

.course-button {
    display: inline-block;
    margin-top: 10px
}

.students-table-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
    padding: 2rem 1.5rem;
    color: var(--text-primary);
}

.students-table-wrapper h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1.5rem
}

.students-table {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.students-table thead {
    background: var(--border-color);
    color: var(--text-primary);
}

.students-table tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.students-table tbody tr:nth-child(odd) {
    background: var(--bg-primary);
}

.students-table tbody tr:hover {
    background: var(--bg-secondary);
    color: var(--primary-green);
}

.students-table .badge {
    background: var(--primary-green);
    color: var(--dark-text);
    padding: .45rem 1.1rem;
    font-size: .9rem;
    border-radius: 50px
}

.logout-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    z-index: 1000
}

.logout-menu .logout-button {
    background: none;
    border: none;
    color: var(--logout-btn);
    cursor: pointer;
    font-weight: bold;
    padding: 5px 10px
}

.logout-menu .logout-button:hover {
    color: var(--logout-hover);
}

.user-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: 10px
}

@media (max-width:768px) {
    .main-header nav {
        padding: 8px 10px
    }
}

.branch-image {
    transition: transform 0.3s ease-in-out
}

.branch-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2)
}

.main-btn {
    background-color: var(--btn-primary-bg);
    color: var(--dark-text);
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease
}

.main-btn:hover {
    background-color: var(--btn-primary-hover);
    color: var(--dark-text);
}

.whatsapp-icon {
    width: 40px;
    height: auto;
    margin-top: -5px;
    /* ارفع الصورة لفوق */
}

.admin-login-container {
    min-height: 100vh;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-login-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 380px;
}

.admin-login-card h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.admin-login-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.admin-login-card input:focus {
    border-color: var(--btn-primary-bg);
    outline: none;
    box-shadow: 0 0 5px rgba(255, 61, 94, 0.4);
}

.admin-login-card button {
    width: 100%;
    padding: 12px;
    background: var(--btn-primary-bg);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-login-card button:hover {
    background: var(--btn-primary-hover);
}

.error {
    background: #f8d7da;
    color: #842029;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.admin-login-card input[name="phone"]:focus,
.admin-login-card input[name="password"]:focus {
    color: #110902;
    /* لون أغمق شوية عند الكتابة */
}

select:invalid {
    color: #999;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 24px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
    pointer-events: none;
    /* عشان ما يمنعش التحكم في الفيديو */
    white-space: nowrap;
}

/* Courses Page Styles */
.courses-page {
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 40px 0;
    font-family: 'FF Shamel Sans One', sans-serif;
}

.page-title {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 40px;
    font-size: 2.5rem;
    text-shadow: 0 2px 10px rgba(250, 204, 21, 0.2);
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.month-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.month-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 61, 94, 0.35);
    border-color: var(--primary-green);
}

.month-image {
    height: 180px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 3rem;
}

.month-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.month-content {
    padding: 20px;
    text-align: center;
}

.month-title {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.action-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    font-family: 'FF Shamel Sans One', sans-serif;
    font-size: 1rem;
}

.btn-enter {
    background: linear-gradient(135deg, #2ed573 0%, #26af61 100%);
    color: white;
}

.btn-enter:hover {
    box-shadow: 0 0 15px rgba(46, 213, 115, 0.4);
}

.btn-subscribe {
    background: var(--btn-primary-bg);
    color: var(--dark-text);
}

.btn-subscribe:hover {
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
    background: var(--btn-primary-hover);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--primary-green);
    position: relative;
    animation: slideDown 0.3s ease-out;
    text-align: center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.code-input {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-align: center;
    font-family: monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    outline: none;
}

.code-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.2);
}

/* Month Page Styles */
.month-page {
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 20px 0;
    font-family: 'FF Shamel Sans One', sans-serif;
}

.month-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.month-header {
    text-align: center;
    margin-bottom: 30px;
}

.month-header h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(250, 204, 21, 0.2);
}

/* Video Player Area */
.video-box {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.video-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.no-video-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-green);
    font-size: 1.2rem;
    text-align: center;
    width: 100%;
}

/* Accordion List */
.lectures-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lecture-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lecture-item.active {
    border-color: var(--primary-green);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.1);
}

.lecture-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.lecture-header:hover {
    background: var(--bg-secondary);
    color: var(--primary-green);
}

.lecture-item.active .lecture-header {
    background: var(--primary-green);
    color: var(--dark-text);
}

.lecture-content {
    padding: 25px;
    background: var(--lecture-list-bg);
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
    display: none;
}

.lecture-item.active .lecture-content {
    display: block;
}

.content-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: 'FF Shamel Sans One', sans-serif;
    font-size: 1rem;
    min-height: 44px;
}

.action-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    transform: translateY(-2px);
    background: var(--bg-secondary);
}

.action-btn.primary {
    background: var(--btn-primary-bg);
    color: var(--dark-text);
    border: none;
}

.action-btn.primary:hover {
    box-shadow: 0 5px 15px rgba(250, 204, 21, 0.3);
    background: var(--btn-primary-hover);
    color: var(--dark-text);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--border-color);
    color: var(--text-secondary);
    border-color: var(--border-color);
    box-shadow: none;
    transform: none;
}

.lecture-header i {
    transition: transform 0.3s;
}

.lecture-item.active .lecture-header i {
    transform: rotate(180deg);
}

.group-item {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.group-label {
    display: block;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1rem;
}

.group-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.group-buttons-row .action-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

@media (max-width: 768px) {
    .month-header h1 {
        font-size: 1.8rem;
    }

    .lecture-header {
        font-size: 1rem;
        padding: 15px;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .group-buttons-row {
        flex-direction: column;
    }

    .group-buttons-row .action-btn {
        width: 100%;
    }
}

/* تعديلات إضافية للتوافق مع الثيمات */
.lecture-header:hover {
    color: var(--primary-green);
}

.lecture-item.active .lecture-header {
    color: var(--dark-text);
    /* لون النص في حالة النشطة */
}

.code-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Results Page Styles */
.results-container {
    max-width: 1000px;
    margin: 30px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1em;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'FF Shamel Sans One', sans-serif;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--primary-green);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.filter-select option {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.results-grid {
    display: grid;
    gap: 20px;
}

.result-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    border-right: 5px solid var(--primary-green);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.result-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.exam-title {
    color: var(--text-primary);
    font-size: 1.3em;
    font-weight: 700;
    flex: 1;
}

.score-badge {
    background: var(--primary-green);
    color: var(--dark-text);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.2em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.result-details {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.detail-label {
    color: var(--text-primary);
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-primary);
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.3em;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .results-container {
        padding: 20px;
    }

    .filters-section {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .score-badge {
        align-self: flex-start;
    }
}

/* --- Loader Styles (From main.blade.php) --- */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    /* Changed to theme var */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'FF Shamel Sans One', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  direction: ltr;
}

.loader span {
  color: var(--primary-yellow);
  opacity: 0;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  letter-spacing: 0.1em;
}

.l { animation: pass 2s ease-in-out infinite; animation-delay: 0.2s; }
.o { animation: pass 2s ease-in-out infinite; animation-delay: 0.4s; }
.a { animation: pass 2s ease-in-out infinite; animation-delay: 0.6s; }
.d { animation: pass 2s ease-in-out infinite; animation-delay: 0.8s; }
.i { animation: pass 2s ease-in-out infinite; animation-delay: 1s; }
.n { animation: pass 2s ease-in-out infinite; animation-delay: 1.2s; }
.g { animation: pass 2s ease-in-out infinite; animation-delay: 1.4s; }
.d1 { animation: pass1 2s ease-in-out infinite; animation-delay: 1.6s; }
.d2 { animation: pass1 2s ease-in-out infinite; animation-delay: 2s; }

@keyframes pass {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.3; transform: translateY(-10px); }
}

@keyframes pass1 {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes dotTriangle {
    33% {
        transform: translate(0, 0);
    }

    66% {
        transform: translate(10px, -18px);
    }

    100% {
        transform: translate(-10px, -18px);
    }
}

@keyframes pathRect {
    25% {
        stroke-dashoffset: 64;
    }

    50% {
        stroke-dashoffset: 128;
    }

    75% {
        stroke-dashoffset: 192;
    }

    100% {
        stroke-dashoffset: 256;
    }
}

@keyframes dotRect {
    25% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(18px, -18px);
    }

    75% {
        transform: translate(0, -36px);
    }

    100% {
        transform: translate(-18px, -18px);
    }
}

@keyframes pathCircle {
    25% {
        stroke-dashoffset: 125;
    }

    50% {
        stroke-dashoffset: 175;
    }

    75% {
        stroke-dashoffset: 225;
    }

    100% {
        stroke-dashoffset: 275;
    }
}
@keyframes pass1 {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* --- Theme Switch Styles (From main.blade.php) --- */
.theme-switch {
    --toggle-size: 12px;
    --container-width: 5.625em;
    --container-height: 2.5em;
    --container-radius: 6.25em;
    --container-light-bg: #3D7EAE;
    --container-night-bg: #1D1F2C;
    --circle-container-diameter: 3.375em;
    --sun-moon-diameter: 2.125em;
    --sun-bg: #ECCA2F;
    --moon-bg: #C4C9D1;
    --spot-color: #959DB1;
    --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
    --stars-color: #fff;
    --clouds-color: #F3FDFF;
    --back-clouds-color: #AACADF;
    --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
    --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);

    display: inline-block;
    vertical-align: middle;
    margin-left: 15px;
}

.theme-switch,
.theme-switch *,
.theme-switch *::before,
.theme-switch *::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: var(--toggle-size);
}

.theme-switch__container {
    width: var(--container-width);
    height: var(--container-height);
    background-color: var(--container-light-bg);
    border-radius: var(--container-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
    transition: var(--transition);
    position: relative;
}

.theme-switch__container::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
    border-radius: var(--container-radius)
}

.theme-switch__checkbox {
    display: none;
}

.theme-switch__circle-container {
    width: var(--circle-container-diameter);
    height: var(--circle-container-diameter);
    background-color: rgba(255, 255, 255, 0.1);
    position: absolute;
    left: var(--circle-container-offset);
    top: var(--circle-container-offset);
    border-radius: var(--container-radius);
    box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
    display: flex;
    transition: var(--circle-transition);
    pointer-events: none;
}

.theme-switch__sun-moon-container {
    pointer-events: auto;
    position: relative;
    z-index: 2;
    width: var(--sun-moon-diameter);
    height: var(--sun-moon-diameter);
    margin: auto;
    border-radius: var(--container-radius);
    background-color: var(--sun-bg);
    box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
    filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
    overflow: hidden;
    transition: var(--transition);
}

.theme-switch__moon {
    transform: translateX(100%);
    width: 100%;
    height: 100%;
    background-color: var(--moon-bg);
    border-radius: inherit;
    box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
    transition: var(--transition);
    position: relative;
}

.theme-switch__spot {
    position: absolute;
    top: 0.75em;
    left: 0.312em;
    width: 0.75em;
    height: 0.75em;
    border-radius: var(--container-radius);
    background-color: var(--spot-color);
    box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}

.theme-switch__spot:nth-of-type(2) {
    width: 0.375em;
    height: 0.375em;
    top: 0.937em;
    left: 1.375em;
}

.theme-switch__spot:nth-last-of-type(3) {
    width: 0.25em;
    height: 0.25em;
    top: 0.312em;
    left: 0.812em;
}

.theme-switch__clouds {
    width: 1.25em;
    height: 1.25em;
    background-color: var(--clouds-color);
    border-radius: var(--container-radius);
    position: absolute;
    bottom: -0.625em;
    left: 0.312em;
    box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
    transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}

.theme-switch__stars-container {
    position: absolute;
    color: var(--stars-color);
    top: -100%;
    left: 0.312em;
    width: 2.75em;
    height: auto;
    transition: var(--transition);
}

.theme-switch__checkbox:checked+.theme-switch__container {
    background-color: var(--container-night-bg);
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__circle-container {
    left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__circle-container:hover {
    left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.187em)
}

.theme-switch__circle-container:hover {
    left: calc(var(--circle-container-offset) + 0.187em);
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__moon {
    transform: translate(0);
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__clouds {
    bottom: -4.062em;
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__stars-container {
    top: 50%;
    transform: translateY(-50%);
}

/* --- Glowing Button & 3D Card (From index.blade.php) --- */
.glowing-btn {
    animation: glowing-animation 2s infinite ease-in-out;
}

@keyframes glowing-animation {
    0% {
        box-shadow: 0 0 5px var(--primary-yellow), 0 0 10px var(--primary-yellow);
    }

    50% {
        box-shadow: 0 0 20px var(--primary-yellow), 0 0 30px var(--primary-yellow);
    }

    100% {
        box-shadow: 0 0 5px var(--primary-yellow), 0 0 10px var(--primary-yellow);
    }
}

.responsive-img {
    width: 180px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.responsive-img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .responsive-img {
        width: 120px;
    }
}

/* 3D Card Animation */
@keyframes autoRun3d {
    from {
        transform: perspective(1000px) rotateY(-360deg);
    }

    to {
        transform: perspective(1000px) rotateY(0deg);
    }
}

.card-3d {
    position: relative;
    width: min(92vw, 800px);
    height: 400px;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    animation: autoRun3d 20s linear infinite;
    will-change: transform;
    overflow: hidden;
}

.card-3d div {
    position: absolute;
    width: 160px;
    height: 224px;
    background-color: #fff;
    border: solid 2px lightgray;
    border-radius: 0.5rem;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    transition-duration: 200ms;
    will-change: transform;
}

.card-3d div .details {
    position: absolute;
    top: 10px;
    left: 105%;
    width: 200px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateX(-20px);
    z-index: 100;
    text-align: right;
    border: 1px solid #ddd;
}

.card-3d:hover {
    animation-play-state: paused !important;
}

.card-3d:hover div {
    animation-play-state: paused !important;
}

.card-3d div:hover .details {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.card-3d div .details h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #29a4de;
}

.card-3d div .details p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #555;
}

@media (max-width: 768px) {
    .card-3d {
        height: 320px;
    }

    .card-3d div {
        width: 120px;
        height: 170px;
    }

    .card-3d div .details {
        left: 50%;
        top: 100%;
        margin-top: 10px;
        transform: translateX(-50%) translateY(-10px);
        text-align: center;
    }

    .card-3d div:hover .details {
        transform: translateX(-50%) translateY(0);
    }
}

/* --- Branch Tabs & Lecture List (From months_show.blade.php) --- */
.branches-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.branch-tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'FF Shamel Sans One', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.branch-tab-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-yellow);
}

.branch-tab-btn.active {
    background: var(--primary-yellow);
    color: var(--dark-text);
    border-color: var(--primary-yellow);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.3);
}

.branch-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.branch-pane.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-lectures-msg {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.no-lectures-msg i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.group-buttons-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

/* --- Month Card Image (From Grade-Courses.blade.php) --- */
.month-image {
    height: auto !important;
    min-height: 250px;
}

.month-image img {
    height: auto !important;
    width: 100%;
}

.month-desc {
    color: var(--text-secondary);
}

/* Premium Course Card Shared Styles */
.premium-course-card {
    background: transparent;
    border: none;
    border-radius: 25px;
    overflow: visible;
    margin-bottom: 50px;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 480px; /* Increased from 360px */
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.premium-course-card:hover {
    transform: translateY(-5px);
    z-index: 100;
}

.premium-course-card .card-image-wrap {
    width: 100%;
    height: 220px;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.premium-course-card .card-image-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.premium-course-card:hover .card-image-wrap img {
    transform: scale(1.05);
}

.premium-course-card .card-content-box {
    position: relative;
    margin-top: -30px; 
    margin-left: 15px;
    margin-right: 15px;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.12);
    z-index: 20;
    text-align: right;
    border: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
    pointer-events: auto;
}

.premium-course-card .status-badge {
    width: 100%;
    background: #2ecc71;
    color: #fff;
    padding: 12px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
}

.premium-course-card .status-badge:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

.premium-course-card .course-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.4;
}

.premium-course-card .course-divider {
    height: 2px;
    background: #c0392b;
    margin-bottom: 12px;
    width: 100%;
    opacity: 0.8;
    border-radius: 2px;
}

.premium-course-card .course-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.premium-course-card .course-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.premium-course-card .meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #444;
    font-weight: 600;
}

.premium-course-card .meta-item i {
    color: #e67e22;
    font-size: 1rem;
}

.premium-course-card .card-action-btn-wrap {
    display: flex;
    justify-content: flex-start;
    margin-top: 5px;
}

.premium-course-card .card-action-btn {
    background: var(--primary-yellow);
    color: var(--text-secondary);
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(255, 212, 41, 0.3);
    transition: all 0.3s ease;
}

.premium-course-card .card-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 212, 41, 0.4);
    color: var(--text-secondary);
}

.premium-course-card .card-action-btn.outline {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid var(--primary-yellow);
    box-shadow: none;
}

.premium-course-card .card-action-btn.outline:hover {
    background: var(--primary-yellow);
    color: var(--text-secondary);
}

/* Dark Mode Support */
.dark-mode .premium-course-card .card-content-box {
    background: #142A3D;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 15px 45px rgba(0,0,0,0.4);
}

.dark-mode .premium-course-card .course-title {
    color: #fff;
}

.dark-mode .premium-course-card .course-desc {
    color: #ddd;
}

.dark-mode .premium-course-card .meta-item {
    color: #eee;
}

.dark-mode .premium-course-card .course-divider {
    background: #e74c3c;
}

.dark-mode .premium-course-card .card-action-btn {
    color: #1a1a1a;
}

.dark-mode .premium-course-card .card-action-btn.outline {
    color: #fff;
}

@media (max-width: 1200px) {
    .premium-course-card .card-image-wrap {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .premium-course-card {
        margin-bottom: 30px;
    }
    .premium-course-card .card-image-wrap {
        height: 240px;
    }
    .premium-course-card .card-content-box {
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0 0 20px 20px;
    }
}

/* Premium Modal Shared Styles */
.premium-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.premium-modal-box {
    background: #1e1e1e;
    padding: 35px;
    border-radius: 20px;
    width: 95%;
    max-width: 480px;
    border: 2px solid var(--primary-yellow, #facc15);
    position: relative;
    animation: premiumSlideDown 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    text-align: center;
}

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

.premium-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.premium-modal-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.premium-modal-title {
    color: #fff;
    margin: 5px 0 10px;
    font-size: 1.6rem;
    font-weight: 800;
}

.premium-modal-desc {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.premium-modal-input {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #444;
    background: #111;
    color: var(--primary-yellow, #facc15);
    text-align: center;
    font-family: 'FF Shamel Sans One', sans-serif !important;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.premium-modal-input:focus {
    border-color: var(--primary-yellow, #facc15);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.25);
    background: #000;
}

/* Premium Hero Buttons & Layout */
.hero-btns-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 35px;
    justify-content: flex-start;
}

.btn-premium {
    background: var(--primary-yellow, #ffd429) !important;
    color: #080C14 !important;
    font-weight: 800 !important;
    padding: 14px 28px !important;
    border-radius: 50px !important;
    border: none !important;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 212, 41, 0.25);
    font-size: 1.05rem;
    cursor: pointer;
}

.btn-premium:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 35px rgba(255, 212, 41, 0.35);
    filter: brightness(1.05);
}

.btn-premium-outline {
    background: rgba(255, 212, 41, 0.05) !important;
    color: var(--primary-yellow, #ffd429) !important;
    border: 2px solid var(--primary-yellow, #ffd429) !important;
    font-weight: 700 !important;
    padding: 12px 26px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    cursor: pointer;
}

.btn-premium-outline:hover {
    background: var(--primary-yellow, #ffd429) !important;
    color: #080C14 !important;
    box-shadow: 0 10px 25px rgba(255, 212, 41, 0.2);
    transform: translateY(-3px);
}

.btn-premium-install {
    width: auto !important;
    min-width: 280px;
    background: linear-gradient(135deg, #FFD429, #FFB600) !important;
    margin-top: 5px;
    border-radius: 15px !important;
}

@media (max-width: 768px) {
    .hero-btns-grid {
        justify-content: center;
        gap: 12px;
    }
    .btn-premium, .btn-premium-outline {
        width: 100%;
        justify-content: center;
    }
}

/* Designer Credit Styles */
.designer-link {
    color: var(--primary-yellow) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.designer-link:hover {
    color: #E63250 !important;
    text-shadow: 0 0 8px rgba(255, 61, 94, 0.45);
}
