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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-container a {
    text-decoration: none;
    color: #333;
    font-size: 20px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.logo-container a:hover {
    color: #667eea;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a.active {
    color: #667eea;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3498db;
    border-radius: 2px;
}

main {
    flex: 1;
    padding: 40px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.page-subtitle span {
    font-weight: 700;
    color: #3498db;
    font-size: 18px;
}

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

.search-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

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

.search-box button {
    padding: 15px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box button svg {
    width: 20px;
    height: 20px;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.category-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.filter-btn {
    padding: 10px 28px;
    border: 2px solid #e9ecef;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #6c757d;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #3498db 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.filter-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

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

.database-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.database-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #3498db 50%, #667eea 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.database-card:hover::before {
    transform: scaleX(1);
}

.database-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.database-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.database-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.database-card:hover .database-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.database-name {
    font-size: 19px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.database-card:hover .database-name {
    color: #667eea;
}

.database-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.database-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.tag {
    padding: 6px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.database-card:hover .tag {
    background: linear-gradient(135deg, #667eea 0%, #3498db 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.no-results svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results p {
    font-size: 18px;
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 20px;
    background: white;
    color: #333;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 50px;
}

.page-btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.page-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.page-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 25px;
    margin-top: auto;
}

footer p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

footer p:first-child {
    font-weight: 600;
    color: #333;
}

@media (max-width: 768px) {
    .header-content {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 14px;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        width: 100%;
        justify-content: center;
    }
    
    .category-filter {
        gap: 8px;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 18px;
        font-size: 13px;
    }
    
    .database-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .database-card {
        padding: 20px;
    }
    
    .database-icon {
        width: 40px;
        height: 40px;
    }
    
    .database-header {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 30px 15px;
    }
    
    .search-section {
        padding: 15px;
    }
    
    .database-name {
        font-size: 16px;
    }
    
    .database-description {
        font-size: 13px;
    }
}