/* Qudrat AI - Premium Web Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --navy-dark: #0f172a;
    --navy-medium: #1e293b;
    --navy-light: #334155;
    --teal-primary: #0ea5e9;
    --teal-accent: #06b6d4;
    --teal-glow: rgba(6, 182, 212, 0.15);
    --cyan-primary: #14b8a6;
    --white-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --gold-primary: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.2);
    --border-radius-lg: 1rem;
    --border-radius-sm: 0.5rem;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--white-bg);
    color: var(--text-dark);
    font-family: 'Cairo', 'Outfit', sans-serif;
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

body[dir="ltr"] {
    font-family: 'Outfit', 'Cairo', sans-serif;
}

/* Force normal letter-spacing for Arabic to prevent disconnected/separated characters */
html[lang="ar"],
html[lang="ar"] *,
[dir="rtl"],
[dir="rtl"] * {
    letter-spacing: 0px !important;
    word-spacing: normal !important;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Card Styling */
.qudrat-card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.qudrat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal-primary), var(--cyan-primary));
    opacity: 0;
    transition: var(--transition-smooth);
}

.qudrat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.1), 0 4px 6px -4px rgba(14, 165, 233, 0.1);
}

.qudrat-card:hover::before {
    opacity: 1;
}

/* Sidebar Styling */
.qudrat-sidebar {
    background-color: var(--navy-dark);
    color: #ffffff;
    min-height: 100vh;
    box-shadow: 4px 0 15px rgba(15, 23, 42, 0.05);
    transition: var(--transition-smooth);
    z-index: 100;
}

.qudrat-sidebar .nav-link {
    color: #94a3b8;
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius-sm);
    margin: 0.2rem 0;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.qudrat-sidebar .nav-link i {
    font-size: 1.2rem;
}

.qudrat-sidebar .nav-link:hover, 
.qudrat-sidebar .nav-link.active {
    color: #ffffff;
    background-color: var(--navy-medium);
    box-shadow: inset 4px 0 0 0 var(--teal-accent);
}

body[dir="rtl"] .qudrat-sidebar .nav-link:hover, 
body[dir="rtl"] .qudrat-sidebar .nav-link.active {
    box-shadow: inset -4px 0 0 0 var(--teal-accent);
}

/* Glowing buttons */
.btn-glow {
    background: linear-gradient(135deg, var(--teal-primary), var(--teal-accent));
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    transition: var(--transition-smooth);
}

.btn-glow:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
    transform: scale(1.03);
    color: white;
}

/* Progress circle indicator */
.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(closest-side, white 79%, transparent 80% 100%),
                conic-gradient(var(--teal-primary) calc(var(--percent) * 1%), #e2e8f0 0);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.progress-circle::before {
    content: attr(data-percent) '%';
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy-dark);
}

/* Rewards Medals and Badges */
.badge-gold {
    background-color: var(--gold-glow);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-teal {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--teal-primary);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.badge-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Skeleton Loading Effect */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Dynamic slide-in animation */
.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Landing Page Hero and elements */
.landing-hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    color: #ffffff;
    position: relative;
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--white-bg);
    clip-path: ellipse(60% 80px at 50% 80px);
}

.hero-img {
    filter: drop-shadow(0 15px 30px rgba(6, 182, 212, 0.25));
    animation: pulseSlow 4s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes pulseSlow {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(1deg); }
}

/* RTL / LTR Helpers */
[dir="rtl"] .text-start { text-align: right !important; }
[dir="rtl"] .text-end { text-align: left !important; }
[dir="ltr"] .text-start { text-align: left !important; }
[dir="ltr"] .text-end { text-align: right !important; }

/* Dashboard Widgets styling */
.streak-counter {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
}
.streak-counter i {
    animation: fireFlicker 1.5s ease-in-out infinite alternate;
}

@keyframes fireFlicker {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.1); filter: brightness(1.2); }
}

/* Glassmorphism card utilities */
.glass-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Opacity and grayscale filter for locked assets */
.opacity-40 {
    opacity: 0.45;
    filter: grayscale(80%);
    transition: var(--transition-smooth);
}
.opacity-40:hover {
    opacity: 0.7;
    filter: grayscale(30%);
}

/* Reward particle pop keyframes */
.pop-reward {
    animation: popReward 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popReward {
    0% { transform: scale(0.7); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* Shimmer overlay animation */
.shimmer-effect {
    position: relative;
    overflow: hidden;
}
.shimmer-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

/* ==========================================================================
   Cyberpunk / Dark Luxury SaaS Theme (Landing Page Only)
   ========================================================================== */
.cyber-bg {
    background-color: #06111f !important;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 217, 255, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(14, 165, 255, 0.07) 0%, transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.005) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.005) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
    position: relative;
    overflow-x: hidden;
}

/* Neon Blur Blobs */
.cyber-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.12) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 1;
    pointer-events: none;
    animation: floatBlob 25s infinite alternate ease-in-out;
}

.cyber-blob-blue {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 255, 0.12) 0%, transparent 70%);
    filter: blur(70px);
    z-index: 1;
    pointer-events: none;
    animation: floatBlob 30s infinite alternate-reverse ease-in-out;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 80px) scale(1.15); }
}

