/* Reset & Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f3f4f6;
  color: #333;
  margin: 0;
  padding: 20px;
}

/* Container */
.editor-container {
  max-width: 1100px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.07);
}

/* Header */
.editor-header {
  text-align: center;
  margin-bottom: 30px;
}

.editor-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
  color: #1f2937;
}

.editor-header p {
  font-size: 16px;
  color: #4b5563;
  max-width: 700px;
  margin: auto;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #bbb;
  padding: 30px;
  text-align: center;
  border-radius: 12px;
  background: #f9fafb;
  margin-bottom: 30px;
  cursor: pointer;
  transition: 0.2s;
}

.upload-area:hover {
  border-color: #007bff;
  background: #f0f8ff;
}

.upload-area label {
  color: #007bff;
  font-weight: bold;
  cursor: pointer;
}

#pdfInput {
  display: none;
}

/* Toolbar */
.editor-tools {
  background: #f1f5f9;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.editor-tools .tool-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.editor-tools label {
  font-size: 14px;
  font-weight: 600;
}

.editor-tools select,
.editor-tools input[type="number"],
.editor-tools input[type="color"] {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin-left: 5px;
}

button {
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

button:hover {
  background: #0056b3;
}

/* PDF Preview Container */
.pdf-preview {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 20px;
}

/* PDF Page Canvas */
.pdf-page {
  position: relative;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Canvas of PDF */
.pdf-page canvas {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* Text Overlay */
.text-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.text-element {
  position: absolute;
  padding: 4px 8px;
  font-weight: bold;
  cursor: move;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed #333;
  border-radius: 4px;
  pointer-events: auto;
  user-select: none;
}

/* Utility */
.hidden {
  display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .tool-row {
    flex-direction: column;
    gap: 10px;
  }
}
