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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 0;
    color: #000000;
    font-size: 14px;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

header {
    text-align: left;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #000000;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 14px;
    color: #666666;
    font-weight: 400;
}

.status-bar {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 24px;
    font-size: 13px;
}

.status-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.status-label {
    font-weight: 500;
    color: #666666;
}

.status-value {
    color: #000000;
    font-weight: 500;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e5e5;
}

.tab-btn {
    flex: 0 0 auto;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    transition: all 0.15s;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: #000000;
}

.tab-btn.active {
    color: #000000;
    border-bottom-color: #000000;
}

.tab-content {
    display: none;
    background: #ffffff;
    padding: 24px;
    border: 1px solid #e5e5e5;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

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

.card {
    background: #ffffff;
}

.card h2 {
    margin-bottom: 20px;
    color: #000000;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #000000;
    font-size: 13px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #000000;
    transition: border-color 0.15s;
    font-family: inherit;
}

input:focus,
select:focus {
    outline: none;
    border-color: #000000;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #000000;
}

input[type="checkbox"] + label {
    display: inline;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #000000;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    background: #000000;
    color: #ffffff;
    font-family: inherit;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.btn-primary:hover {
    background: #333333;
    border-color: #333333;
}

.btn-secondary {
    background: #ffffff;
    color: #000000;
    border-color: #e5e5e5;
}

.btn-secondary:hover {
    background: #fafafa;
    border-color: #000000;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999999;
    border-color: #e5e5e5;
}

.results {
    margin-top: 20px;
    padding: 16px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 13px;
}

.post-item {
    background: #ffffff;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.post-title {
    font-weight: 500;
    color: #000000;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.post-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666666;
    margin-bottom: 6px;
}

.post-text {
    color: #666666;
    line-height: 1.5;
    margin-top: 8px;
    font-size: 13px;
}

.post-text-preview {
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-text {
    color: #666666;
    font-style: normal;
    text-align: center;
    padding: 16px;
    font-size: 13px;
}

.success-message {
    background: #f5f5f5;
    color: #000000;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    border: 1px solid #e5e5e5;
    font-size: 13px;
}

.error-message {
    background: #fafafa;
    color: #000000;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    border: 1px solid #e5e5e5;
    font-size: 13px;
}

.download-link {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: #000000;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    transition: background 0.15s;
}

.download-link:hover {
    background: #333333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.stat-item {
    background: #fafafa;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e5e5e5;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
}

.stat-label {
    color: #666666;
    font-size: 12px;
    margin-top: 4px;
}

.progress-log {
    background: #000000;
    color: #ffffff;
    padding: 16px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
    border: 1px solid #000000;
}

.log-entry {
    margin-bottom: 4px;
    padding: 2px 0;
}

.log-start {
    color: #ffffff;
    font-weight: 500;
}

.log-info {
    color: #cccccc;
}

.log-progress {
    color: #ffffff;
}

.log-success {
    color: #ffffff;
}

.log-worker-status {
    color: #4ade80;
    font-weight: 500;
}

.log-complete {
    color: #ffffff;
    font-weight: 500;
}

.log-error {
    color: #ff6b6b;
    font-weight: 500;
}

#columnSelector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.column-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.column-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #000000;
    margin: 0;
}

.column-item label {
    margin: 0;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    width: 100%;
}

.column-item .column-name {
    color: #666666;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
}

.column-item input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
}

.column-item input[type="text"]:disabled {
    background: #f5f5f5;
    color: #999999;
    cursor: not-allowed;
}

.column-item .checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

small {
    color: #666666;
    font-size: 12px;
}

.column-selector-grid,
#apiColumnSelector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

@media (max-width: 1024px) {
    #columnSelector,
    #apiColumnSelector {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .tabs {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
    
    .tab-content {
        padding: 16px;
    }
    
    #columnSelector,
    #apiColumnSelector {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #columnSelector,
    #apiColumnSelector {
        grid-template-columns: 1fr;
    }
}

.api-section {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

.api-method {
    background: #000000;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.api-url {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #000000;
}

.api-params {
    margin: 12px 0;
    font-size: 13px;
}

.api-params code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #000000;
}

.api-example {
    margin-top: 12px;
}

.api-code-block {
    background: #000000;
    color: #ffffff;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 12px;
    margin-top: 8px;
    word-break: break-all;
    line-height: 1.6;
}