/* Cyberglass Navigation */
.cyber-nav {
    background: rgba(6, 17, 31, 0.75) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.12) !important;
    transition: var(--transition-smooth);
}

/* Cyberglass Card */
.cyber-card {
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 217, 255, 0.08) !important;
    border-radius: var(--border-radius-lg);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.cyber-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(0, 217, 255, 0.35) !important;
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.12);
}

.cyber-card-active {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(0, 217, 255, 0.4) !important;
    box-shadow: 0 20px 50px rgba(0, 217, 255, 0.15) !important;
}

/* Glowing Neon Text */
.text-cyber-glow {
    text-shadow: 0 0 15px rgba(0, 217, 255, 0.4), 0 0 30px rgba(0, 217, 255, 0.15);
}

/* Cyber buttons */
.btn-cyber {
    background: linear-gradient(90deg, #00d9ff, #0ea5ff);
    color: #06111f !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.35);
    transition: var(--transition-smooth);
    border-radius: 30px;
    padding: 0.8rem 2.2rem;
}

.btn-cyber:hover {
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.75);
    transform: translateY(-3px) scale(1.02);
    color: #06111f !important;
}

.btn-cyber-outline {
    background: transparent;
    color: #00d9ff !important;
    border: 2px solid #00d9ff;
    font-weight: 700;
    transition: var(--transition-smooth);
    border-radius: 30px;
    padding: 0.8rem 2.2rem;
}

.btn-cyber-outline:hover {
    background: rgba(0, 217, 255, 0.08);
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    color: #00d9ff !important;
}

/* Custom interactive assistant orb */
.cyber-orb {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, #00d9ff 0%, #0ea5ff 100%);
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #06111f;
    font-size: 1.6rem;
    z-index: 9999;
    cursor: pointer;
    animation: orbFloat 4s ease-in-out infinite alternate, orbPulse 2s infinite;
}

@keyframes orbFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-15px); }
}

@keyframes orbPulse {
    0% { box-shadow: 0 0 20px rgba(0, 217, 255, 0.4); }
    50% { box-shadow: 0 0 35px rgba(0, 217, 255, 0.8); }
    100% { box-shadow: 0 0 20px rgba(0, 217, 255, 0.4); }
}

/* Section divider curves */
.cyber-curve-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.cyber-curve-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.cyber-curve-bottom .shape-fill {
    fill: #06111f;
}

.cyber-timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, #00d9ff, #0ea5ff, transparent);
    transform: translateX(-50%);
    z-index: 1;
}

.cyber-timeline-node {
    width: 50px;
    height: 50px;
    background: #06111f;
    border: 3px solid #00d9ff;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.6);
    border-radius: 50%;
    z-index: 2;
}

/* Fixed Neon breathing glow animation for the main title */
@keyframes neonBreath {
    0% {
        text-shadow: 0 0 15px rgba(0, 217, 255, 0.4), 0 0 30px rgba(0, 217, 255, 0.2);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 30px rgba(0, 217, 255, 0.8), 0 0 60px rgba(0, 217, 255, 0.4);
        transform: scale(1.03);
    }
    100% {
        text-shadow: 0 0 15px rgba(0, 217, 255, 0.4), 0 0 30px rgba(0, 217, 255, 0.2);
        transform: scale(1);
    }
}

.text-cyber-glow-breath {
    display: inline-block;
    animation: neonBreath 3.5s ease-in-out infinite;
    transform-origin: center;
}

/* ==========================================================================
   Light Background Sections below Hero (Original Hybrid Theme Style)
   ========================================================================== */
section:not(.landing-hero) {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #0f172a !important;
}

section:not(.landing-hero) h1,
section:not(.landing-hero) h2,
section:not(.landing-hero) h3,
section:not(.landing-hero) h4,
section:not(.landing-hero) h5,
section:not(.landing-hero) h6 {
    color: #0f172a !important;
    text-shadow: none !important;
}

section:not(.landing-hero) p,
section:not(.landing-hero) .text-white-50 {
    color: #475569 !important;
}

/* Style cards inside light sections to be elegant white cards exactly like the screenshot */
section:not(.landing-hero) .cyber-card {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03) !important;
}

