:root {
    --bg-color: #0a0c1a;
    --card-bg: #161a2e;
    --primary: #8b5cf6;
    --secondary: #3b82f6;
    --accent: #22c55e;
    --text-main: #ffffff;
    --text-dim: #cbd5e1;
    --border: rgba(255, 255, 255, 0.15);
    --glass: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    filter: blur(100px);
}

/* Stats Bar */
.app-stats {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 12px 30px;
    border-radius: 100px;
    display: flex;
    gap: 30px;
    font-weight: 800;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.level-display {
    font-size: 1.1rem;
}

.level-display span {
    color: #f59e0b;
}

/* Header & Progress */
.app-header {
    text-align: center;
    padding: 120px 20px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.path-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 15px;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.app-title {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

.overall-progress {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: right;
}

.prog-labels {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.prog-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
}

.prog-bar {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    height: 100%;
    width: 0%;
    transition: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Main Layout */
.main-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px 100px;
}

/* Daily Mission */
.daily-mission-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 25px 35px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.daily-mission-card::after {
    content: '🎯';
    position: absolute;
    right: 20px;
    top: -20px;
    font-size: 10rem;
    opacity: 0.05;
    pointer-events: none;
}

.dm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dm-header h3 {
    color: #f59e0b;
    font-weight: 900;
    font-size: 1.4rem;
}

.dm-xp {
    background: #f59e0b;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.9rem;
}

#dm-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.btn-dm {
    align-self: flex-start;
    background: #f59e0b;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 10px;
}

.btn-dm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

/* Content Layout (Roadmap + Sidebar) */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

@media (max-width: 900px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
}

/* Roadmap Phases */
.roadmap-phase {
    margin-bottom: 60px;
    position: relative;
}

.phase-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
}

.phase-title .dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.phase-1 .dot {
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.phase-2 .dot {
    background: #eab308;
    box-shadow: 0 0 15px #eab308;
}

.phase-3 .dot {
    background: #f97316;
    box-shadow: 0 0 15px #f97316;
}

.phase-4 .dot {
    background: #ef4444;
    box-shadow: 0 0 15px #ef4444;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Project Cards */
.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 35px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    height: auto;
    position: relative;
    overflow: hidden;
}

.project-card:not(.locked):hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    background: #1e233d;
}

.project-card h3 {
    font-size: 1.7rem;
    font-weight: 900;
    margin-bottom: 12px;
    color: #fff;
}

.project-card p {
    color: var(--text-dim);
    font-size: 1.05rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.difficulty {
    font-size: 0.85rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 14px;
    border-radius: 12px;
    color: #fff;
}

.xp-val {
    color: #f59e0b;
    font-weight: 900;
    font-size: 1.1rem;
}

/* Locked State */
.project-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 26, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 900;
    font-size: 1.2rem;
    z-index: 10;
}

.lock-overlay span {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Leaderboard Sidebar */
.leaderboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    position: sticky;
    top: 120px;
}

.leaderboard-card h3 {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.lb-list {
    list-style: none;
}

.lb-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

.lb-rank {
    width: 30px;
    color: var(--text-dim);
    font-weight: 900;
}

.lb-name {
    flex-grow: 1;
    color: #fff;
}

.lb-xp {
    color: #f59e0b;
    font-size: 0.9rem;
}

.lb-me {
    background: rgba(139, 92, 246, 0.15);
    padding: 12px 15px !important;
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    margin: 10px -15px;
    width: calc(100% + 30px);
}

/* Drawer & Tasks Styles */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-drawer {
    position: fixed;
    top: 0;
    right: -750px;
    width: 750px;
    height: 100%;
    background: #0d0f1f;
    z-index: 2001;
    box-shadow: -20px 0 100px rgba(0, 0, 0, 0.9);
    transition: right 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 50px;
    overflow-y: auto;
}

.side-drawer.active {
    right: 0;
}

@media (max-width: 800px) {
    .side-drawer {
        width: 100%;
        right: -100%;
    }
}

.drawer-top {
    margin-bottom: 45px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 35px;
}

.phase-section {
    margin-bottom: 45px;
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 25px;
}

.task-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 22px 28px;
    border-radius: 18px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: fadeSlideUp 0.5s ease-out forwards;
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Checked State - Strikethrough */
.task-item.checked {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.08);
}

.task-item.checked .task-text {
    color: var(--accent);
    text-decoration: line-through;
    opacity: 0.7;
}

.check-circle {
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--text-dim);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
    flex-shrink: 0;
}

