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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 16px;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-box {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-box:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.upload-box.dragover {
    border-color: #667eea;
    background: #f5f7ff;
    transform: scale(1.02);
}

.upload-content svg {
    color: #667eea;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-subtext {
    color: #999;
    font-size: 14px;
}

.file-info {
    background: #f5f7ff;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-details svg {
    color: #667eea;
    flex-shrink: 0;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    word-break: break-all;
}

.file-pages {
    color: #666;
    font-size: 14px;
}

.remove-btn {
    background: #ff4757;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #ee2f3d;
    transform: scale(1.1);
}

.range-section {
    margin-bottom: 30px;
}

.range-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 15px;
}

.input-field {
    flex: 1;
}

.input-field label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.input-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.input-field input:focus {
    outline: none;
    border-color: #667eea;
}

.input-separator {
    color: #999;
    font-weight: 500;
    padding-bottom: 12px;
}

.range-info {
    padding: 12px 16px;
    background: #f5f7ff;
    border-radius: 8px;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
}

.range-info.error {
    background: #ffe0e0;
    color: #ff4757;
}

.action-section {
    margin-bottom: 20px;
}

.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

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

.progress-section {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.nav-links {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f7ff;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

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

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

.options-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.option-group {
    background: #f5f7ff;
    padding: 16px;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.slider-label {
    display: block;
    color: #333;
    font-size: 14px;
}

.slider-label > span:first-child {
    display: block;
    margin-bottom: 12px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.slider-value {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: #667eea;
}

.preview-section {
    margin-top: 30px;
}

.preview-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editable-hint {
    font-size: 14px;
    font-weight: 400;
    color: #667eea;
    background: #f5f7ff;
    padding: 4px 10px;
    border-radius: 6px;
}

.text-stats {
    background: #f5f7ff;
    padding: 12px 16px;
    border-radius: 8px;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
}

.text-preview {
    width: 100%;
    min-height: 300px;
    max-height: 500px;
    padding: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 15px;
}

.text-preview:focus {
    outline: none;
    border-color: #667eea;
}

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

.btn-secondary {
    flex: 1;
    padding: 12px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #f5f7ff;
    transform: translateY(-1px);
}

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

@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .upload-box {
        padding: 40px 20px;
    }

    .input-group {
        flex-direction: column;
        gap: 15px;
    }

    .input-separator {
        padding: 0;
    }

    .preview-actions {
        flex-direction: column;
    }

    .btn-secondary {
        width: 100%;
    }
}