section:not(.landing-hero) .cyber-card:hover {
    border-color: rgba(14, 165, 255, 0.3) !important;
    box-shadow: 0 15px 35px rgba(14, 165, 255, 0.08) !important;
    transform: translateY(-8px) scale(1.02);
}

section:not(.landing-hero) .cyber-card h5 {
    color: #0f172a !important;
}

section:not(.landing-hero) .cyber-card p {
    color: #475569 !important;
}

section:not(.landing-hero) .cyber-card .text-white-50 {
    color: #475569 !important;
}

section:not(.landing-hero) .cyber-card-active {
    background: #ffffff !important;
    border-color: #0ea5ff !important;
    box-shadow: 0 15px 35px rgba(14, 165, 255, 0.12) !important;
}

section:not(.landing-hero) .accordion-item {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

section:not(.landing-hero) .accordion-button {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

section:not(.landing-hero) .accordion-button:not(.collapsed) {
    background-color: #f8fafc !important;
    color: #0ea5ff !important;
}

section:not(.landing-hero) .accordion-collapse {
    background-color: #ffffff !important;
    color: #475569 !important;
}

section:not(.landing-hero) .dark-accordion .accordion-button {
    color: #0f172a !important;
}

section:not(.landing-hero) .dark-accordion .accordion-button:not(.collapsed) {
    color: #0ea5ff !important;
}

section:not(.landing-hero) .badge {
    background-color: rgba(14, 165, 255, 0.08) !important;
    color: #0ea5ff !important;
    border: 1px solid rgba(14, 165, 255, 0.15) !important;
}

section:not(.landing-hero) .badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.15) !important;
}

section:not(.landing-hero) .badge.bg-secondary {
    background-color: rgba(100, 116, 139, 0.08) !important;
    color: #64748b !important;
    border: 1px solid rgba(100, 116, 139, 0.15) !important;
}

section:not(.landing-hero) .list-unstyled li,
section:not(.landing-hero) .list-unstyled li span {
    color: #475569 !important;
}

section:not(.landing-hero) .list-unstyled li i {
    color: #10b981 !important;
}

/* Prevent horizontal overflow globally */
html, body {
    overflow-x: hidden !important;
    width: 100%;
}

/* Responsive student/admin/instructor/parent layout side drawer on mobile */
@media (max-width: 991.98px) {
    .qudrat-sidebar {
        position: fixed !important;
        left: -280px !important;
        top: 0;
        bottom: 0;
        width: 280px !important;
        height: 100vh !important;
        z-index: 1050 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5) !important;
        overflow-y: auto;
    }
    
    body[dir="rtl"] .qudrat-sidebar {
        left: auto !important;
        right: -280px !important;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5) !important;
    }
    
    .qudrat-sidebar.show-sidebar {
        transform: translateX(280px) !important;
    }
    
    body[dir="rtl"] .qudrat-sidebar.show-sidebar {
        transform: translateX(-280px) !important;
    }
    
    /* Force sidebar labels to show on mobile drawer */
    .qudrat-sidebar .nav-link span,
    .qudrat-sidebar .sidebar-brand span,
    .qudrat-sidebar .dropdown span {
        display: inline !important;
    }
    
    /* Force sidebar elements to align to start (not centered) */
    .qudrat-sidebar .d-flex.flex-column {
        align-items: flex-start !important;
    }
    
    .qudrat-sidebar ul.nav {
        align-items: flex-start !important;
    }
    
    /* Make containers full width */
    .student-container,
    .admin-container,
    .instructor-container,
    .parent-container {
        display: block !important;
        width: 100% !important;
    }
    
    .main-content {
        padding: 1.25rem !important;
        width: 100% !important;
    }
    
    .streak-counter, .streak-counter * {
        font-size: 0.85rem !important;
    }
}

/* Glassmorphism details & cyber elements */
.glass-modal {
    background: rgba(10, 25, 47, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    border: 1.5px solid rgba(0, 217, 255, 0.2) !important;
}

/* Mobile responsive font sizes & padding rules */
@media (max-width: 767.98px) {
    h1, .display-3 {
        font-size: 2.25rem !important;
    }
    h2, .display-4 {
        font-size: 1.75rem !important;
    }
    .main-content header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    /* Responsive styling for dashboard gamification stats */
    .main-content header .d-flex {
        width: 100%;
        justify-content: space-between;
    }
    
    .card {
        padding: 1.25rem !important;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    /* Align custom interactive assistant orb nicely on mobile */
    .cyber-orb {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

@media (max-width: 575.98px) {
    .btn-cyber, .btn-cyber-outline, .btn-glow {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .main-content header .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    .main-content header .d-flex .card {
        flex-grow: 1;
        justify-content: center;
    }
}



