/* ========================================
   PROFESSIONAL ENHANCEMENTS
   Progress Bar + Space Background + Modal + Carousel
   ======================================== */

/* ========================================
   ANIMATED SPACE BACKGROUND (ENHANCED)
   ======================================== */

body {
    position: relative;
    background: #0a0a0a;
    overflow-x: hidden;
}

/* Animated stars background - Enhanced visibility */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        /* Bright stars */
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(1px 1px at 60px 70px, white, transparent),
        radial-gradient(3px 3px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent),
        radial-gradient(1px 1px at 150px 120px, white, transparent),
        radial-gradient(2px 2px at 180px 40px, white, transparent),
        radial-gradient(3px 3px at 110px 150px, white, transparent),
        /* Additional star layer */
        radial-gradient(1px 1px at 40px 100px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 170px 20px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 10px 140px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 190px 90px, white, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.8;
    animation: twinkle 200s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* Moving gradient overlay - Enhanced */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%,
            rgba(59, 130, 246, 0.18) 0%,
            transparent 50%),
        radial-gradient(circle at 80% 80%,
            rgba(139, 92, 246, 0.15) 0%,
            transparent 50%),
        radial-gradient(circle at 50% 20%,
            rgba(59, 130, 246, 0.12) 0%,
            transparent 50%),
        radial-gradient(circle at 40% 90%,
            rgba(236, 72, 153, 0.08) 0%,
            transparent 50%);
    animation: moveGradient 30s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes moveGradient {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(5%, -5%) rotate(120deg);
    }

    66% {
        transform: translate(-5%, 5%) rotate(240deg);
    }
}

/* ========================================
   GRADUATION PROGRESS BAR
   ======================================== */

.progress-widget {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(31, 31, 31, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 500px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-percentage {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-track {
    position: relative;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 55.6%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    transition: width 1s ease-out;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 55.6%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
    border-radius: 10px;
    animation: progressShine 3s ease-in-out infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-detail {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.progress-expand {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    transition: all 0.2s ease;
}

.progress-expand:hover {
    color: var(--primary-light);
    transform: scale(1.1);
}

/* ========================================
   PROGRESS MODAL
   ======================================== */

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

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

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.progress-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 1.5rem;
    color: var(--primary);
}

.progress-stat-card .stat-info {
    display: flex;
    flex-direction: column;
}

.progress-stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-timeline {
    position: relative;
}

.progress-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 4rem;
    padding-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 1;
}

.timeline-item.completed .timeline-marker {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.timeline-item.current .timeline-marker {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

.timeline-item.upcoming .timeline-marker {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-tertiary);
}

.timeline-content h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ========================================
   AUTO-SCROLLING TECH CAROUSEL
   ======================================== */

.tech-carousel-container {
    width: 100%;
    overflow: hidden;
    margin-top: 3rem;
    position: relative;
    padding: 2rem 0;
}

.tech-carousel-container::before,
.tech-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tech-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.tech-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

.tech-carousel {
    display: flex;
    gap: 2rem;
    animation: scroll-left 40s linear infinite;
    width: fit-content;
}

.tech-carousel:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.tech-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 150px;
    transition: all 0.3s ease;
}

.tech-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    background: var(--bg-secondary);
}

.tech-icon {
    font-size: 3rem;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.tech-item:hover .tech-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.tech-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* ========================================
   COMMUNITY & FORUMS SECTION
   ======================================== */

.forum-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.forum-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.forum-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.forum-image-container {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.forum-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.forum-card:hover .forum-image {
    transform: scale(1.05);
}

.forum-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.forum-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.forum-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex: 1;
}

.forum-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

@media (max-width: 768px) {
    .forum-grid {
        grid-template-columns: 1fr;
    }
    
    .forum-image-container {
        height: 200px;
    }
}