/* リセットと基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
}

/* ヘッダー */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

h1 {
    color: #2c3e50;
    font-size: 24px;
}

h2 {
    color: #34495e;
    font-size: 18px;
    margin-bottom: 15px;
}

/* ボタン */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.file-select-btn {
    background: #3498db;
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.file-select-btn:hover {
    background: #2980b9;
}

.logout-btn, .back-btn {
    background: #95a5a6;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

.refresh-btn {
    background: #95a5a6;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

/* アップロードエリア */
.upload-area {
    text-align: center;
    padding: 40px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.upload-area.drag-over {
    border-color: #3498db;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-or {
    color: #666;
    margin: 15px 0;
    font-size: 14px;
}

.file-info {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.upload-status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.upload-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.upload-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.upload-status.uploading {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* 処理状況 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.job-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.job-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.job-info {
    flex: 1;
}

.job-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.job-status {
    font-size: 14px;
    color: #666;
}

.job-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.processing-indicator {
    color: #f39c12;
    font-size: 14px;
    font-weight: bold;
}

.view-btn {
    background: #3498db;
    margin-right: 5px;
}

.download-btn {
    background: #27ae60;
    margin-right: 5px;
}

.retry-btn {
    background: #e67e22;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 11px;
    margin: 1px;
}

.status-completed { color: #27ae60; }
.status-processing { color: #f39c12; }
.status-error { color: #e74c3c; }
.status-transcribing { color: #9b59b6; }
.status-summarizing { color: #3498db; }
.status-analyzing { color: #1abc9c; }

.no-jobs {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* ジョブ情報表示 */
.job-info-display {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #90caf9;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: bold;
    color: #1565c0;
    min-width: 100px;
}

.info-value {
    color: #333;
    font-family: monospace;
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    flex: 1;
}

/* ダウンロードフォーム */
.download-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 10px;
}

.download-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #495057;
}

.job-id-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
}

.job-id-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 結果表示 */
.summary-content {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    white-space: pre-wrap;
    line-height: 1.8;
    border-left: 4px solid #28a745;
    min-height: 100px;
}

.transcript-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    white-space: pre-wrap;
    line-height: 1.8;
    min-height: 100px;
}

.sentiment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.sentiment-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.sentiment-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #495057;
}

.sentiment-score {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}
/*注意書き用セクション */
.notice-list {
    padding-left: 40px;
    margin-left: 20px;
}
.notice-list li {
    margin-bottom: 8px;
}


/* ダウンロードボタン */
.download-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.download-btn {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background: #218838;
}

.download-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.download-btn:disabled:hover {
    background: #6c757d;
}

.download-btn:not(:disabled):hover {
    background: #218838;
}

/* エラーメッセージ */
.error {
    color: #dc3545;
    font-style: italic;
}

/* ローディング */
.loading {
    color: #6c757d;
    font-style: italic;
}

/* プログレスバー */
.progress-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-clocks {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.clock-item {
    text-align: center;
    position: relative;
    flex: 1;
    max-width: 150px;
}

.clock-svg {
    width: 100px;
    height: 100px;
    transform: rotate(-90deg);
}

.clock-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 8;
}

.clock-progress {
    fill: none;
    stroke: #95a5a6;
    stroke-width: 8;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.clock-item.processing .clock-progress {
    stroke: #3498db;
    animation: rotate-clock 2s linear infinite;
}

.clock-item.completed .clock-progress {
    stroke: #2ecc71;
    stroke-dashoffset: 0;
}

@keyframes rotate-clock {
    0% { stroke-dashoffset: 283; }
    50% { stroke-dashoffset: 141; }
    100% { stroke-dashoffset: 283; }
}

.clock-icon {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
}

.clock-label {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.clock-status {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .sentiment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .upload-area {
        padding: 20px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .progress-steps {
        flex-wrap: wrap;
    }
    
    .step {
        flex: 0 0 33%;
        margin-bottom: 10px;
    }
}