/* リセットと基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Yu Gothic', 'Hiragino Sans', sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    line-height: 1.6;
}

/* メインコンテナ */
.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* タイトル */
h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 15px;
}

/* 説明セクション */
.instructions-section {
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    border: 1px solid #c8e6c9;
}

.instructions-section h2 {
    font-size: 18px;
    color: #2e7d32;
    margin-bottom: 15px;
    border-bottom: 1px solid #a5d6a7;
    padding-bottom: 8px;
}

.instruction-step {
    margin-bottom: 15px;
}

.instruction-step h3 {
    font-size: 15px;
    color: #388e3c;
    margin-bottom: 5px;
}

.instruction-step ul {
    list-style-type: disc;
    margin-left: 20px;
    font-size: 14px;
    color: #555;
}

.instruction-step p {
    font-size: 14px;
    color: #555;
}

.instruction-note {
    font-size: 13px;
    padding: 10px;
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #e65100;
    margin-top: 10px;
}

/* アップロードエリア */
.upload-area {
    border: 3px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #fafafa;
    margin-bottom: 30px;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area.dragover {
    border-color: #4CAF50;
    background-color: #e8f5e9;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
    margin-bottom: 10px;
    font-size: 16px;
}

.upload-or {
    font-size: 14px;
    color: #999;
    margin: 10px 0;
}

.select-folder-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.select-folder-btn:hover {
    background-color: #1976D2;
}

/* ファイルリスト */
.file-list {
    margin-top: 20px;
    text-align: left;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #eee;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 14px;
}

.file-item.valid {
    border-left: 4px solid #4CAF50;
}

.file-item.invalid {
    border-left: 4px solid #f44336;
    color: #999;
}

.file-status {
    margin-left: auto;
    font-size: 12px;
    font-weight: bold;
}

.status-ok {
    color: #4CAF50;
}

.status-error {
    color: #f44336;
}

/* 設定セクション */
.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.settings-section h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item {
    display: flex;
    flex-direction: column;
}

.setting-item label {
    font-weight: bold;
    color: #555;
    margin-bottom: 6px;
    font-size: 14px;
}

.setting-item input[type="number"] {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    max-width: 200px;
}

.setting-item input[type="number"]:focus {
    outline: none;
    border-color: #4CAF50;
}

.setting-item .hint {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
    font-style: italic;
}

/* 生成ボタン */
.generate-btn {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.generate-btn:hover {
    background-color: #45a049;
}

.generate-btn:active {
    background-color: #3d8b40;
    transform: translateY(1px);
}

/* メッセージエリア */
.message-area {
    margin-top: 20px;
    min-height: 50px;
}

.message {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

/* メッセージタイプ */
.message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.message.warning {
    background-color: #fff3e0;
    color: #e65100;
    border-left: 4px solid #e65100;
}

.message.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #1565c0;
}

/* その他のツールセクション */
.additional-tools {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.additional-tools h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
}

.tool-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: white;
}

.tool-card p {
    font-size: 14px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.tool-link-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: white;
    color: #667eea;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tool-link-btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* レスポンシブ対応 */
@media (max-width: 640px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 20px;
    }

    .generate-btn {
        padding: 12px;
        font-size: 14px;
    }
}
