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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #a0a0a0;
    font-size: 1rem;
}

/* Upload Form */
.upload-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.85rem;
    color: #888;
}

.file-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(74, 158, 255, 0.2);
    border-radius: 8px;
}

.file-name {
    display: block;
    font-weight: 500;
    word-break: break-all;
}

.file-size {
    font-size: 0.85rem;
    color: #a0a0a0;
}

/* Input Group */
.input-group {
    margin: 20px 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: border-color 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4a9eff;
}

.input-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #888;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-option:hover {
    border-color: rgba(74, 158, 255, 0.5);
}

.mode-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.mode-option input[type="radio"]:checked + .mode-label {
    color: #4a9eff;
}

.mode-label {
    display: flex;
    flex-direction: column;
}

.mode-label strong {
    font-size: 1rem;
}

.mode-desc {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

/* Parts List */
.parts-list {
    margin: 15px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
}

.part-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

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

.part-name {
    color: #fff;
}

.part-duration {
    color: #4a9eff;
    font-weight: 500;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a9eff 0%, #1e6fff 100%);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Progress Section */
.progress-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff, #1e6fff);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    color: #a0a0a0;
}

/* Results Section */
.results-section {
    background: rgba(74, 158, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.success-header {
    margin-bottom: 20px;
}

.success-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.results-info {
    margin-bottom: 20px;
    color: #a0a0a0;
}

.results-info p {
    margin: 5px 0;
}

.download-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    border: none;
}

.download-btn:hover {
    transform: translateY(-2px);
}

.download-btn.primary {
    background: linear-gradient(135deg, #28a745 0%, #20873a 100%);
    color: #fff;
}

.download-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Error Section */
.error-section {
    background: rgba(255, 59, 48, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.error-section p {
    margin-bottom: 15px;
    color: #ff6b6b;
}

/* Footer */
footer {
    margin-top: auto;
    padding-top: 20px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
}
