@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-color: #020617;
    --card-bg: rgba(15, 23, 42, 0.55);
    --primary: #6366f1;
    /* Vibrant Indigo */
    --secondary: #a855f7;
    /* Vibrant Purple */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #38bdf8;
    /* Sky Blue */
    --danger: #f43f5e;
    --success: #10b981;
    --surface: #0f172a;
    --glow: rgba(99, 102, 241, 0.45);
    --neon-purple: rgba(168, 85, 247, 0.4);
    --neon-blue: rgba(56, 189, 248, 0.4);
    --glass-blur: 28px;
    --font-family: 'Alexandria', 'Outfit', 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
    --card-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.18);
}

:root[data-theme='light'] {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: rgba(0, 0, 0, 0.08);
    --surface: #ffffff;
    --primary: #2563eb;
    --secondary: #4f46e5;
    --accent: #0ea5e9;
    --glow: rgba(37, 99, 235, 0.2);
    --neon-purple: rgba(79, 70, 229, 0.2);
    --neon-blue: rgba(14, 165, 233, 0.2);
    --card-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.12);
}

html[data-theme='light'] body {
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
    background-color: #f8fafc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    direction: rtl;
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

/* Mesh Background Layer */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-color);
}

.mesh-bg::before,
.mesh-bg::after {
    content: '';
    position: absolute;
    width: 1000px;
    height: 1000px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: -1;
    animation: meshMove 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.mesh-bg::before {
    background: var(--primary);
    top: -400px;
    left: -400px;
}

.mesh-bg::after {
    background: var(--secondary);
    bottom: -400px;
    right: -400px;
    animation-delay: -10s;
}

@keyframes meshMove {
    0% {
        transform: translate(0, 0) scale(1.1) rotate(0deg);
    }

    100% {
        transform: translate(10%, 10%) scale(1.3) rotate(5deg);
    }
}

/* Elite Glowing Blobs */
.glowing-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    animation: blobFloat 20s infinite alternate ease-in-out;
}

@keyframes blobFloat {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 50px) scale(1.2);
    }
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.flex {
    display: flex;
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: 1rem;
}

.gap-2 {
    gap: 0.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Components */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 28px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
    z-index: 0;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 40px 60px -15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.1);
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px var(--glow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.9rem 2rem;
    border-radius: 14px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--primary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px -5px var(--glow);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 50px 80px -20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.2);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item {
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade {
    animation: fadeIn 0.6s ease forwards;
}

/* Skeleton Loading Layer */
.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    animation: skeleton-sweep 1.5s infinite;
}

