/* Search page specific styles */

.search-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Welcome section */
.welcome-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.stat-item strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-item span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Search section */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.search-box {
    position: relative;
    max-width: 600px;
}

#cardSearch {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#cardSearch:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

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

/* Browse section */
.browse-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.browse-section h3 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.category-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.card-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.card-list li:last-child {
    border-bottom: none;
}

.card-list a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    flex-grow: 1;
}

.card-list a:hover {
    color: #3498db;
}

.comment-count, .rating, .date {
    font-size: 0.85rem;
    color: #666;
    margin-left: 0.5rem;
}

.rating {
    color: #f39c12;
}

.view-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.view-more:hover {
    text-decoration: underline;
}

/* All cards section */
.all-cards-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.all-cards-section h3 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.alphabet-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background: white;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
}

.alphabet-link:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.letter-section {
    margin-bottom: 2rem;
}

.letter-header {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.cards-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.card-item {
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.2s;
}

.card-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.card-link {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
}

.card-name {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.card-meta {
    font-size: 0.85rem;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        min-width: auto;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .alphabet-nav {
        gap: 0.25rem;
    }

    .alphabet-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .cards-columns {
        grid-template-columns: 1fr;
    }
}

/* Smooth scrolling for alphabet navigation */
html {
    scroll-behavior: smooth;
}
