body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f9;
  margin: 0;
  padding: 20px;
}

.container {
  display: flex;
  max-width: 1200px;
  margin: auto;
  gap: 30px;
  flex-wrap: wrap;
}

.form-section {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 350px;
  min-width: 300px;
}

label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

select,
input[type="number"],
input[type="file"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

button {
  background-color: #4a6fa6;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #3b5a8d;
}

.preview-container {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.print-preview {
  position: relative;
  background: white;
  border: 1px solid #ffffff;
  overflow: hidden;
  margin-bottom: 20px;
}

/* Updated Photo Frame Styles */
.photo-frame {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Border Options */
.photo-frame.border-yes {
  border: 1px solid #000000; /* Black border */
}

.photo-frame.border-no {
  border: 1px solid #ffffff; /* White border */
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info {
  font-size: 14px;
  color: #555;
  margin-top: 10px;
}

.file-info {
  margin-top: 10px;
  padding: 10px;
  background: #f0f0f0;
  border-radius: 4px;
}

.tab-container {
  margin-top: 15px;
}

.tab-buttons {
  display: flex;
  margin-bottom: 10px;
}

.tab-button {
  padding: 8px 15px;
  background: #ddd;
  border: none;
  cursor: pointer;
  margin-right: 5px;
  border-radius: 4px 4px 0 0;
}

.tab-button.active {
  background: #4a6fa6;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.welcome-message {
  color: #666;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

.page-indicator {
  margin-top: 10px;
  font-weight: bold;
  color: #4a6fa6;
}

.preview-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

@media print {
  body {
    margin: 0;
    padding: 0;
    background: white;
  }

  .container {
    display: none;
  }

  .printable-area {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  /* Updated Print Styles for Border Options */
  .photo-frame.border-yes {
    border: 1px solid #000000 !important;
  }

  .photo-frame.border-no {
    border: 1px solid #ffffff !important;
  }

  img {
    object-fit: cover !important;
  }
  
  .print-preview {
    page-break-after: always;
  }
  
  .print-preview:last-child {
    page-break-after: auto;
  }
}