/* Navigation Directory Styles */
.nav-directory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #f5f7fa;
}

/* Header Section */
.nav-dir-header {
    text-align: center;
    margin-bottom: 30px;
}

.nav-dir-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Categories Navigation Wrapper */
.nav-dir-categories-wrapper {
    background: linear-gradient(135deg, #ff9a56 0%, #ffad7a 50%, #ffc09f 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 8px 32px rgba(255, 154, 86, 0.3);
}

.nav-dir-categories-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* Hot Icon */
.hot-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
    flex-shrink: 0;
}

.hot-text {
    color: #FF6B35;
    font-size: 12px;
    font-weight: bold;
    margin-top: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Categories */
.nav-dir-categories {
    flex: 1;
}

.categories-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.categories-row:last-child {
    margin-bottom: 0;
}

.nav-dir-category-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-dir-category-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    color: #333;
}

.nav-dir-category-btn.active,
.nav-dir-category-btn.hot-btn {
    background: #ff6b35;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

.nav-dir-category-btn.special-btn {
    background: linear-gradient(45deg, #ff6b35, #ff9a56);
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.nav-dir-category-btn.special-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav-dir-category-btn.special-btn:hover::before {
    left: 100%;
}

/* Loading */
.nav-dir-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Links Grid */
.nav-dir-content {
    margin-bottom: 40px;
}

.nav-dir-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav-dir-link-item {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-dir-link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #ff6b35;
}

.nav-dir-link {
    display: flex;
    align-items: center;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    gap: 12px;
}

.link-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.default-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.link-icon img + .default-icon {
    display: none;
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.link-description {
    font-size: 13px;
    color: #999;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty State */
.nav-dir-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.empty-icon {
    margin-bottom: 20px;
}

.nav-dir-empty h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 8px 0;
}

.nav-dir-empty p {
    font-size: 14px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-dir-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-directory-container {
        padding: 16px;
    }
    
    .nav-dir-title {
        font-size: 2em;
    }
    
    .nav-dir-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }
    
    .nav-dir-categories-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .hot-icon {
        flex-direction: row;
        gap: 8px;
        margin-top: 0;
    }
    
    .categories-row {
        gap: 6px;
        margin-bottom: 8px;
    }
    
    .nav-dir-category-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nav-dir-links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }
    
    .nav-dir-link {
        padding: 12px;
        gap: 10px;
    }
    
    .link-icon {
        width: 36px;
        height: 36px;
    }
    
    .default-icon {
        width: 36px;
        height: 36px;
    }
    
    .link-title {
        font-size: 14px;
    }
    
    .link-description {
        font-size: 12px;
    }
    
    .categories-row {
        gap: 4px;
    }
    
    .nav-dir-category-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Animation for category switching */
.nav-dir-links-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.nav-dir-links-grid.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

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

/* Additional styles for better visual appeal */
.nav-dir-categories-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    border-radius: 16px;
    pointer-events: none;
}

.nav-dir-links-grid {
    position: relative;
}

.nav-dir-links-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,107,53,0.2), transparent);
}