/* search.php専用CSS */

/* 検索セクション */
.search-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.search-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.search-subtitle {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-input {
    border-radius: 0;
    border-right: none;
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border: none;
}

.search-input:focus {
    border-color: #28a745;
    box-shadow: none;
    outline: none;
}

.search-btn {
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(45deg, #218838, #1ea083);
    transform: translateY(-1px);
    color: white;
}

.search-options {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* 人気キーワード */
.popular-keywords {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.keyword-tag {
    background: white;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.keyword-tag:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    text-decoration: none;
}

/* 検索結果セクション */
.results-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.results-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.results-subtitle {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

.active-filters {
    margin-top: 1rem;
}

.active-filters .badge {
    margin: 0 0.25rem;
    font-size: 0.75rem;
}

/* 検索結果なし */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #495057;
}

.no-results-suggestions ul {
    text-align: left;
    display: inline-block;
    margin: 0;
    color: #6c757d;
}

.no-results-suggestions li {
    margin-bottom: 0.5rem;
}

.suggested-keywords {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: inline-block;
    border: 1px solid #e9ecef;
}

/* 検索結果アイテム */
.search-result-item {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

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

.result-content {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
}

.result-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-result-item:hover .result-icon {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.result-details {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.result-link {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-link:hover {
    color: #007bff;
    text-decoration: none;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.result-meta > span,
.result-meta > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.result-category {
    text-decoration: none;
}

.result-category:hover .category-badge {
    opacity: 0.8;
    transform: scale(1.05);
}

.result-snippet {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* スレ作成日の特別スタイル */
.result-thread-date {
    background-color: #e7f3ff;
    color: #0066cc;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    border: 1px solid #b3d9ff;
    font-size: 0.8rem !important;
}

/* 検索ハイライト */
.search-highlight {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    color: #856404;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ページネーション */
.pagination-nav {
    padding: 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .search-header, .results-header {
        padding: 1rem;
        text-align: center;
    }
    
    .search-title {
        font-size: 1.5rem;
    }
    
    .results-title {
        font-size: 1.25rem;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 0;
    }
    
    .search-input {
        border-radius: 0.5rem 0.5rem 0 0;
        border-right: 1px solid #ced4da;
        border-bottom: none;
    }
    
    .search-btn {
        border-radius: 0 0 0.5rem 0.5rem;
        width: 100%;
    }
    
    .search-options .row {
        flex-direction: column;
    }
    
    .search-options .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .search-options .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    .result-content {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .result-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
    
    .result-title {
        font-size: 1.1rem;
    }
    
    .result-meta {
        font-size: 0.8rem;
        gap: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-meta > span,
    .result-meta > a {
        margin-bottom: 0.25rem;
    }
    
    .keyword-tags {
        justify-content: center;
        gap: 0.25rem;
    }
    
    .keyword-tag {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
    
    .no-results {
        padding: 2rem 1rem;
    }
    
    .no-results-suggestions ul {
        text-align: center;
    }
    
    .search-result-item:hover {
        transform: none;
    }

    .result-thread-date {
        font-size: 0.7rem !important;
        padding: 0.1rem 0.3rem;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    animation: fadeInUp 0.4s ease;
}

.search-result-item:nth-child(1) { animation-delay: 0.1s; }
.search-result-item:nth-child(2) { animation-delay: 0.2s; }
.search-result-item:nth-child(3) { animation-delay: 0.3s; }
.search-result-item:nth-child(4) { animation-delay: 0.4s; }
.search-result-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.search-btn:active {
    animation: pulse 0.3s ease;
}