@keyframes skeleton-sweep {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.skeleton-card {
    height: 380px;
    border-radius: 24px;
    margin-bottom: 2rem;
}

.skeleton-banner {
    height: 180px;
    border-radius: 28px;
    margin-bottom: 2rem;
}

/* Elite: Badges */
.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.badge-trending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.badge-popular {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.badge-soon {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

/* Elite: Sticky Note */
.sticky-note {
    position: fixed;
    bottom: 40px;
    left: 40px;
    max-width: 300px;
    padding: 1.2rem;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: none;
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sticky-note.active {
    display: block;
}

.sticky-note .close-note {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Security: Selection Prevention */
.no-select {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
    white-space: nowrap;
}

/* WhatsApp Pulse Widget */
.whatsapp-fancy {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-fancy:hover {
    transform: scale(1.1) rotate(5deg);
}

.whatsapp-fancy::before,
.whatsapp-fancy::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    opacity: 0.6;
    z-index: -1;
    animation: pulse-green 2s infinite;
}

.whatsapp-fancy::after {
    animation-delay: 0.5s;
}

@keyframes pulse-green {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.animate-slide {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale {
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    position: relative;
    padding-right: 1.8rem;
    background: linear-gradient(135deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.section-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 2rem;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 20px;
    box-shadow: 0 0 20px var(--glow);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.course-premium-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

.course-premium-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.course-premium-card:hover {
    transform: translateY(-16px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(30, 41, 59, 0.6);
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(59, 130, 246, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.course-premium-card:hover::after {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    opacity: 0.8;
}

.course-premium-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #020617;
    margin: 12px;
    width: calc(100% - 24px);
    border-radius: 16px;
}

.course-premium-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.course-premium-card:hover .course-premium-thumb {
    transform: scale(1.2) rotate(2deg);
}

.course-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    opacity: 0.9;
}

.course-premium-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-badge-list {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.course-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.course-badge.category-badge {
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
}

.course-premium-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: white;
    line-height: 1.4;
}

.course-premium-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-price-tag {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
}

.course-price-tag.free {
    color: var(--success);
}

.course-action-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.course-premium-card:hover .course-action-indicator {
    transform: translateX(-5px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.btn-danger {
    background: var(--danger);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--text-main);
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #020617;
    color: var(--text-main);
    outline: none;
    font-size: 1rem;
    margin-bottom: 1rem;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
}

/* Typography */
h1,
h2,
h3 {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

/* Video Player */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    background: black;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.dashboard-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.code-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    letter-spacing: 1px;
}

/* --- NEW STYLES for ENHANCED UI --- */

/* Course Card Enhanced */
.course-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.course-card:hover::before {
    opacity: 1;
}

.course-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.play-icon-overlay {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 0 20px var(--primary);
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.course-card:hover .play-icon-overlay {
    transform: scale(1.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
    }

    to {
        transform: scale(1);
    }
}

.modal-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    border-bottom: 1px solid var(--border);
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-modal:hover {
    background: var(--danger);
}

/* Custom Player Controls */
.custom-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: black;
}

.custom-player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.custom-player-wrapper:hover .player-controls {
    opacity: 1;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 5px;
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -3px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s;
}

.progress-bar:hover .progress-fill::after {
    transform: scale(1);
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ctrl-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
        /* Stack columns on mobile */
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dashboard-header .flex.gap-4 {
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        margin: auto;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Login Card Adjustments */
    .login-card {
        padding: 1.5rem;
    }
}

/* --- ANNOUNCEMENT BANNER --- */
.announcement-bar {
    background: linear-gradient(90deg, #be123c, #e11d48);
    color: white;
    text-align: center;
    padding: 0.8rem;
    font-weight: bold;
    font-size: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.5s ease-out;
    backdrop-filter: blur(8px);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* --- MINIMALIST LOADING SCREEN (V3) --- */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.global-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Slim Top Progress Bar */
.loader-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    animation: topBarProgress 2s ease-in-out forwards;
    box-shadow: 0 0 10px var(--primary);
}

.loader-v3-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-v3-ring {
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    position: relative;
}

.loader-v3-ring::after {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid transparent;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Admin Specific Branding */
.global-loader.admin .loader-top-bar {
    background: linear-gradient(90deg, #8b5cf6, #d946ef);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

/* --- UTILITIES --- */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(-20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.global-loader.admin .loader-v3-logo {
    color: #d946ef;
    filter: drop-shadow(0 0 8px rgba(217, 70, 239, 0.4));
}

.loader-v3-logo {
    position: absolute;
    font-size: 1.4rem;
    color: white;
    opacity: 0.8;
}

.loader-v3-text {
    position: absolute;
    top: calc(50% + 70px);
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s ease;
}

.loader-v3-text.show {
    opacity: 1;
    transform: translateY(0);
}

.loader-v3-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.loader-v3-phrase {
    font-size: 1.1rem;
    color: var(--accent);
    letter-spacing: 1px;
    font-weight: 500;
}

@keyframes topBarProgress {
    0% {
        width: 0;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.courses-hero {
    padding: 6rem 0 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.courses-hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(to bottom, #fff 30%, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.courses-hero p {
    font-size: 1.2rem;
}

/* --- LMS PLAYER STYLES --- */
.lms-wrapper {
    display: flex;
    height: 100vh;
    background: var(--bg-color);
    overflow: hidden;
}

.lms-sidebar {
    width: 350px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lms-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.lms-progress-container {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lms-progress-info {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
}

.lms-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.lms-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--glow);
}

.lms-playlist {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.lms-playlist::-webkit-scrollbar {
    width: 5px;
}

.lms-playlist::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.lms-section-header {
    padding: 1.2rem 1.5rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lms-lesson-item {
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 4px solid transparent;
    opacity: 0;
    animation: playlistEntry 0.5s ease forwards;
}

@keyframes playlistEntry {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lms-lesson-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.lms-lesson-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent);
    border-right-color: var(--primary);
}

.lms-lesson-item.completed .lesson-title {
    color: var(--text-muted);
}

.lesson-check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.lms-lesson-item.completed .lesson-check-icon {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.lesson-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lesson-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.lesson-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.lms-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-color);
}

.lms-header {
    padding: 1rem 2rem;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.complete-btn-top {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.complete-btn-top:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.lms-content {
    padding: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.lesson-title-main {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.premium-video-frame {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

.complete-btn-main {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 2.5rem 0;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.complete-btn-main:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
}

.lms-sidebar-top-bar {
    display: none;
}

@keyframes socialPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.header-lesson-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.video-player-container {
    width: 100%;
    position: relative;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .mobile-mini-progress {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        height: 3px;
        background: var(--accent);
        width: 0%;
        z-index: 10001;
        transition: width 0.3s ease;
    }

    .lms-sidebar {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 85%;
        z-index: 2000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .lms-sidebar.active {
        right: 0;
    }

    .lms-sidebar-top-bar {
        display: flex;
        padding: 1rem;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        justify-content: space-around;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-muted);
        font-size: 0.75rem;
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
    }

    .mobile-nav-item span {
        display: block;
    }

    .lms-main {
        height: auto;
        flex: 1;
        padding-bottom: 90px;
    }

    .lms-content {
        padding: 1.5rem 1rem;
    }

    .lesson-title-main {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }

    .lms-header {
        padding: 0.6rem 1rem;
    }

    .lms-header .complete-btn-top {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
}

.mobile-mini-progress {
    display: none;
}

.sidebar-toggle-mobile {
    display: none;
}

/* Dashboard Core Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 10px 20px -5px var(--glow);
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 10px var(--glow);
    }

    to {
        box-shadow: 0 0 25px var(--glow);
        transform: scale(1.05);
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    margin-bottom: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(-8px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.3);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    color: white;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(99, 102, 241, 0.1);
    transform: translateX(-5px) scale(1.02);
}

.nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    transition: transform 0.3s;
}

.nav-link:hover i {
    transform: scale(1.1);
}

.main-content {
    flex: 1;
    padding: 2.5rem;
    max-width: 1400px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: right;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.01);
}

.data-table tr:hover td {
    background: rgba(99, 102, 241, 0.05);
    color: white;
}

/* Elite Glass Table */
.data-table tr {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.data-table tr:hover {
    transform: scale(1.005);
    z-index: 10;
}

.table-container {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}



.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        right: -280px;
        height: 100%;
    }

    .sidebar.active {
        right: 0;
    }

    .main-content {
        padding: 1.5rem;
    }

    .sidebar-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
}

/* Theme Toggle Global Position */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 10000;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent);
}

/* Common WhatsApp Pulse Animation */
.social-pulse {
    animation: socialPulse 2s infinite;
}

@keyframes socialPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Announcement Banner */
.announcement-banner {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    color: #0f172a;
    padding: 0.8rem 0;
    font-weight: 700;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    z-index: 2000;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.announcement-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.announcement-content i {
    font-size: 1.1rem;
    animation: blink 1.5s infinite;
}

.close-announcement {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.close-announcement:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

@keyframes blink {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* User Profile Mini */
.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-profile-mini:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(56, 189, 248, 0.2);
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.user-info-mini {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-name-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.edit-icon-mini {
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.user-profile-mini:hover .edit-icon-mini {
    opacity: 1;
}

/* Modal Enhancements for Edit Name */
.edit-name-group {
    margin-bottom: 1.5rem;
}

.edit-name-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.edit-name-group input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
}

.edit-name-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
    outline: none;
}

/* --- DASHBOARD MOBILE RESPONSIVENESS OVERRIDES --- */
@media (max-width: 1200px) {
    .platform-layout {
        grid-template-columns: 1fr;
    }

    .platform-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 2rem;
    }

    .platform-preview {
        display: none;
        /* Hide preview on tablet/mobile to focus on editor */
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .stats-overview {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .dash-section .flex.justify-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .search-box-wrapper {
        width: 100%;
        min-width: 0 !important;
    }

    .styled-select {
        width: 100%;
    }

    .table-container {
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        /* Full width on mobile */
        width: calc(100% + 2rem);
    }

    .data-table th,
    .data-table td {
        padding: 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .card {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .mobile-only {
        display: inline-flex !important;
    }
}

@media (max-width: 480px) {
    .sidebar-brand {
        margin-bottom: 2rem;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }

    .stat-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .modal-content {
        max-width: 95% !important;
        margin: auto;
        border-radius: 16px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .platform-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    #popularCoursesChart .flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .active-badge {
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   🌟 ANTI-GRAVITY ULTRA-PREMIUM UI/UX DESIGN SYSTEM EXTENSION (5 IN 1)
   ========================================================================== */

/* 1. Glassmorphism & Neon Glow Upgrades */
.auth-card, .card, .stat-card, .glass-card, .dashboard-card {
    background: var(--card-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--card-shadow) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.auth-card:hover, .card:hover, .stat-card:hover {
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 30px 70px -12px rgba(0, 0, 0, 0.8), 0 0 35px var(--glow) !important;
    transform: translateY(-4px) !important;
}

/* Subtle border glowing tracer */
.auth-card::after, .card::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--secondary), var(--accent));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.auth-card:hover::after, .card:hover::after {
    opacity: 0.25;
}

/* 2. Modern Typography & Animated Linear Gradient Text */
body, button, input, select, textarea, h1, h2, h3, h4, h5, h6 {
    font-family: 'Alexandria', 'Outfit', 'Cairo', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.logo-v2, .gradient-title, .brand-title {
    background: linear-gradient(270deg, #38bdf8, #6366f1, #a855f7, #ec4899, #38bdf8) !important;
    background-size: 300% 300% !important;
    animation: shineGradient 8s ease infinite !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
}

@keyframes shineGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 3. Button Micro-Animations & Shining Sweep Effect */
.btn-premium, .btn, button[type="submit"], .btn-primary {
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    background-size: 200% 200% !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 25px -5px var(--glow) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    z-index: 1;
    cursor: pointer;
}

.btn-premium::before, .btn::before, button[type="submit"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -150% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent) !important;
    transform: skewX(-25deg) !important;
    transition: left 0.75s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: -1 !important;
}

.btn-premium:hover::before, .btn:hover::before, button[type="submit"]:hover::before {
    left: 150% !important;
}

.btn-premium:hover, .btn:hover, button[type="submit"]:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 20px 35px -5px rgba(168, 85, 247, 0.5) !important;
}

.btn-premium:active, .btn:active {
    transform: translateY(1px) scale(0.97) !important;
    box-shadow: 0 5px 15px -3px var(--glow) !important;
}

/* Floating Input Neon Aura */
.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--accent) !important;
    background: rgba(15, 23, 42, 0.75) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 0 20px rgba(99, 102, 241, 0.3) !important;
    transform: translateY(-1px);
}

/* 4. Dynamic Ambient Mesh & Cyber Grid Overlay */
.background-wrapper, .mesh-bg {
    background: var(--bg-color) !important;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.4) 0%, var(--bg-color) 100%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) !important;
    background-size: 100% 100%, 40px 40px, 40px 40px !important;
    background-position: center center !important;
}

.orb, .glowing-blob {
    animation: orbFloatPulse 18s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate !important;
    filter: blur(80px) !important;
}

@keyframes orbFloatPulse {
    0% { transform: translate(0, 0) scale(0.9) rotate(0deg); opacity: 0.35; }
    50% { transform: translate(70px, -60px) scale(1.25) rotate(15deg); opacity: 0.55; }
    100% { transform: translate(-60px, 70px) scale(1.05) rotate(-10deg); opacity: 0.4; }
}

/* 5. Premium Floating Toast Alerts & Breathing Loaders */
#feedback, .alert, .toast-notification {
    position: fixed !important;
    top: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-120px) !important;
    z-index: 99999 !important;
    min-width: 320px;
    max-width: 90vw;
    padding: 1.25rem 2rem !important;
    border-radius: 22px !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

#feedback[style*="block"], .alert-show, .feedback-error[style*="block"], .feedback-success[style*="block"] {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.35) !important;
}

.feedback-error {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
}

.feedback-success {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.5) !important;
}

/* Breathing Shimmer for Loader */
.global-loader .loader-v3-content {
    animation: loaderBreathing 2.5s ease-in-out infinite !important;
}

@keyframes loaderBreathing {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px var(--primary)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 35px var(--accent)); }
}