/* 動画サムネイル生成ツール用スタイル */

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --border-color: #e5e7eb;
    --border-radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* メインコンテナ */
.main-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* カード共通スタイル */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* アップロードエリア */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f9fafb;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #dbeafe;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ビデオプレイヤー */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: auto;
    display: block;
}

/* ビデオコントロール */
.video-controls {
    padding: 1rem;
    background: #f9fafb;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.time-display {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #374151;
}

.seek-controls {
    margin-bottom: 1.5rem;
}

.seek-bar {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    border-radius: 4px;
    outline: none;
    margin-bottom: 1rem;
}

.seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.seek-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.frame-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.frame-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.capture-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* サムネイルギャラリー */
.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-height: 100px;
}

.thumbnail-item {
    position: relative;
    background: #f9fafb;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.thumbnail-image {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-info {
    padding: 0.5rem;
    background: white;
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.thumbnail-actions {
    display: flex;
    gap: 0.5rem;
}

.thumbnail-btn {
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.thumbnail-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.thumbnail-count {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 0.5rem;
}

.gallery-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 設定セクション */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.setting-select,
.setting-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    transition: border-color 0.3s;
}

.setting-select:focus,
.setting-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quality-control input {
    flex: 1;
}

.custom-size-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.size-input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.output-size-display {
    padding: 0.5rem;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

/* セクションタイトル */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ボタン */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: white;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 広告セクション */
.ad-section {
    background: white;
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .capture-controls {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}