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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    color: #1f2937;
}

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

header {
    text-align: center;
    margin-bottom: 50px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-nav .nav-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.header-nav .nav-link:hover {
    background: #f3f4f6;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.logo h1 {
    font-size: 1.8rem;
    color: #1f2937;
}

.tagline {
    color: #6b7280;
    font-size: 1.1rem;
}

.section-group {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.section-header h2 {
    color: white;
}

.section-header .section-description {
    color: rgba(255, 255, 255, 0.9);
}

.section-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

#chatbots-section .section-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

#chatbots-section .section-icon {
    background: rgba(255, 255, 255, 0.2);
}

.getting-started-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 32px;
    color: white;
    position: relative;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.getting-started-banner.hidden {
    display: none;
}

.banner-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.banner-content {
    flex: 1;
}

.banner-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.banner-content p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

.banner-btn {
    background: white;
    color: #667eea;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.banner-btn-secondary {
    background: transparent;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.banner-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.banner-dismiss {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

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

@media (max-width: 600px) {
    .getting-started-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    
    .banner-dismiss {
        top: 8px;
        right: 8px;
    }
}

.section-header-text {
    flex: 1;
}

.section-header h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.section-description {
    font-size: 0.95rem;
    margin: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
}

.category-card.empty {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-card.empty:hover {
    transform: none;
    border-color: transparent;
}

.category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    opacity: 0.9;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #1f2937;
}

.category-card p {
    color: #6b7280;
    font-size: 0.95rem;
}

footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.error {
    text-align: center;
    color: #ef4444;
    padding: 40px;
}

/* Ad Section */
.ad-section {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
    position: relative;
}

.ad-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ad-banner img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.ad-content {
    flex: 1;
}

.ad-content strong {
    display: block;
    color: #0c4a6e;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.ad-content p {
    color: #0369a1;
    font-size: 0.9rem;
    margin: 0 0 8px 0;
}

.ad-link {
    color: #0284c7;
    font-size: 0.85rem;
    font-weight: 500;
}

.ad-label {
    position: absolute;
    top: 6px;
    right: 30px;
    font-size: 0.65rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    header {
        margin-bottom: 30px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .category-card {
        padding: 16px;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .ad-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .ad-banner img {
        width: 100%;
        max-width: 180px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px 10px;
    }
    
    header {
        margin-bottom: 24px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .tagline {
        font-size: 0.85rem;
    }
    
    .section-group {
        margin-bottom: 40px;
    }
    
    .section-header {
        padding: 16px;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .section-description {
        font-size: 0.85rem;
    }
    
    .category-card {
        padding: 14px;
    }
    
    .category-title {
        font-size: 1rem;
    }
    
    .category-description {
        font-size: 0.85rem;
    }
    
    .category-count {
        font-size: 0.8rem;
    }
    
    .global-search-box input {
        padding: 12px 45px 12px 16px;
        font-size: 1rem;
    }
}

/* Global Search */
.global-search-container {
    max-width: 600px;
    margin: 0 auto 40px auto;
    position: relative;
}

.global-search-box {
    position: relative;
}

.global-search-box input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.global-search-box input:focus {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.global-search-box input::placeholder {
    color: #9ca3af;
}

.global-search-box .search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    overflow: hidden;
    z-index: 100;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}

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

.search-result-item:hover {
    background: #f0f4ff;
}

.search-result-item .result-name {
    font-weight: 600;
    color: #1f2937;
}

.search-result-item .result-category {
    font-size: 0.85rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 8px;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

/* B|CHAT Link Styling */
.bchat-link {
    background: linear-gradient(135deg, #00d4aa, #00a884) !important;
    color: white !important;
}