.task-item.checked .check-circle {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.task-item.checked .check-circle::after {
    content: '✓';
    color: white;
    font-weight: 900;
    font-size: 1rem;
}

.task-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.btn-finish {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 22px;
    border-radius: 18px;
    font-weight: 900;
    font-size: 1.3rem;
    width: 100%;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 45px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-finish:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

.btn-finish:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
    transform: none;
    box-shadow: none;
}

/* Gamification Elements */
.floating-xp {
    position: fixed;
    color: #f59e0b;
    font-weight: 900;
    font-size: 2rem;
    pointer-events: none;
    z-index: 5000;
    animation: floatUp 1s ease-out forwards;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-card {
    background: linear-gradient(135deg, #161a2e, #1e233d);
    border: 1px solid var(--primary);
    border-radius: 30px;
    padding: 50px;
    text-align: center;
    width: 90%;
    max-width: 450px;
    transform: scale(0.8);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.4);
}

.popup-overlay.active .popup-card {
    transform: scale(1);
}

.popup-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

#popup-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #f59e0b;
    margin-bottom: 10px;
}

#popup-desc {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4000;
}

.btn-twitter {
    background: #1DA1F2;
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    width: 100%;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-twitter:hover {
    background: #1a91da;
    transform: translateY(-2px);
}

/* Welcome Landing Page */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    padding: 60px 20px;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
}

.welcome-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.landing-hero {
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out forwards;
    padding-top: 40px;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.landing-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--text-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.landing-desc {
    font-size: 1.6rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 45px;
}

.landing-section-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 40px;
    color: var(--text-main);
}

