@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');
@import "font.css";

* {
    font-family: 'Cairo', 'Droid Arabic Kufi', 'HelveticaNeueW23-Reg', Tahoma, Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
}

body {
    background: #eef2f6;
    direction: rtl;
    margin: 0px;
    padding: 0px 0px 30px 0px;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    margin: 5px 0px;
    padding: 3px;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.clear {
    clear: both;
}

/* ==========================================================================
   Top Menu Bar
   ========================================================================== */
.topMenu {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 8px 0px;
    height: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topMenu > div {
    width: 1000px;
    margin: 0px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    margin: 4px 0px 2px 0px;
}

input[type=text],
input[type=password],
input[type=email],
input[type=tel],
input[type=url] {
    border: 1px solid #cbd5e1;
    width: 100%;
    margin: 3px 0px 7px 0px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 13.5px;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus,
input[type=tel]:focus,
input[type=url]:focus {
    border-color: #a82036;
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 32, 54, 0.12);
    background: #ffffff;
}

textarea {
    border: 1px solid #cbd5e1;
    width: 100%;
    margin: 4px 0px 8px 0px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13.5px;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus {
    border-color: #a82036;
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 32, 54, 0.12);
    background: #ffffff;
}

input[type=submit] {
    background: linear-gradient(135deg, #821b2d 0%, #a82036 100%);
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    margin: 8px 0px 4px 0px;
    padding: 8px 20px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(130, 27, 45, 0.25);
    transition: all 0.2s ease;
}

input[type=submit]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(130, 27, 45, 0.35);
    background: linear-gradient(135deg, #6c1625 0%, #8f1b2e 100%);
}

/* ==========================================================================
   Main Body Wrapper
   ========================================================================== */
.body {
    width: 1000px;
    background: #FFFFFF;
    margin: 0px auto;
    border-radius: 0px 0px 12px 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.body .header {
    margin: 0px;
    line-height: 0;
}

.body .header img {
    width: 1000px;
    display: block;
}

.body .header .photo_admin {
    width: 180px;
    float: right;
    overflow: hidden;
    height: 200px;
    border: 2px solid #e2e8f0;
    margin: 7px;
    border-radius: 8px;
}

.body .header .photo_admin img {
    width: 190px;
    height: 210px;
}

.body .home {
    margin: 0px;
    padding: 0px 0px 15px 0px;
}

/* ==========================================================================
   Navigation Menu
   ========================================================================== */
.body .home .menu {
    background: linear-gradient(135deg, #821b2d 0%, #a82036 50%, #ba2942 100%);
    margin: 0px 0px 12px 0px;
    padding: 4px 8px;
    box-shadow: 0 3px 10px rgba(130, 27, 45, 0.2);
}

.body .home .menu ul {
    margin: 0px;
    padding: 0px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
}

.body .home .menu ul li {
    list-style: none;
    margin: 2px 2px;
    padding: 0px;
}

.body .home .menu ul li a {
    text-decoration: none;
    color: #FFFFFF;
    display: block;
    padding: 7px 11px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.body .home .menu ul li a:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

/* ==========================================================================
   School Stages Cards (المراحل التعليمية)
   ========================================================================== */
.body .home .block_level {
    width: 970px;
    margin: 0px auto 10px auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.body .home .block_level.single-student-stage {
    justify-content: center;
    padding: 10px 0;
}

.body .home .block_level.single-student-stage .level {
    width: 270px;
    box-shadow: 0 8px 25px rgba(130, 27, 45, 0.12);
    border: 2px solid #fecdd3;
}


.body .home .block_level .level {
    width: 232px;
    overflow: hidden;
    margin: 8px 0px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.body .home .block_level .level:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.body .home .block_level .level .title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #821b2d;
    padding: 8px 0px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff5f6;
}

.body .home .block_level .level .img {
    width: 100%;
    overflow: hidden;
    height: 140px;
    margin: 0px;
    border-bottom: 1px solid #f1f5f9;
}

.body .home .block_level .level .img img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.body .home .block_level .level:hover .img img {
    transform: scale(1.04);
}

.body .home .block_level .level .link ul {
    margin: 0px;
    padding: 4px 0px;
    list-style: none;
}

.body .home .block_level .level .link ul li {
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.body .home .block_level .level .link ul li a {
    display: block;
    border-bottom: 1px solid #f8fafc;
    padding: 6px 12px;
    text-decoration: none;
    color: #0284c7;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.15s ease, padding-right 0.15s ease;
}

.body .home .block_level .level .link ul li a:hover {
    background: #f0f9ff;
    padding-right: 16px;
    color: #0369a1;
}

/* ==========================================================================
   News Ticker (آخر الأخبار)
   ========================================================================== */
.body .home .lastNews {
    margin: 0px 15px 15px 15px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    overflow: hidden;
    padding: 4px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
}

.body .home .lastNews .title_news {
    background: linear-gradient(135deg, #a82036 0%, #d9465b 100%);
    padding: 5px 16px;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 13.5px;
    border-radius: 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

.body .home .lastNews .news {
    flex-grow: 1;
    width: auto;
    padding: 2px 12px;
    margin: 0;
    font-weight: 600;
    color: #334155;
}

/* ==========================================================================
   Sidebar (القائمة الجانبية)
   ========================================================================== */
.body .home .right {
    width: 230px;
    float: right;
    margin-right: 15px;
}

.body .home .right .login,
.body .home .right .inform,
.body .home .right .Clogin {
    background: #ffffff;
    overflow: hidden;
    margin: 0px 0px 15px 0px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.body .home .right .login .title,
.body .home .right .inform .title,
.body .home .right .Clogin .title {
    background: linear-gradient(135deg, #821b2d 0%, #a82036 100%);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 12px;
    text-align: center;
    letter-spacing: 0.3px;
}

.body .home .right .login form {
    margin: 12px 14px;
}

.body .home .right .login ul {
    margin: 0px;
    padding: 6px 10px;
    list-style: none;
}

.body .home .right .login ul li {
    list-style: none;
}

.body .home .right .login ul li a {
    display: block;
    padding: 7px 10px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #0284c7;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 6px;
}

.body .home .right .login ul li a:hover {
    background: #f0f9ff;
    color: #0369a1;
}

.body .home .right .Clogin a {
    display: block;
    border-bottom: 1px solid #f1f5f9;
    padding: 6px 12px;
    text-decoration: none;
    color: #0284c7;
    font-weight: 600;
    transition: background 0.15s ease;
}

.body .home .right .Clogin a:hover {
    background: #f0f9ff;
    color: #0369a1;
}

/* ==========================================================================
   Student First-Name Circular Avatar (صورة الطالب الدائرية باسمه الأول)
   ========================================================================== */
.student-avatar-box {
    text-align: center;
    padding: 16px 12px 10px 12px;
    background: linear-gradient(180deg, #fff5f6 0%, #ffffff 100%);
    border-bottom: 1px solid #f1f5f9;
}

.student-avatar-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b1e2f 0%, #b72a43 50%, #e11d48 100%);
    border: 3px solid #ffffff;
    box-shadow: 0 5px 15px rgba(183, 42, 67, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.student-avatar-circle:hover {
    transform: scale(1.06);
    box-shadow: 0 7px 20px rgba(183, 42, 67, 0.45);
}

.student-avatar-circle .student-first-name {
    color: #ffffff;
    font-weight: 800;
    font-size: 16.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-welcome-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.student-welcome-name {
    display: block;
    font-weight: 700;
    font-size: 14.5px;
    color: #821b2d;
    margin-top: 3px;
}

.student-action-links {
    list-style: none;
    padding: 10px 12px 12px 12px;
    margin: 0;
}

.student-action-links li {
    margin-bottom: 7px;
    list-style: none;
}

.student-action-links li:last-child {
    margin-bottom: 0px;
}

.body .home .right .login ul.student-action-links li a.profile-btn,
.body .home .right .login ul li a.profile-btn,
.student-action-links li a.profile-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: all 0.2s ease;
    border: 1px solid transparent !important;
}

.body .home .right .login ul.student-action-links li a.profile-btn:hover,
.body .home .right .login ul li a.profile-btn:hover,
.student-action-links li a.profile-btn:hover {
    background: #e0f2fe !important;
    color: #000000 !important;
    border: 1px solid #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    font-weight: 700 !important;
}

.body .home .right .login ul.student-action-links li a.logout-btn,
.body .home .right .login ul li a.logout-btn,
.student-action-links li a.logout-btn {
    display: block;
    text-align: center;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.body .home .right .login ul.student-action-links li a.logout-btn:hover,
.body .home .right .login ul li a.logout-btn:hover,
.student-action-links li a.logout-btn:hover {
    background: #fee2e2 !important;
    color: #000000 !important;
    border-color: #ef4444 !important;
}

/* ==========================================================================
   Main Content Area (المحتوى الرئيسي)
   ========================================================================== */
.body .home .left {
    width: 730px;
    float: left;
    margin-left: 15px;
}

.body .home .left .artecal,
.body .home .students .artecal {
    overflow: hidden;
    margin: 0px 0px 15px 0px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    line-height: 1.8;
}

.body .home .left .artecal .title,
.body .home .students .artecal .title {
    background: linear-gradient(135deg, #821b2d 0%, #a82036 100%);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 14px;
    text-align: right;
}

.body .home .left .artecal form,
.body .home .students .artecal form {
    margin: 14px;
}

.body .home .left .artecal a {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #0284c7;
    font-weight: 600;
}

.body .home .left .artecal a:hover {
    color: #0369a1;
}

.body .home .students {
    width: 970px;
    float: left;
    margin-left: 15px;
}

.body .home .students .artecal ul {
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.body .home .students .artecal ul li {
    float: right;
    list-style: none;
    margin: 0px;
    padding: 0px;
}

.body .home .students .artecal ul li a {
    display: block;
    margin: 3px 6px;
    text-decoration: none;
    color: #821b2d;
    font-weight: 600;
}

.body .home .students .artecal ul li a:hover {
    text-decoration: underline;
    color: #a82036;
}

.body .home .left .artecal ul {
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.body .home .left .artecal ul li {
    float: right;
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.body .home .left .artecal ul li a {
    border: none;
}

.body .home .left .slideshow {
    height: 300px;
    width: 730px;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Student Profile Page Styling (صفحة الملف الشخصي للطالب)
   ========================================================================== */
.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #fff5f6 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
}

.profile-hero-card .profile-avatar {
    width: 84px;
    height: 84px;
    margin: 0;
    flex-shrink: 0;
}

.profile-hero-card .profile-avatar .student-first-name {
    font-size: 18.5px;
}

.profile-hero-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-hero-name {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.profile-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 6px;
    width: fit-content;
}

.profile-nav-pills {
    background: #f8fafc;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.profile-nav-pills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-nav-pills ul li {
    list-style: none;
    float: none !important;
}

.profile-nav-pills ul li a {
    display: block;
    padding: 6px 13px !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    color: #334155 !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.profile-nav-pills ul li a:hover {
    background: #821b2d !important;
    color: #ffffff !important;
    border-color: #821b2d !important;
    text-decoration: none !important;
}

.profile-info-grid {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-info-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
}

.profile-info-item strong {
    color: #821b2d;
    font-weight: 700;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    margin: 20px 0px 10px 0px;
}

.footer .copyright {
    width: 1000px;
    margin: 5px auto;
    direction: rtl;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.footer .copyright a {
    color: #821b2d;
    text-decoration: none;
    font-weight: 700;
}

.footer .copyright a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Smart Educational Video Library (مكتبة الفيديو التعليمية الذكية)
   ========================================================================== */
.video-library-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.video-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.video-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-header-icon {
    font-size: 28px;
}

.video-header-text h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #821b2d;
}

.video-header-text p {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: #64748b;
}

.student-grade-badge {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border: 1.5px solid #fecdd3;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.student-grade-badge .badge-label {
    font-size: 12px;
    color: #9f1239;
    font-weight: 600;
}

.student-grade-badge .badge-val {
    font-size: 13.5px;
    color: #821b2d;
    font-weight: 800;
}

.admin-grade-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 8px;
}

.admin-grade-selector label {
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin: 0;
}

.admin-grade-selector select {
    padding: 5px 8px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
}

/* Smart Search Box */
.smart-search-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.smart-search-form {
    margin: 0;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 3px 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-icon {
    font-size: 16px;
    margin-left: 6px;
    color: #94a3b8;
}

.search-input-wrapper input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13.5px;
    font-family: inherit;
    padding: 7px 4px;
    color: #1e293b;
    background: transparent;
}

.search-clear-btn {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 50%;
    margin-left: 4px;
    transition: background 0.15s, color 0.15s;
}

.search-clear-btn:hover {
    background: #f1f5f9;
    color: #dc2626;
}

.search-submit-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    padding: 7px 18px;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.25);
    transition: all 0.2s ease;
}

.search-submit-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.35);
}

.search-hint {
    margin-top: 6px;
    font-size: 11.5px;
    color: #64748b;
    padding: 0 4px;
}

/* Subjects Navigation Tabs */
.subjects-nav-container {
    margin-bottom: 16px;
}

.subjects-nav-title {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.subjects-tabs-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.subject-tab {
    display: inline-block;
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    color: #334155;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
}

.subject-tab:hover {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #821b2d;
    transform: translateY(-1px);
}

.subject-tab.active {
    background: linear-gradient(135deg, #821b2d 0%, #a8233a 100%);
    border-color: #821b2d;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(130, 27, 45, 0.25);
}

/* Videos Grid */
.video-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.video-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(130, 27, 45, 0.12);
    border-color: #fecdd3;
}

.vid-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 130px;
    overflow: hidden;
    background: #0f172a;
}

.vid-thumb-wrapper img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .vid-thumb-wrapper img {
    transform: scale(1.05);
}

.vid-duration {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    direction: ltr;
}

.vid-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover .vid-play-overlay {
    opacity: 1;
}

.vid-play-btn {
    width: 44px;
    height: 44px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.video-card:hover .vid-play-btn {
    transform: scale(1.05);
}

.vid-card-body {
    padding: 10px 11px 12px 11px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vid-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.vid-grade-tag {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.vid-time-tag {
    color: #94a3b8;
    font-size: 11px;
}

.vid-title {
    margin: 0 0 8px 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.45;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.vid-channel {
    margin-top: auto;
    margin-bottom: 8px;
    font-size: 11.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vid-action-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0369a1;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    width: 100%;
}

.video-card:hover .vid-action-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-color: #0284c7;
}

/* Empty Videos State */
.empty-videos-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
}

.empty-videos-box .empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.empty-videos-box h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #334155;
}

.empty-videos-box p {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #64748b;
}

.reset-search-btn {
    display: inline-block;
    background: #821b2d;
    color: #ffffff !important;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

/* Video Lightbox Modal */
.video-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal-backdrop.active {
    display: flex;
}

.video-modal-content {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 14px;
    width: 780px;
    max-width: 95vw;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.video-modal-header h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.video-modal-close {
    background: #334155;
    color: #f1f5f9;
    border: none;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.video-modal-close:hover {
    background: #dc2626;
}

.video-player-frame-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000000;
}

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

.video-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: #1e293b;
    border-top: 1px solid #334155;
    font-size: 12.5px;
    color: #94a3b8;
}

.modal-close-btn {
    background: #334155;
    color: #f8fafc;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-close-btn:hover {
    background: #475569;
}



