/* Home Page Styles */

/* Hero Search Section - Google Style */
.hero-search {
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 2rem 0;
}

.search-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease-out;
}

.search-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    animation: fadeInDown 0.6s ease-out 0.1s backwards;
}

.search-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease-out 0.2s backwards;
}

.search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 2.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    outline: none;
    transition: all 0.2s ease;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-btn {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.4rem 1rem;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.813rem;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: var(--secondary-color);
}

/* Search Autocomplete Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-result-item:hover {
    background: var(--light-gray);
}

.search-result-item:last-child {
    border-bottom: none;
    border-radius: 0 0 24px 24px;
}

.search-result-type {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.688rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.6rem;
}

.search-result-type.original {
    background: #dbeafe;
    color: var(--secondary-color);
}

.search-result-type.cover {
    background: #fed7aa;
    color: #f59e0b;
}

.search-result-type.tag {
    background: #dcfce7;
    color: #16a34a;
}

/* Tag result item with colored icon */
.search-result-item[data-type="tag"] {
    display: flex;
    align-items: center;
}

.search-result-item[data-type="tag"] .bi-tag-fill {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.search-result-item[data-type="tag"]:hover .bi-tag-fill {
    transform: scale(1.1);
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    font-size: 0.875rem;
}

.search-result-subtitle {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin: 0.2rem 0 0 0;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: #64748b;
}

.search-no-results i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.search-loading {
    padding: 2rem;
    text-align: center;
    color: var(--primary-color);
}

.search-loading .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Charts Section */
.charts-section {
    padding: 3rem 0;
    background: white;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
    text-align: center;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
}

.chart-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
    transition: all 0.2s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.chart-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.chart-icon.weekly {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.chart-icon.monthly {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

.chart-icon.new {
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.chart-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.813rem;
}

.chart-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.chart-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    color: var(--dark-color);
    justify-content: space-between;
    font-size: 0.813rem;
}

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

.chart-list .rank {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.75rem;
    min-width: 20px;
    font-size: 0.75rem;
}

.chart-item-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.vote-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vote-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    font-size: 0.813rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.vote-btn:hover {
    background: var(--light-gray);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.vote-btn.active-up {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.vote-btn.active-down {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.vote-count {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    color: var(--dark-color);
    font-size: 0.75rem;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--light-gray);
    color: var(--dark-color);
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.813rem;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    .search-title {
        font-size: 1.5rem;
    }

    .search-logo {
        font-size: 2.5rem;
    }

    .chart-card {
        margin-bottom: 1rem;
    }

    .hero-search {
        min-height: 45vh;
    }

    .search-input {
        font-size: 0.75rem;
    }

    .search-input::placeholder {
        font-size: 0.75rem;
    }

    .search-results {
        margin-top: 0.75rem;
    }
}

@media (max-width: 576px) {
    .search-input {
        font-size: 0.688rem;
        padding: 0.625rem 2.5rem 0.625rem 2.25rem;
    }

    .search-input::placeholder {
        font-size: 0.688rem;
    }

    .search-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.875rem;
    }
}
