/* YouTube チャンネル動画検索 - カスタムスタイル */

:root {
    --primary-color: #ff0000;
    --secondary-color: #282828;
    --hover-color: #f9f9f9;
    --border-color: #e0e0e0;
    --highlight-color: #ffeb3b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    padding-bottom: 3rem;
}

.container {
    max-width: 1200px;
}

/* Header */
.header {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.header h1 {
    font-weight: 700;
    color: var(--secondary-color);
}

/* Search Container */
.search-container {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    padding: 1rem 0;
    z-index: 100;
}

.input-group-lg .form-control {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

#search-stats {
    font-size: 0.9rem;
}

/* Video Card */
.video-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-date {
    font-size: 0.85rem;
    color: #606060;
    margin-bottom: 0.5rem;
}

.video-description {
    font-size: 0.9rem;
    color: #606060;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Transcript Matches */
.transcript-matches {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.transcript-match {
    background-color: #f0f0f0;
    border-left: 3px solid var(--primary-color);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.transcript-match:hover {
    background-color: #e8e8e8;
}

.transcript-text {
    color: #333;
    line-height: 1.5;
}

.transcript-timestamp {
    color: #065fd4;
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Highlight */
.highlight {
    background-color: var(--highlight-color);
    font-weight: 600;
    padding: 0 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .video-card {
        margin-bottom: 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .video-title {
        font-size: 0.95rem;
    }
}

/* Loading & Error States */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

.alert {
    border-radius: 8px;
}

/* Transcript Preview Button */
.btn-transcript-preview {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    margin-top: 0.5rem;
}

/* Transcript Modal */
.transcript-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.transcript-modal-header img {
    width: 120px;
    border-radius: 4px;
}

.transcript-modal-header .video-info {
    flex: 1;
}

.transcript-modal-header .video-info h6 {
    margin-bottom: 0.25rem;
}

.transcript-list {
    max-height: 60vh;
    overflow-y: auto;
}

.transcript-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.transcript-item:hover {
    background-color: #f0f0f0;
}

.transcript-item .timestamp {
    color: #065fd4;
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 50px;
    flex-shrink: 0;
}

.transcript-item .text {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
}

.no-transcript-message {
    text-align: center;
    padding: 2rem;
    color: #666;
}