.landing-projects {
    width: 100%;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.landing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.l-card {
    background: rgba(22, 26, 46, 0.6);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px 25px;
    text-align: right;
    backdrop-filter: blur(10px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.l-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    opacity: 0;
    transition: 0.3s;
}

.l-card:hover {
    transform: translateY(-10px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 92, 246, 0.1);
    background: rgba(30, 35, 61, 0.8);
}

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

.l-card-header {
    margin-bottom: 15px;
}

.l-diff {
    font-size: 0.85rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.l-diff.easy { color: var(--accent); border: 1px solid rgba(34, 197, 94, 0.3); }
.l-diff.medium { color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.l-diff.hard { color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.l-card h3 {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
}

.l-card p {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.6;
}

.btn-start-journey {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.btn-start-journey:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
}

/* =========================================
   📱 Mobile Responsiveness (Smartphones & Tablets)
   ========================================= */

@media (max-width: 768px) {
    /* Top Stats Bar */
    .app-stats {
        width: 88%;
        padding: 15px 20px !important;
        gap: 12px !important;
        top: 15px;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        border-radius: 20px;
    }
    
    .level-display {
        font-size: 1.1rem !important;
    }
    
    .app-stats button {
        font-size: 0.95rem !important;
        padding: 8px 15px !important;
        width: 100%;
    }
    
    /* Header Section */
    .app-header {
        padding: 140px 15px 30px;
    }

    .app-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .path-badge {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
    
    .prog-labels {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        align-items: center;
    }

    .main-container {
        padding: 0 15px 80px;
    }

    /* Daily Mission */
    .daily-mission-card {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .daily-mission-card::after {
        font-size: 6rem;
        top: -10px;
        right: -10px;
    }

    .dm-header h3 {
        font-size: 1.1rem;
    }

    #dm-text {
        font-size: 0.95rem;
    }
    
    .btn-dm {
        font-size: 0.9rem;
        padding: 8px 16px;
        width: 100%;
        text-align: center;
    }

    /* Project Cards */
    .phase-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .project-card {
        padding: 20px;
        min-height: auto;
        border-radius: 18px;
    }

    .project-card h3 {
        font-size: 1.3rem;
    }
    
    .project-card p {
        font-size: 0.95rem;
    }

    .card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        text-align: center;
    }
    
    .difficulty, .xp-val {
        width: 100%;
        display: block;
    }

    /* Side Drawer */
    .side-drawer {
        padding: 30px 20px;
    }

    #drawer-title {
        font-size: 1.5rem !important;
    }
    
    .drawer-top p {
        font-size: 0.9rem !important;
    }

    .task-item {
        padding: 15px;
        border-radius: 14px;
    }

    .task-text {
        font-size: 0.95rem;
    }

    .btn-finish {
        padding: 15px;
        font-size: 1.1rem;
        margin-top: 30px;
    }
    
    #close-drawer {
        padding: 12px !important;
        font-size: 0.95rem !important;
    }

    /* Welcome Overlay */
    .welcome-content {
        padding: 40px 20px;
        width: 92%;
        border-radius: 20px;
    }

    .welcome-title {
        font-size: 1.8rem;
    }

    .welcome-desc {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .btn-start-journey {
        padding: 12px 30px;
        font-size: 1.1rem;
        width: 100%;
    }
    
    /* Popups */
    .popup-card {
        padding: 30px 20px;
        border-radius: 20px;
    }

    #popup-title {
        font-size: 1.8rem;
    }
    
    #popup-desc {
        font-size: 1.2rem;
    }
    
    .popup-icon {
        font-size: 3.5rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 400px) {
    .app-title {
        font-size: 1.6rem;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .level-display {
        font-size: 1rem !important;
    }
    
    .app-stats button {
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
    }
}

/* =========================================
   🚀 New Feature 1: Career Paths
   ========================================= */
.paths-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
@media (max-width: 900px) {
    .paths-grid {
        grid-template-columns: 1fr;
    }
}
.path-card {
    background: linear-gradient(135deg, rgba(22, 26, 46, 0.8), rgba(30, 35, 61, 0.8));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}
.path-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}
.path-card.active-path {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}
.path-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.path-name {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
}
.path-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 15px;
    font-weight: 700;
}
.path-level {
    color: #f59e0b;
}

/* =========================================
   💼 New Feature 2: Portfolio Modal
   ========================================= */
.portfolio-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 4000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.portfolio-modal.active {
    opacity: 1;
    visibility: visible;
}
.portfolio-content {
    background: var(--card-bg);
    border: 1px solid var(--primary);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    text-align: right;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.4);
}
.close-portfolio {
    position: absolute;
    top: 20px; left: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 35px; height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.close-portfolio:hover {
    background: rgba(239, 68, 68, 0.8);
}
.cv-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
}
.cv-section h4 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 800;
}
.cv-text {
    color: var(--text-dim);
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.6;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    direction: ltr; /* Good for code/mixed content */
    text-align: left;
}
.cv-text.rtl-text {
    direction: rtl;
    text-align: right;
}
.btn-copy {
    position: absolute;
    top: 20px; left: 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: 0.2s;
}
.btn-copy:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* =========================================
   🎓 New Feature 3: Smart Learning System
   ========================================= */
.mode-toggle {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.5);
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
    font-size: 0.9rem;
}
.mode-toggle.pro {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.5);
}

.beginner-only {
    display: inline-block;
}
body.pro-mode .beginner-only {
    display: none !important;
}

.btn-help {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    margin-right: auto;
}
.btn-help:hover {
    background: rgba(59, 130, 246, 0.4);
}

.btn-starter {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    width: 100%;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.btn-starter:hover {
    background: rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

.btn-feedback {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.btn-feedback:hover {
    background: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.hint-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: 0.3s;
}
.hint-box:hover {
    background: rgba(255,255,255,0.08);
}
.hint-content {
    display: none;
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 0.95rem;
    padding-top: 10px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    direction: rtl;
    text-align: right;
}
.code-block {
    background: #0d0f1f;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #a5b4fc;
    direction: ltr;
    text-align: left;
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}