
    :root {
  --main-bg: #f5f7fa;
  --dark-bg: #121212;
  --primary: #0066ff;
  --primary-dark: #004cc9;
  --light: #ffffff;
  --dark: #1f1f1f;
  --accent: #00c6ff;
  --border: #e0e0e0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: var(--main-bg);
  color: var(--dark);
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--light);
}

.container {
  max-width: 960px;
  margin: 60px auto;
  padding: 2.5rem;
  background: var(--light);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: background 0.4s;
}

body.dark-mode .container {
  background: #1e1e1e;
}

.page-title {
  text-align: center;
  font-size: 2.8rem;
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
}

.page-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 2.5rem;
}

.upload-area {
  text-align: center;
  padding: 2.5rem;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background-color: #fdfdfd;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-area.dragover {
  background-color: #e0f4ff;
  border-color: var(--primary);
}

.upload-area.dark-mode {
  background-color: #2a2a2a;
  border-color: #444;
}

.upload-button {
  margin-top: 1.5rem;
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.upload-button:hover {
  background-color: var(--primary-dark);
}

#pdfs {
  display: none;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.file-list li {
  background: #eaf1f8;
  margin: 0.5rem 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
}

.btn-merge {
  display: none;
  margin: auto;
  margin-top: 2rem;
  padding: 12px 26px;
  background-color: var(--primary);
  color: #fff;
  font-size: 1.1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
  transition: all 0.3s ease;
}

.btn-merge:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
}

.dark-mode-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

.instructions {
  margin-top: 40px;
  background: #eef2f7;
  padding: 1.2rem 1.5rem;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
}

.instructions h3 {
  margin-bottom: 0.8rem;
  color: var(--primary-dark);
}
.dark-mode .instructions {
  background: linear-gradient(135deg, #2b2b2b, #1f1f1f);
  color: #e0e0e0;
  border-left-color: var(--primary);
}


.footer-note {
  margin-top: 50px;
  text-align: center;
  font-size: 0.9rem;
  color: #888;
}

body.dark-mode .footer-note {
  color: #aaa;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin: 20px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

label {
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
  font-size: 1rem;
}

#orderInput {
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 10px;
  transition: border-color 0.3s ease;
  outline: none;
}

#orderInput:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0,123,255,0.2);
}

.hint {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #666;
}


/* Thumbnails */

#thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 2rem;
}

.thumbnail-item {
  width: 110px;
  text-align: center;
  position: relative;
}

.thumbnail-item canvas {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.thumbnail-filename {
  margin-top: 6px;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: crimson;
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  cursor: pointer;
}

/* Info Section */

.info-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 4rem auto;
  padding: 0 1rem;
  animation: fadeIn 1s ease-in-out;
}

.info-item {
  background: #ffffff;
  color: #333;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--primary);
}

.info-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0, 123, 255, 0.2);
}

.info-item h2 {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.info-item p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.info-item ul {
  list-style: none;
  padding-left: 1rem;
}

.info-item ul li {
  margin-bottom: 0.7rem;
  position: relative;
  padding-left: 1.5rem;
}

.info-item ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

body.dark-mode .info-item {
  background: #1c1c1c;
  color: #ccc;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

body.dark-mode .info-item h2 {
  color: var(--primary);
}

body.dark-mode .info-item ul li::before {
  color: var(--accent);
}

/* Animations */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */

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

  .page-title {
    font-size: 2.2rem;
  }

  .info-section {
    grid-template-columns: 1fr;
  }

  .info-item h2 {
    font-size: 1.5rem;
  }

  .info-item p,
  .info-item ul li {
    font-size: 0.95rem;
  }
}

