/* 履歴画面のスタイル */
.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.history-container h2 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* 履歴フィルター */
.history-filter {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 履歴リスト */
#history-list {
    display: grid;
    gap: 1.5rem;
}

/* 履歴アイテム */
.history-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.history-item h3 {
    font-size: 1.25rem;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.history-date {
    color: #666;
    font-size: 0.875rem;
}

/* メタ情報タグ */
.history-item-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.meta-tag.framework {
    background-color: #e3f2fd;
    color: #1976d2;
}

.meta-tag.industry {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* アクションボタン */
.history-item-actions {
    display: flex;
    gap: 0.5rem;
}

.history-item-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view {
    background-color: #007bff;
    color: white;
}

.btn-view:hover {
    background-color: #0056b3;
}

.btn-download-ppt {
    background-color: #28a745;
    color: white;
}

.btn-download-ppt:hover {
    background-color: #218838;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* 空の状態 */
.empty-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    font-size: 1.125rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .history-container {
        padding: 1rem;
    }
    
    .history-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .history-item-actions {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .history-item-actions button {
        flex: 1;
        justify-content: center;
    }
    
    .history-filter .row {
        gap: 1rem !important;
    }
    
    .history-filter .col-md-2,
    .history-filter .col-md-3,
    .history-filter .col-md-4 {
        width: 100%;
    }
}

/* ローディングスピナー */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* フェードインアニメーション */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bootstrap互換クラス */
.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.btn {
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: white;
    background-color: #007bff;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.input-group {
    position: relative;
    display: flex;
    width: 100%;
}

.input-group-text {
    padding: 0.5rem 0.75rem;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-right: 0;
    border-radius: 0.375rem 0 0 0.375rem;
    color: #495057;
}

.form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0 0.375rem 0.375rem 0;
    width: 100%;
    font-size: 1rem;
}

.form-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    width: 100%;
    font-size: 1rem;
    cursor: pointer;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.row > * {
    padding: 0.5rem;
}

.col-md-2 {
    flex: 0 0 auto;
    width: 16.66667%;
}

.col-md-3 {
    flex: 0 0 auto;
    width: 25%;
}

.col-md-4 {
    flex: 0 0 auto;
    width: 33.33333%;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.bi {
    display: inline-block;
    vertical-align: -0.125em;
}

.w-100 {
    width: 100% !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}
/* 分析詳細モーダルのスタイル */
#analysisDetailModal .modal-dialog {
    max-width: 900px;
}

#analysisDetailModal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

#analysisDetailModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 1.5rem;
    border-bottom: none;
}

#analysisDetailModal .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

#analysisDetailModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

#analysisDetailModal .btn-close:hover {
    opacity: 1;
}

#analysisDetailModal .modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* 分析詳細コンテンツ */
.analysis-detail-content {
    font-size: 1rem;
    line-height: 1.8;
}

.analysis-detail-content h5 {
    color: #4a5568;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.analysis-detail-content h6 {
    color: #718096;
    font-weight: 500;
    margin-bottom: 1rem;
}

.analysis-detail-content .section-content {
    background-color: #f7fafc;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.analysis-detail-content ul {
    list-style: none;
    padding-left: 0;
}

.analysis-detail-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.analysis-detail-content ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.analysis-detail-content pre {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* スクロールバーのカスタマイズ */
#analysisDetailModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#analysisDetailModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#analysisDetailModal .modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

#analysisDetailModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* アニメーション */
#analysisDetailModal.fade .modal-dialog {
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease-out;
}

#analysisDetailModal.fade.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #analysisDetailModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    #analysisDetailModal .modal-body {
        padding: 1rem;
    }
    
    .analysis-detail-content .section-content {
        padding: 1rem;
    }
}