:root {
    --primary-color: #e74c3c;
    --primary-hover: #c0392b;
    --secondary-color: #34495e;
    --secondary-hover: #2c3e50;
    --background: #ecf0f1;
    --surface: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border: #bdc3c7;
    --success: #27ae60;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* モード選択 */
.mode-selector {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

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

.mode-btn svg {
    width: 24px;
    height: 24px;
}

/* モードコンテンツ */
.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

/* アップロードエリア */
.upload-area {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

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

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

.upload-area svg {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.upload-area p {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.upload-area .small {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-label {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
}

/* ファイルリスト */
.file-list {
    margin-bottom: 30px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.file-name {
    flex: 1;
    font-weight: 500;
    margin-right: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 20px;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.move-btn, .remove-btn {
    padding: 5px 10px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.move-btn:hover:not(:disabled) {
    background: var(--background);
}

.move-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.remove-btn {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* 分割プレビュー */
.split-preview {
    background: var(--surface);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.split-preview h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.split-info {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
}

.split-info p {
    margin-bottom: 10px;
}

.split-info span {
    font-weight: 600;
    color: var(--primary-color);
}

.split-options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    display: inline-block;
    margin-left: 10px;
    font-weight: 500;
    cursor: pointer;
}

.range-input, .interval-input {
    margin-top: 15px;
    margin-left: 30px;
}

.range-input input, .interval-input input {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
    width: 300px;
    max-width: 100%;
}

.range-input small, .interval-input small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.primary-btn, .secondary-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.primary-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.secondary-btn:hover:not(:disabled) {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(52, 73, 94, 0.3);
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 進捗表示 */
.progress {
    margin: 40px 0;
    text-align: center;
}

.progress-bar {
    background: var(--background);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* 結果表示 */
.results {
    background: var(--surface);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 40px;
}

.results h3 {
    margin-bottom: 20px;
    color: var(--success);
    text-align: center;
}

#download-links {
    display: grid;
    gap: 15px;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--background);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.download-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.download-link svg {
    flex-shrink: 0;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .mode-selector {
        flex-direction: column;
        width: 100%;
    }
    
    .mode-btn {
        width: 100%;
        justify-content: center;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .file-item {
        flex-wrap: wrap;
    }
    
    .file-name {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        justify-content: center;
    }
    
    .range-input input, .interval-input input {
        width: 100%;
    }
}