/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #000000;
    line-height: 1.5;
}

/* Simple Navigation */
.nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 0;
}

.logo {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 600;
}

.logo i {
    color: #dc2626;
}

/* Main Container */
.tool-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000000;
}

.header p {
    color: #666666;
    font-size: 1rem;
}

/* Upload Box */
.upload-box {
    border: 2px dashed #cccccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.upload-box:hover {
    border-color: #000000;
    background: #f5f5f5;
}

.upload-box i {
    font-size: 3rem;
    color: #666666;
    margin-bottom: 12px;
}

.upload-box h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #000000;
    font-weight: 500;
}

.upload-box p {
    color: #666666;
    margin: 10px 0;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
}

.btn-primary:hover {
    background: #333333;
}

.btn-success {
    background: #059669;
    color: #ffffff;
}

.btn-success:hover {
    background: #047857;
}

.btn-secondary {
    background: #e5e5e5;
    color: #000000;
}

.btn-secondary:hover {
    background: #d4d4d4;
}

.hint {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #666666;
}

/* PDF Info */
.pdf-info {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.file-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 10px;
}

.file-badge i {
    font-size: 1.3rem;
    color: #dc2626;
}

.file-badge span {
    font-weight: 500;
}

.size-badge {
    background: #e5e5e5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: normal;
}

.page-info {
    font-size: 1rem;
    color: #059669;
    font-weight: 500;
}

/* Split Options */
.split-options {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.split-options h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.option-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    background: #f5f5f5;
    color: #000000;
}

.tab-btn.active {
    background: #000000;
    color: #ffffff;
}

.option-panel {
    display: none;
    padding: 15px 0;
}

.option-panel.active {
    display: block;
}

.option-desc {
    color: #666666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.95rem;
}

.range-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 1rem;
}

.range-input:focus {
    outline: none;
    border-color: #000000;
}

.number-input {
    width: 100px;
    padding: 8px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 1rem;
}

.split-action {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

/* Preview Section */
.preview-section {
    margin-bottom: 20px;
}

.preview-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.page-preview {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.page-preview:hover {
    border-color: #000000;
}

.page-preview.selected {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Progress Area */
.progress-area {
    margin: 20px 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: #059669;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    color: #666666;
    font-size: 0.9rem;
}

/* Clear Action */
.clear-action {
    text-align: center;
    margin: 20px 0;
}

/* Info Box */
.info-box {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.info-box h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #000000;
    font-weight: 600;
}

.info-box ol {
    margin-left: 20px;
    color: #333333;
    font-size: 0.95rem;
}

.info-box li {
    margin-bottom: 5px;
}

.note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    color: #059669;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .option-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
}