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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255,255,255,0.2);
    padding: 15px 25px;
    border-radius: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    min-width: 120px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.search-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#search-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
}

#search-input:focus {
    outline: none;
    border-color: #6366f1;
}

.filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filters select, .filters button {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.filters select:hover, .filters button:hover {
    border-color: #6366f1;
}

#refresh-btn {
    background: #6366f1;
    color: white;
    border: none;
    transition: background-color 0.3s;
}

#refresh-btn:hover {
    background: #4f46e5;
}

.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: #6366f1;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.tab-button:hover:not(.active) {
    background: #f3f4f6;
    color: #374151;
}

.tab-content {
    min-height: 500px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #6b7280;
    font-size: 1.1rem;
}

.no-results {
    text-align: center;
    padding: 50px;
    color: #6b7280;
    font-size: 1.1rem;
    background: white;
    border-radius: 12px;
}

#skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.skill-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.skill-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.skill-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1f2937;
    flex: 1;
}

.skill-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.category-badge {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge {
    background: #d1fae5;
    color: #065f46;
}

.status-beta {
    background: #fef3c7;
    color: #92400e;
}

.status-deprecated {
    background: #fee2e2;
    color: #991b1b;
}

.skill-company {
    margin-bottom: 15px;
}

.company-name {
    color: #6b7280;
    font-weight: 500;
}

.skill-description {
    color: #4b5563;
    margin-bottom: 20px;
    line-height: 1.5;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.skill-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #6b7280;
}

.metric-icon {
    font-size: 1rem;
}

.metric-value {
    font-weight: 600;
    color: #374151;
}

.skill-capabilities {
    margin-bottom: 20px;
}

.capability-tag {
    display: inline-block;
    background: #ddd6fe;
    color: #5b21b6;
    padding: 4px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.skill-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.page-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* Trending Tab */
.timeframe-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.timeframe-btn {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.timeframe-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

#trending-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f3f4f6;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-rank {
    font-size: 2rem;
    font-weight: bold;
    color: #6366f1;
    min-width: 60px;
    text-align: center;
}

.trending-content h4 {
    color: #1f2937;
    margin-bottom: 5px;
}

.trending-company {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.trending-stats {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Companies Tab */
.company-category {
    margin-bottom: 40px;
}

.category-title {
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.company-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.company-card:hover {
    transform: translateY(-2px);
}

.company-card h4 {
    color: #1f2937;
    margin-bottom: 10px;
}

.company-description {
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.5;
}

.company-links {
    display: flex;
    gap: 10px;
}

.company-links a {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.company-links a:hover {
    text-decoration: underline;
}

/* API Tab */
.api-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.api-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.api-icon {
    font-size: 2rem;
}

.api-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1f2937;
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.api-endpoint {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.api-endpoint:hover {
    border-color: #6366f1;
    background: #f0f9ff;
    transform: translateY(-2px);
}

.method {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.method.get { background: #dcfce7; color: #166534; }
.method.post { background: #dbeafe; color: #1d4ed8; }
.method.put { background: #fed7d7; color: #b91c1c; }
.method.delete { background: #fee2e2; color: #dc2626; }

.endpoint-path {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1rem;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 600;
}

.endpoint-desc {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

.code-block {
    background: #1f2937;
    color: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    line-height: 1.6;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    color: #6b7280;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #374151;
}

.skill-detail-content {
    margin-top: 20px;
}

.skill-meta {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.skill-meta p {
    margin-bottom: 8px;
}

.capabilities-list, .chains-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chain-tag {
    background: #e0f2fe;
    color: #0e7490;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.skill-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Notifications */
.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.notification {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid #6366f1;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-left-color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
}

.notification-info {
    border-left-color: #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .header-stats {
        gap: 15px;
    }
    
    .stat {
        padding: 10px 15px;
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters select, .filters button {
        width: 100%;
    }
    
    #skills-container {
        grid-template-columns: 1fr;
    }
    
    .skill-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .skill-badges {
        flex-direction: row;
        gap: 8px;
    }
    
    .skill-metrics {
        justify-content: space-between;
    }
    
    .trending-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .trending-rank {
        min-width: auto;
    }
    
    .trending-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .notifications {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}