body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 110, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 110, 248, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.card {
  background: var(--surface);
  border: 1px dashed var(--accent);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 20px;
}

.card h3 {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(232, 255, 71, 0.03);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-zone .upload-icon {
  font-size: 44px;
  margin-bottom: 14px;
  line-height: 1;
}

.upload-zone p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.upload-zone strong {
  color: var(--text);
}

.file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.file-item .file-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.file-item .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item .file-size {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

.file-item .remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.file-item .remove-btn:hover {
  color: var(--accent3);
}

.page-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 110, 248, 0.1);
  border: 1px solid rgba(124, 110, 248, 0.2);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  padding: 4px 10px;
  margin-top: 12px;
}

.split-mode-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.mode-btn {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.15s;
}

.mode-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.mode-btn.active {
  background: rgba(232, 255, 71, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.mode-input {
  display: none;
}

.mode-input.visible {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mode-input input[type="text"],
.mode-input input[type="number"] {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
}

.mode-input input:focus {
  border-color: var(--accent);
}

.mode-input small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.every-n-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.every-n-row input {
  width: 80px;
  text-align: center;
}

.every-n-row span {
  color: var(--muted);
  font-size: 14px;
}

.action-btn {
  width: 100%;
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  border-radius: 12px;
  padding: 17px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover:not(:disabled) {
  background: #f5ff80;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(232, 255, 71, 0.2);
}

.action-btn:active:not(:disabled) {
  transform: translateY(0);
}

.action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.progress-wrap {
  margin-top: 20px;
  display: none;
}

.progress-wrap.visible {
  display: block;
}

.progress-bar {
  height: 5px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}

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

.progress-text {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.error-box {
  display: none;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--accent3);
  margin-top: 16px;
  gap: 10px;
}

.error-box.visible {
  display: flex;
}

.result-card {
  display: none;
  background: rgba(77, 255, 180, 0.04);
  border: 1px solid rgba(77, 255, 180, 0.18);
  border-radius: 18px;
  padding: 28px;
  margin-top: 20px;
}

.result-card.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.result-card h4 {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.split-downloads {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.split-download-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

.split-download-item .dl-label {
  flex: 1;
}

.split-download-item .dl-size {
  color: var(--muted);
  font-size: 12px;
}

.split-download-item .dl-btn {
  background: var(--success);
  color: #0a0a0f;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: "Syne", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.split-download-item .dl-btn:hover {
  background: #7dffca;
}

.download-all-btn {
  width: 100%;
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--success);
  color: #0a0a0f;
  border: none;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

.download-all-btn:hover {
  background: #7dffca;
}

.split-info-section {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 0 20px 64px;
  font-family: Georgia, "Times New Roman", serif;
  color: #1a1a2e;
}

.split-info-section h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #0f0f23;
  letter-spacing: -0.3px;
}

.split-info-section .section-subtitle {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.split-divider {
  border: none;
  border-top: 2px solid #e8e8f0;
  margin: 48px 0;
}

/* Steps */
.how-to-steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 0;
}

.how-to-steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 80px;
  padding: 20px 22px;
  background: #ededed;
  border-radius: 10px;
  border-left: 4px solid #0ea5e9;
}

.how-to-steps li::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  background: #0ea5e9;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.how-to-steps li .step-content h4 {
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
}

.how-to-steps li .step-content p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #444;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Split modes explanation cards */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.mode-card {
  background: #f8faff;
  border: 1px solid #dde4f5;
  border-radius: 10px;
  padding: 18px 16px;
}

.mode-card .mode-badge {
  display: inline-block;
  background: #0ea5e9;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.mode-card h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
}

.mode-card p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #555;
  line-height: 1.55;
}

.mode-card .mode-example {
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  background: #e8f4fd;
  color: #0369a1;
  padding: 4px 8px;
  border-radius: 5px;
  display: inline-block;
}

/* Tips box */
.tips-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 18px 22px;
  margin-top: 8px;
}

.tips-box h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  color: #166534;
}

.tips-box ul {
  margin: 0;
  padding-left: 18px;
}

.tips-box ul li {
  font-size: 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #15803d;
  line-height: 1.6;
  margin-bottom: 5px;
}

/* Use cases */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.use-case-card {
  background: #fff7ed;
  border-radius: 10px;
  padding: 18px 16px;
}

.use-case-card .uc-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.use-case-card h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
}

.use-case-card p {
  margin: 0;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #555;
  line-height: 1.55;
}

/* FAQ */
.faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.faq-item {
  border-bottom: 1px solid #e8e8f0;
}

.faq-item:first-child {
  border-top: 1px solid #e8e8f0;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 4px;
  font-size: 1rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}

.faq-question:hover {
  color: #0ea5e9;
}

.faq-chevron {
  font-style: normal;
  font-size: 1.1rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: #0ea5e9;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 4px 18px;
  font-size: 0.93rem;
  line-height: 1.72;
  color: #444;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.faq-item.open .faq-answer {
  display: block;
}
