/* 高度な機能用CSS */

/* 検索・フィルターバー */
.search-filter-bar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(255, 20, 147, 0.2);
}

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

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #ff1493;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #ff69b4;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
}

.search-box button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 20, 147, 0.5);
}

/* ソートボタン */
.sort-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.sort-btn, .genre-filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 20, 147, 0.3);
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.sort-btn:hover, .genre-filter-btn:hover {
    background: rgba(255, 20, 147, 0.2);
    border-color: #ff1493;
}

.sort-btn.active, .genre-filter-btn.active {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    border-color: #ff1493;
    transform: scale(1.05);
}

/* 結果表示 */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    color: #aaa;
}

#no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    display: none;
}

#no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* お気に入りボタン */
.favorite-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ff1493;
    padding: 10px 20px;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.favorite-btn:hover {
    background: rgba(255, 20, 147, 0.2);
    transform: scale(1.05);
}

.favorite-btn.active {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    border-color: #ff1493;
}

/* お気に入りモーダル */
.favorites-modal, .review-modal, .reviews-list-modal, .history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.favorites-modal-content, .review-modal-content, .reviews-list-content, .history-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(255, 20, 147, 0.3);
}

.favorites-header, .review-header, .reviews-header, .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid rgba(255, 20, 147, 0.3);
}

.favorites-header h2, .review-header h2, .reviews-header h2, .history-header h2 {
    color: #ff1493;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #ff1493;
    transform: rotate(90deg);
}

/* お気に入りリスト */
.favorites-list, .history-list {
    padding: 20px;
}

.favorite-item, .history-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.favorite-item:hover, .history-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.favorite-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.favorite-info, .history-info {
    flex: 1;
}

.favorite-info h3, .history-info h4 {
    color: #fff;
    margin: 0 0 10px 0;
}

.favorite-info p, .history-info p {
    color: #aaa;
    margin: 5px 0;
}

.favorite-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.view-btn, .remove-favorite {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.view-btn {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
}

.remove-favorite {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* レビュー投稿フォーム */
.review-form {
    padding: 30px;
}

.rating-section, .review-categories, .comment-section, .tags-section {
    margin-bottom: 30px;
}

.rating-section label, .review-categories label, .comment-section label, .tags-section label {
    display: block;
    color: #ff1493;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 16px;
}

/* 星評価 */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 5px;
    cursor: pointer;
}

.star-rating .star {
    font-size: 36px;
    color: #333;
    transition: all 0.2s;
    cursor: pointer;
}

.star-rating .star.active,
.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #ffd700;
    transform: scale(1.1);
}

.star-rating.small .star {
    font-size: 24px;
}

.rating-text {
    margin-top: 10px;
    color: #aaa;
    font-size: 14px;
}

/* カテゴリ評価 */
.category-ratings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.category-item span {
    color: #fff;
    font-weight: bold;
}

/* コメント欄 */
#review-comment {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 20, 147, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

#review-comment:focus {
    outline: none;
    border-color: #ff1493;
    background: rgba(255, 255, 255, 0.1);
}

.char-count {
    text-align: right;
    color: #aaa;
    font-size: 12px;
    margin-top: 5px;
}

/* タグ選択 */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-checkbox {
    position: relative;
    cursor: pointer;
}

.tag-checkbox input {
    display: none;
}

.tag-checkbox span {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 20, 147, 0.3);
    border-radius: 20px;
    color: #fff;
    transition: all 0.3s;
    font-size: 14px;
}

.tag-checkbox input:checked + span {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    border-color: #ff1493;
    transform: scale(1.05);
}

/* フォームアクション */
.form-actions, .history-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 30px;
    border-top: 2px solid rgba(255, 20, 147, 0.3);
}

.cancel-btn, .submit-review-btn, .clear-history-btn {
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.submit-review-btn, .clear-history-btn {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
}

.submit-review-btn:hover, .clear-history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 20, 147, 0.5);
}

/* レビュー表示 */
.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.rating-display .stars {
    color: #ffd700;
    font-size: 18px;
}

.rating-display .rating-value {
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.rating-display .review-count {
    color: #aaa;
    font-size: 14px;
}

.write-review-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ff1493;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px 0;
}

.write-review-btn:hover {
    background: rgba(255, 20, 147, 0.2);
    transform: translateY(-2px);
}

/* レビューアイテム */
.reviews-list {
    padding: 20px;
}

.review-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 15px;
}

.review-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-rating .stars {
    color: #ffd700;
    font-size: 20px;
}

.review-date {
    color: #aaa;
    font-size: 12px;
}

.review-comment {
    color: #fff;
    line-height: 1.6;
    margin-bottom: 15px;
}

.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.review-tags .tag {
    padding: 5px 12px;
    background: rgba(255, 20, 147, 0.2);
    border: 1px solid rgba(255, 20, 147, 0.5);
    border-radius: 15px;
    color: #ff69b4;
    font-size: 12px;
}

.review-actions {
    display: flex;
    gap: 10px;
}

.helpful-btn, .delete-review-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.helpful-btn:hover, .delete-review-btn:hover {
    background: rgba(255, 20, 147, 0.2);
    border-color: #ff1493;
}

/* レコメンデーション */
.recommendations-section {
    margin: 40px 0;
}

.recommendations-section h3 {
    color: #ff1493;
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recommend-icon {
    font-size: 28px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* 通知 */
.notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(255, 20, 147, 0.5);
    transition: all 0.3s;
    z-index: 10001;
    font-weight: bold;
}

.notification.show {
    bottom: 30px;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .search-filter-bar {
        padding: 15px;
    }

    .search-box {
        flex-direction: column;
    }

    .sort-buttons {
        gap: 8px;
    }

    .sort-btn, .genre-filter-btn {
        font-size: 12px;
        padding: 8px 15px;
    }

    .favorites-modal-content, .review-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .favorite-item {
        flex-direction: column;
    }

    .favorite-item img {
        width: 100%;
        height: 150px;
    }

    .recommendations-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}
