/* ================================
   Webburns Learn - Custom Styles
   ================================ */

/* CSS Variables */
:root {
    --neon-cyan: #00d4ff;
    --neon-magenta: #ff00ff;
    --neon-purple: #a855f7;
    --neon-blue: #3b82f6;
    --dark-bg: #0a0a0f;
    --dark-card: #12121a;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 4px;
}

/* ================================
   Glassmorphism
   ================================ */
.glass-nav {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* ================================
   Navigation
   ================================ */
.nav-link {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--neon-cyan);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-mobile {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 0;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-link-mobile:hover {
    color: var(--neon-cyan);
    padding-left: 0.5rem;
}

/* ================================
   Buttons
   ================================ */
.btn-glow {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: white;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
    color: white;
}

.btn-glow-lg {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.btn-glow-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.6);
    color: white;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: transparent;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* ================================
   Glow Effects
   ================================ */
.shadow-glow-cyan {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.text-glow-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.text-glow-purple {
    color: var(--neon-purple);
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.text-glow-magenta {
    color: var(--neon-magenta);
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

/* ================================
   Gradient Orbs (Hero Background)
   ================================ */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--neon-cyan);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--neon-purple);
    bottom: -150px;
    left: -150px;
    animation-delay: -2s;
}

.gradient-orb-3 {
    width: 400px;
    height: 400px;
    background: var(--neon-magenta);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(20px, -20px);
    }
    50% {
        transform: translate(-20px, 20px);
    }
    75% {
        transform: translate(20px, 20px);
    }
}

/* ================================
   Animations
   ================================ */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Scroll fade-in sections */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ================================
   Topic Items
   ================================ */
.topic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #e5e7eb;
    text-decoration: none;
    transition: all 0.3s ease;
}

.topic-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
}

.topic-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ================================
   Code Block
   ================================ */
.code-block {
    background: #0d1117;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.15);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-content {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-content code {
    font-family: 'Fira Code', monospace;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #9ca3af;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    color: var(--neon-cyan);
}

/* Syntax Highlighting */
.comment { color: #8b949e; font-style: italic; }
.keyword { color: #ff7b72; }
.string { color: #a5d6ff; }
.number { color: #79c0ff; }
.builtin { color: #d2a8ff; }
.function { color: #d2a8ff; }

/* Output Box */
.output-box {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    border: 2px solid #238636;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 16px;
}

.output-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(35, 134, 54, 0.15);
    border-bottom: 1px solid rgba(35, 134, 54, 0.3);
    font-size: 0.85rem;
    color: #4ade80;
    font-weight: 600;
}

.output-content {
    padding: 16px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #4ade80;
}

/* Result/Explanation Box */
.result-box {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.result-box h4 {
    color: var(--neon-cyan);
    margin-bottom: 12px;
}

/* Step-by-step explanation */
.step-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.step-list li {
    position: relative;
    padding-left: 48px;
    margin-bottom: 16px;
    counter-increment: step-counter;
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Try It Yourself Button */
.try-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid #4ade80;
    border-radius: 8px;
    color: #4ade80;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.try-btn:hover {
    background: rgba(74, 222, 128, 0.25);
    transform: translateY(-2px);
    color: #4ade80;
}

/* ================================
   Learning Path
   ================================ */
.path-step {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    position: relative;
}

.path-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 60px;
    width: 2px;
    height: calc(100% + 24px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
}

.path-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.path-content {
    flex: 1;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.path-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.path-badge.beginner {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.path-badge.intermediate {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.path-badge.advanced {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.path-badge.pro {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ================================
   Footer
   ================================ */
.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    transform: translateY(-3px);
}

.footer-link {
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--neon-cyan);
    padding-left: 5px;
}

/* ================================
   Particle Canvas
   ================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ================================
   Topic Page Specific
   ================================ */
.topic-hero {
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
}

.topic-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-item {
    display: block;
    padding: 10px 16px;
    color: #9ca3af;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-item:hover,
.sidebar-item.active {
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
    background: rgba(0, 212, 255, 0.05);
}

.content-section {
    scroll-margin-top: 100px;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.level-badge.beginner {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.level-badge.intermediate {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.level-badge.advanced {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Topic Card on topics.html */
.topic-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.topic-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.topic-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Filter Buttons */
.filter-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #9ca3af;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: white;
    border-color: transparent;
}

/* Search Input */
.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px 12px 44px;
    color: white;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .gradient-orb-1 {
        width: 300px;
        height: 300px;
    }
    
    .gradient-orb-2 {
        width: 250px;
        height: 250px;
    }
    
    .gradient-orb-3 {
        width: 200px;
        height: 200px;
    }
    
    .path-step {
        flex-direction: column;
        gap: 16px;
    }
    
    .path-step:not(:last-child)::before {
        display: none;
    }
    
    .code-content {
        font-size: 12px;
        padding: 16px;
    }
}