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

/* 基本スタイル */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

.container {
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.header-controls {
    display: flex;
    gap: 1rem;
}

/* ボタン */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

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

.btn-primary {
    background-color: #3182ce;
    color: white;
}

.btn-primary:hover {
    background-color: #2c5aa0;
}

.btn-success {
    background-color: #38a169;
    color: white;
}

.btn-success:hover {
    background-color: #2f855a;
}

.btn-secondary {
    background-color: #718096;
    color: white;
}

.btn-secondary:hover {
    background-color: #4a5568;
}

.btn-danger-outline {
    background-color: #e53e3e;
    color: white;
}

.btn-danger-outline:hover {
    background-color: #c53030;
}

/* メインエリア */
.main {
    flex: 1;
    padding: 1rem 2rem;
    overflow: hidden;
}

/* 情報パネル */
.info-panel {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.grid-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grid-label {
    font-weight: 500;
    color: #4a5568;
}

.grid-value {
    color: #2d3748;
    font-weight: 600;
}

/* ズームコントロール */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.zoom-label {
    font-weight: 500;
    color: #4a5568;
}

.zoom-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f7fafc;
    padding: 0.25rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.btn-zoom {
    padding: 0.375rem 0.5rem;
    border: none;
    border-radius: 4px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-width: 2rem;
    height: 2rem;
}

.btn-zoom:hover {
    background: #3182ce;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.zoom-level {
    font-weight: 600;
    color: #2d3748;
    min-width: 3rem;
    text-align: center;
    font-size: 0.875rem;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* タイムラインコンテナ */
.timeline-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
}

.timeline-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* 縦軸時間表示 */
.time-axis-vertical {
    width: 100px;
    background: #f8f9fa;
    border-right: 2px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    z-index: 5;
}

/* 時間軸コンテンツ */
.time-axis-content {
    width: 100%;
    position: relative;
}

.time-label {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    color: #4a5568;
    font-weight: 500;
    background: rgba(248, 249, 250, 0.95);
    padding: 4px 6px;
    border-bottom: 1px solid #e2e8f0;
    transform: translateY(-50%);
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 1;
    top: 20px; /* 最小オフセットを設定して上部との重なりを防ぐ */
}

.time-label.major {
    font-weight: 700;
    color: #2d3748;
    background: rgba(248, 249, 250, 1);
    border-bottom: 3px solid #cbd5e0;
    font-size: 1rem;
    min-height: 28px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* メインタイムラインエリア */
.timeline-content {
    flex: 1;
    overflow: auto;
    position: relative;
    background: #ffffff;
}

#timeline-canvas {
    display: block;
    cursor: crosshair;
    background: #ffffff;
    min-height: 100%;
}

/* スクロールバーのカスタマイズ */
.timeline-content::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.timeline-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.timeline-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}

.timeline-content::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.timeline-content::-webkit-scrollbar-corner {
    background: #f1f5f9;
}

/* 敵攻撃モーダルのスクロールバー */
.enemy-modal-content::-webkit-scrollbar,
.attack-list::-webkit-scrollbar {
    width: 8px;
}

.enemy-modal-content::-webkit-scrollbar-track,
.attack-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.enemy-modal-content::-webkit-scrollbar-thumb,
.attack-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.enemy-modal-content::-webkit-scrollbar-thumb:hover,
.attack-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f7fafc;
    color: #2d3748;
}

.modal-body {
    padding: 1.5rem;
}

.enemy-modal-content .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

/* フォーム */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea {
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #718096;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.enemy-modal-content .form-actions {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    margin-top: 0;
}

