/* ========================================
   AI Skills Navigation - Custom Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --dark: #0f172a;
    --card: #1e293b;
    --card-hover: #273549;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a2e 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hide scrollbar for horizontal scroll */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Navigation Link */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

/* Skill Card */
.skill-card {
    position: relative;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.25);
}

.skill-card:hover::before {
    opacity: 1;
}

/* Skill Card Icon */
.skill-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
}

/* Skill Card Title */
.skill-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-name-cn {
    color: white;
}

.skill-name-en {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 400;
}

/* Skill Card Description */
.skill-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Skill Card Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.25);
    color: white;
}

/* Skill Card Badges */
.skill-badges {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.skill-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.skill-badge.featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.skill-badge.new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.skill-badge.hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Category Tab */
.category-tab {
    transition: all 0.3s ease;
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px -3px rgba(99, 102, 241, 0.4);
}

/* Sort Button */
.sort-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Modal Styles */
#skillModal {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#modalContent {
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header */
.modal-header {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 2rem;
}

/* Scenario List */
.scenario-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.scenario-item {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Trigger Keywords */
.trigger-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trigger-item {
    padding: 0.375rem 0.875rem;
    background: var(--dark);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'SF Mono', Monaco, monospace;
}

/* Action Buttons */
.modal-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.action-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 0.875rem;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.5);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Back to Top */
#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-4px);
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Search Highlight */
.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    border-radius: 0.25rem;
    padding: 0 0.25rem;
}

/* Category Colors */
.category-ai-agent { background: rgba(99, 102, 241, 0.2); }
.category-dev-tools { background: rgba(16, 185, 129, 0.2); }
.category-data-analysis { background: rgba(245, 158, 11, 0.2); }
.category-content-creation { background: rgba(236, 72, 153, 0.2); }
.category-security { background: rgba(239, 68, 68, 0.2); }
.category-efficiency { background: rgba(139, 92, 246, 0.2); }
.category-social-media { background: rgba(6, 182, 212, 0.2); }
.category-enterprise { background: rgba(20, 184, 166, 0.2); }
.category-platform-integration { background: rgba(249, 115, 22, 0.2); }

/* Responsive Adjustments */
@media (max-width: 640px) {
    .skill-card {
        padding: 1.25rem;
    }
    
    .skill-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-actions {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Pagination */
.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.4);
}

.pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}
