/* Glassmorphism Base */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 16px 48px 0 rgba(99, 102, 241, 0.15),
        0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Gradient Background Animation */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 6s ease infinite;
}

/* Pulse Glow Animation */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Particles Background */
.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.6);
    border-radius: 50%;
    animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* Code Block Styling */
.code-block {
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid;
    border-image: linear-gradient(to bottom, #6366f1, #ec4899) 1;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    position: relative;
    overflow-x: auto;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.code-block code {
    color: #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-block .prompt {
    color: #8b5cf6;
    font-weight: bold;
}

.code-block .command {
    color: #22d3d8;
}

.code-block .output {
    color: #86efac;
}

/* Skill Card */
.skill-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

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

.skill-card .badge {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-card .install-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-card .install-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.skill-card .install-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Scroll Smooth */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6366f1, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #8b5cf6, #ec4899);
}

/* Nav Links Animation */
.nav-link {
    position: relative;
}

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

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

/* Example Box */
.example-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.example-header {
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b5cf6;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.example-content {
    padding: 16px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
    }

    .skill-card-header {
        flex-direction: column;
        text-align: center;
    }

    .skill-card-actions {
        justify-content: center;
    }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }
.stagger-9 { animation-delay: 0.9s; }
.stagger-10 { animation-delay: 1.0s; }

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.active {
    max-height: 400px;
}

/* Rating Stars */
.stars {
    color: #fbbf24;
}

/* Category Icon Hover */
.category-icon {
    transition: all 0.3s ease;
}

.skill-card:hover .category-icon {
    transform: scale(1.2) rotate(10deg);
}

/* Syntax Highlighting for Examples */
.keyword { color: #c084fc; }
.string { color: #86efac; }
.function { color: #60a5fa; }
.comment { color: #6b7280; font-style: italic; }
.variable { color: #fbbf24; }