/* スキル一覧 */
.skill-list {
    display: grid;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

/* プロジェクト一覧 */
.project-list {
    display: grid;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
}

.project-item {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
    position: relative;
}

.project-item:hover {
    border-color: #3182ce;
    background: #ebf8ff;
    transform: translateY(-1px);
}

.project-item.selected {
    border-color: #3182ce;
    background: #ebf8ff;
}

.project-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.project-description {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #a0aec0;
}

.project-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-stats {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-item:hover .project-actions {
    opacity: 1;
}

.action-btn {
    padding: 0.25rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.action-btn.delete {
    background: #fed7d7;
    color: #e53e3e;
}

.action-btn.delete:hover {
    background: #e53e3e;
    color: white;
}

.no-projects {
    text-align: center;
    padding: 3rem 1rem;
    color: #718096;
}

.no-projects i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.no-projects h3 {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.no-projects p {
    margin-bottom: 1.5rem;
}

/* スキル編集情報 */
.edit-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    color: #2c5aa0;
    font-size: 0.875rem;
}

.edit-info i {
    color: #3182ce;
    flex-shrink: 0;
}

.skill-item {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.skill-item:hover {
    border-color: #3182ce;
    background: #ebf8ff;
    transform: translateY(-1px);
}

.skill-item.selected {
    border-color: #3182ce;
    background: #ebf8ff;
}

.skill-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.skill-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #718096;
}

/* ローディング */
.loading {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.loading-content i {
    font-size: 1.25rem;
    color: #3182ce;
}

/* 通知 */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1500;
    background: #38a169;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease;
}

.notification.error {
    background: #e53e3e;
}

.notification.warning {
    background: #d69e2e;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ユーティリティ */
.hidden {
    display: none !important;
}

/* 敵攻撃モーダル専用スタイル */
.enemy-modal-content {
    max-width: 680px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.enemy-modal-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8f9fa;
}

.enemy-modal-section h3 {
    margin-bottom: 1rem;
    color: #2d3748;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.enemy-modal-section h3 i {
    color: #d69e2e;
}

.csv-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.csv-upload-area:hover {
    border-color: #3182ce;
    background: #ebf8ff;
}

.csv-upload-area.dragover {
    border-color: #3182ce;
    background: #ebf8ff;
    transform: scale(1.02);
}

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

.csv-upload-content i {
    font-size: 2.5rem;
    color: #cbd5e0;
    margin-bottom: 0.75rem;
    display: block;
}

.csv-upload-area:hover .csv-upload-content i {
    color: #3182ce;
}

.csv-upload-content h4 {
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-weight: 600;
}

.csv-upload-content p {
    color: #718096;
    margin-bottom: 0.5rem;
}

.csv-format-example {
    background: #f7fafc;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #4a5568;
    margin-top: 0.5rem;
    border: 1px solid #e2e8f0;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-btn {
    padding: 0.75rem 1.5rem;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.file-input-btn:hover {
    background: #2c5aa0;
    transform: translateY(-1px);
}

.csv-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.csv-preview-table th,
.csv-preview-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

/* FF14スキル取込モーダル専用スタイル */
.ff14-job-selection {
    margin-bottom: 2rem;
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.job-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 80px;
}

.job-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.job-btn i {
    font-size: 1.5rem;
}

.job-btn span {
    font-size: 0.875rem;
}

.import-status {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.status-message {
    margin: 0;
    color: #2d3748;
}

.status-message.success {
    color: #38a169;
}

.status-message.error {
    color: #e53e3e;
}

.status-message.loading {
    color: #d69e2e;
}

.import-options {
    margin-bottom: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #4299e1;
    cursor: pointer;
}

.checkmark, .radiomark {
    font-size: 0.875rem;
}

.separator {
    height: 1px;
    background-color: #e2e8f0;
    margin: 1rem 0;
}

/* インポート進行状況インジケーター */
.import-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: #edf2f7;
    border-radius: 6px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4a5568;
    text-align: center;
}

/* スキル統計情報 */
.skill-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4299e1;
}

.stat-label {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.25rem;
}

.csv-preview-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2d3748;
}

.csv-preview-table tbody tr:hover {
    background: #f7fafc;
}

.manual-input-grid {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.attack-list {
    max-height: 180px;
    overflow-y: auto;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.enemy-modal-section:last-of-type .attack-list {
    max-height: 150px;
}

.attack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.attack-item:last-child {
    border-bottom: none;
}

.attack-item:hover {
    background: #f7fafc;
}

.attack-info {
    flex: 1;
}

.attack-time {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.attack-name {
    color: #718096;
    font-size: 0.875rem;
}

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

.btn-warning {
    background-color: #d69e2e;
    color: white;
}

.btn-warning:hover {
    background-color: #b7791f;
}

.btn-danger {
    background-color: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background-color: #c53030;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.empty-attacks {
    padding: 2rem;
    text-align: center;
    color: #718096;
}

.empty-attacks i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
    display: block;
}

/* アニメーション */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .info-panel {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .main {
        padding: 1rem;
    }
    
    .timeline-container {
        height: calc(100vh - 250px);
    }
    
    .time-axis-vertical {
        width: 80px;
    }
    
    .time-label {
        font-size: 0.75rem;
        min-height: 20px;
    }
    
    .time-label.major {
        font-size: 0.875rem;
        min-height: 24px;
    }
    
    .zoom-controls {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .zoom-buttons {
        flex-wrap: nowrap;
    }
    
    .btn-zoom {
        padding: 0.25rem 0.375rem;
        min-width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
    }
    
    /* 敵攻撃モーダルのモバイル対応 */
    .enemy-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 0.25rem;
    }
    
    .enemy-modal-section {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .csv-upload-area {
        padding: 1rem;
    }
    
    .csv-upload-content i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .manual-input-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .attack-list {
        max-height: 120px;
    }
    
    .enemy-modal-section:last-of-type .attack-list {
        max-height: 100px;
    }
    
    .csv-preview-table {
        font-size: 0.875rem;
    }
    
    .csv-preview-table th,
    .csv-preview-table td {
        padding: 0.5rem;
    }
}

/* FF14スキル選択モーダル専用スタイル */
.skill-selection-controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* スキルタブ */
.skill-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skill-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.skill-tab:hover {
    border-color: #3182ce;
    background: #ebf8ff;
}

.skill-tab.active {
    border-color: #3182ce;
    background: #3182ce;
    color: white;
}

/* FF14フィルター */
.ff14-filters {
    animation: slideDown 0.3s ease;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-select,
.filter-input {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #3182ce;
}

.filter-status {
    font-size: 0.875rem;
    color: #718096;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    text-align: center;
}

/* スキルアイテムの拡張スタイル */
.skill-item.ff14-skill {
    border-left: 4px solid #4299e1;
}

.skill-item.local-skill {
    border-left: 4px solid #38a169;
}

.skill-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #a0aec0;
}

.skill-job {
    background: #edf2f7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4a5568;
}

.skill-type {
    background: #fef5e7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #d69e2e;
}

.skill-role {
    background: #e6fffa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #38a169;
}

.skill-source {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ff14-skill .skill-source {
    background: #ebf8ff;
    color: #3182ce;
}

.local-skill .skill-source {
    background: #f0fff4;
    color: #38a169;
}

/* 拡張スキル一覧 */
#skill-select-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* スキル選択モーダルのサイズ調整 */
.modal-content.skill-selection {
    max-width: 800px;
    width: 95%;
}

/* スキル詳細情報の改善 */
.skill-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #718096;
    align-items: center;
}

.skill-details span {
    white-space: nowrap;
}

/* ローディング状態 */
.skill-list-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: #718096;
}

.skill-list-loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

/* no-skillsスタイルの改善 */
.no-skills {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
}

.no-skills i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
    display: block;
}

.no-skills h3 {
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-size: 1.125rem;
}

.no-skills p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* アニメーション */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .skill-tabs {
        flex-direction: column;
    }
    
    .skill-tab {
        padding: 0.5rem 1rem;
        text-align: center;
    }
    
    .modal-content.skill-selection {
        width: 98%;
        max-width: none;
    }
    
    .skill-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .skill-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}