/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'ヒラギノ角ゴシック', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
.header {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.1em;
    color: #666;
}

/* ページナビゲーション */
.page-nav {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #5a67d8;
    border: 2px solid #5a67d8;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: #5a67d8;
    color: white;
}

.nav-link.active {
    background-color: #5a67d8;
    color: white;
}

/* フィルター */
.filters {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.talent-filter-section {
    margin-bottom: 20px;
}

.tag-filter-section {
    margin-bottom: 20px;
}

.date-filter-section {
    margin-bottom: 20px;
}

.date-filter-section > label,
.talent-filter-section > label,
.tag-filter-section > label,
.sort-section > label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.date-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-input-group label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.date-input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
}

.clear-date-btn {
    background: linear-gradient(45deg, #ffc107, #ffb300);
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-date-btn:hover {
    background: linear-gradient(45deg, #ffb300, #ff8f00);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* pr クラスの div タグを画面左上に表示 */
.pr {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 0.9em;
    opacity: 0; /* 初期状態で非表示 */
    animation: fadeInOut 10s ease-in-out infinite; /* アニメーションをループ */
    animation-delay: 5s; /* 5秒後に表示 */
}

.pr a {
    color: #bb4bac;
    text-decoration: none;
}

.pr a:hover {
    text-decoration: underline;
}

/* タグフィルター */
.tag-search-container {
    position: relative;
    margin-bottom: 15px;
}

.tag-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    background: white;
    outline: none;
    transition: border-color 0.3s ease;
}

.tag-search-input:focus {
    border-color: #667eea;
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tag-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-suggestion:hover {
    background: #f8f9fa;
}

.tag-suggestion:last-child {
    border-radius: 0 0 8px 8px;
}

.tag-suggestion-name {
    font-weight: 500;
}

.tag-suggestion-count {
    font-size: 0.8em;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    min-height: 20px;
}

.selected-tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.selected-tag:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
}

.selected-tag-remove {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.selected-tag-remove:hover {
    background: rgba(255, 255, 255, 0.5);
}

.clear-tags-btn {
    background: linear-gradient(45deg, #ffc107, #ffb300);
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-tags-btn:hover {
    background: linear-gradient(45deg, #ffb300, #ff8f00);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.talent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.filter-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-info span {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.talent-btn {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    color: #495057;
    border: 2px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.talent-btn:hover {
    background: linear-gradient(45deg, #e9ecef, #dee2e6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.talent-btn.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}

.talent-btn.selected:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.clear-all-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-all-btn:hover {
    background: linear-gradient(45deg, #ee5a52, #e04848);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-section select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    min-width: 120px;
}

.sort-section select:focus {
    outline: none;
    border-color: #667eea;
}

/* フィルタリング結果 */
.filter-results {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border-left: 4px solid #667eea;
}

.filter-results h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

.filter-results .result-summary {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.filter-results .talent-breakdown {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-results .talent-count {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

/* ローディング */
.loading {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* タイムライン */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 2px;
}

/* 動画アイテム */
.video-item {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    margin-left: 60px;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.video-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 20px;
    width: 14px;
    height: 14px;
    background: #667eea;
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.video-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    position: relative;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.video-title a:hover {
    color: #667eea;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #666;
}

.talent-name {
    font-weight: bold;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9em;
}

.upload-date {
    color: #888;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
}

.video-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: auto;
}

/* さらに読み込むボタン */
.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.load-more-btn:active {
    transform: translateY(0);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .filters {
        padding: 15px;
    }
    
    .talent-filter-section {
        margin-bottom: 15px;
    }
    
    .tag-filter-section {
        margin-bottom: 15px;
    }
    
    .date-filter-section {
        margin-bottom: 15px;
    }
    
    .date-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-input {
        min-width: 100%;
    }
    
    .sort-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .sort-section select {
        min-width: 100%;
    }
    
    .video-item {
        flex-direction: column;
        margin-left: 30px;
    }
    
    .video-item::before {
        left: -24px;
        top: 15px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .video-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .video-content {
        padding: 15px;
    }
    
    .video-title {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .video-item {
        margin-left: 20px;
    }
    
    .video-item::before {
        left: -14px;
        width: 10px;
        height: 10px;
        border-width: 2px;
    }
    
    .timeline::before {
        left: 10px;
        width: 2px;
    }
}

@keyframes fadeInOut {
    15%, 50% {
        opacity: 1; /* 表示状態 */
    }
    25%, 75% {
        opacity: 0; /* 非表示状態 */
    }
}