*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: linear-gradient(145deg, #5b21b6 0%, #7c3aed 35%, #8b5cf6 65%, #a78bfa 100%);
  background-attachment: fixed;
  color: #1f2937;
  font-family: "Outfit", "Inter", "Segoe UI", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

header {
  text-align: center;
  width: 100%;
  padding: 32px 24px;
  font-family: "Outfit", "Inter", sans-serif;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.98);
  color: #000;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 6px 0;
}

.header-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: #6b7280;
  margin: 0;
  letter-spacing: 0.01em;
  -webkit-text-fill-color: initial;
}

main {
  display: flex;
  flex-direction: row;
  gap: 40px;
  padding: 40px 20px;
  max-width: 1600px;
  margin: 0 auto;
  align-items: flex-start;
  min-height: calc(100vh - 120px);
}

@media (max-width: 1200px) {
  main {
    flex-direction: column;
    gap: 30px;
    padding: 20px;
  }
}

/* Section 1: Preview Section */
.preview-section {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  overflow: hidden;
  flex: 2;
  min-width: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.preview-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.preview-header {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%);
  color: white;
  padding: 22px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.preview-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.preview-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.preview-header i {
  margin-right: 12px;
  font-size: 1.2em;
}

.preview-content {
  padding: 32px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

#certificatediv {
  width: 100%;
  max-width: 800px;
  display: flex;
  justify-content: center;
}

#certificatecanvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  box-shadow: 0 16px 48px rgba(91, 33, 182, 0.2), 0 0 0 1px rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

#certificatecanvas:hover {
  transform: scale(1.01);
  box-shadow: 0 20px 56px rgba(91, 33, 182, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.9);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(91, 33, 182, 0.06);
}

/* Section 2: Settings Section */
.settings-section {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  overflow: hidden;
  flex: 1;
  min-width: 350px;
  max-width: 450px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.settings-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.settings-header {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%);
  color: white;
  padding: 22px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.settings-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
  animation: shimmer 3s infinite;
}

.settings-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.settings-header i {
  margin-right: 12px;
  font-size: 1.2em;
}

.settings-content {
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

/* Section Headers */
.settings-content h3 {
  color: #1f2937;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
  border-bottom: 2px solid rgba(91, 33, 182, 0.2);
  padding-bottom: 6px;
  letter-spacing: 0.01em;
}

.settings-content h3 i {
  margin-right: 6px;
  color: #7c3aed;
}

/* Template Control */
.template-control {
  background: rgba(248, 249, 250, 0.8);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.template-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.template-buttons .button {
  font-size: 0.8em;
  padding: 6px 12px;
  white-space: nowrap;
}

/* Text Formatting Tools */
.toolscontainer {
  background: rgba(248, 250, 252, 0.95);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.toolscontainer > div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.toolscontainer > div:last-child {
  margin-bottom: 0;
}

.toolscontainer select {
  padding: 8px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 500;
  background: white;
  color: #333;
  transition: all 0.3s ease;
}

.toolscontainer select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toolscontainer select option {
  color: #000;
}

/* File Upload Section */
.upload-section {
  background: rgba(248, 250, 252, 0.95);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.uploadcontainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.98);
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(91, 33, 182, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.uploadlabel {
  font-size: 1em;
  margin: 0;
  text-align: center;
  width: 100%;
  padding: 8px;
}

/* Certificate Inputs Section */
.inputs-section {
  background: rgba(248, 250, 252, 0.95);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

#inputs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 6px;
}

#inputs > div {
  display: flex;
  justify-content: stretch;
  align-items: center;
  gap: 5px;
  padding: 0 5px;
}

#inputs input[type="text"] {
  width: calc(100% - 30px);
  padding: 6px 8px;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  font-size: 12px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transition: all 0.3s ease;
}

#inputs input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

/* Textarea styling */
textarea.certinputs {
  width: calc(100% - 30px);
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 14px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 80px;
}

textarea.certinputs:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

#inputs input[type="text"]:disabled {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  border-color: #dee2e6;
}

#inputs input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.delbutton {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  padding: 4px 8px;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  font-size: 12px;
}

.delbutton:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

#addinput {
  font-size: 0.9em;
  text-align: center;
  width: 100%;
  padding: 8px 16px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  margin: 0;
  border: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

#addinput:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.optionscontainer {
  display: flex;
  justify-content: center;
}

/* Joystick Section */
.joystick-section {
  background: rgba(248, 249, 250, 0.8);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.1);
  text-align: center;
}

/* Download Container Styles */
.downloadcontainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 14px rgba(91, 33, 182, 0.05);
}

#downloadtype {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: white;
  color: #333;
  margin-left: 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

#downloadtype:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

#downloadbutton {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.downloadzip {
  display: flex;
}

#downloadzipbutton {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Button Styles */
.button {
  font-family: "Outfit", "Inter", sans-serif;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(91, 33, 182, 0.35);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.4s ease;
}

.button:hover::before {
  left: 100%;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 33, 182, 0.4);
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 50%, #7c3aed 100%);
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(91, 33, 182, 0.3);
}

/* Navigation button transitions */
#nextCertificate, #prevCertificate {
  transition: transform 0.1s ease-in-out, box-shadow 0.2s ease-in-out;
}

#nextCertificate:hover, #prevCertificate:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#nextCertificate:active, #prevCertificate:active {
  transform: translateY(0) scale(0.98);
}

/* Format Tools */
.formattool {
  padding: 8px 12px;
  font-size: 14px;
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  color: #333;
  transition: all 0.3s ease;
  cursor: pointer;
}

.formattool:hover {
  border-color: #667eea;
  transform: translateY(-1px);
}

.formattool[data-active="1"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#textbold {
  font-weight: bold;
}

#textitalic {
  font-style: italic;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 800;
}

/* Color and Slider Inputs */
input[type="color"] {
  height: 100%;
  aspect-ratio: 8/6;
  padding: 1px;
  border: 1px solid #ccc4;
  border-radius: 5px;
  background: #ffffff0a;
}

.colorpick-eyedropper-input-trigger {
  display: none;
}

.slidecontainer {
  width: 100%;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent 5%, white 100%);
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 5px;
  height: 30px;
  background: white;
  mix-blend-mode: exclusion;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 5px;
  height: 30px;
  background: white;
  mix-blend-mode: exclusion;
  cursor: pointer;
}

input[type="file"] {
  display: none;
}

/* Progress Loader */
.loaderbody {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
}

.loaderbody > div {
  background: white;
  padding: 32px 48px;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #1f2937;
  font-family: "Outfit", "Inter", sans-serif;
  font-weight: 500;
}

/* Custom button variations */
.button.primary {
  background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #C084FC 100%);
}

.button.success {
  background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
}

.button.warning {
  background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #C084FC 100%);
}

.button.danger {
  background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #C084FC 100%);
}

.button.info {
  background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
}

.button.success:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 50%, #065F46 100%);
}

.button.info:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #059669 0%, #047857 50%, #065F46 100%);
}

.button.generate {
  background: linear-gradient(135deg, #1F2937 0%, #111827 50%, #000000 100%);
}

.button.generate:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #111827 0%, #000000 50%, #000000 100%);
}

/* CSV Data Editing Styles */
#csvDataContainer {
  background: rgba(248, 249, 250, 0.95) !important;
  border: 2px solid #e1e5e9 !important;
  border-radius: 12px !important;
}

/* CSV Validation Styles */
.validation-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  min-width: 400px;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.validation-alert.success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.validation-alert.warning {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  color: white;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.validation-alert.error {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-content {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.alert-content i {
  font-size: 18px;
  flex-shrink: 0;
}

.alert-content span {
  flex: 1;
  font-weight: 500;
}

.alert-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.alert-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Validation Summary Styles */
.validation-summary {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.summary-header h4 {
  color: #333;
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-header i {
  color: #28a745;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
}

.stat-item.valid {
  border-left: 4px solid #28a745;
}

.stat-item.invalid {
  border-left: 4px solid #dc3545;
}

.stat-item.total {
  border-left: 4px solid #667eea;
}

.stat-item.removed {
  border-left: 4px solid #6c757d;
}

.stat-item.deleted {
  border-left: 4px solid #dc3545;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-item.valid .stat-number {
  color: #28a745;
}

.stat-item.invalid .stat-number {
  color: #dc3545;
}

.stat-item.total .stat-number {
  color: #667eea;
}

.stat-item.removed .stat-number {
  color: #6c757d;
}

.stat-item.deleted .stat-number {
  color: #dc3545;
}

.stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  font-weight: 500;
}

.invalid-details h5 {
  color: #dc3545;
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
}

.invalid-list {
  max-height: 200px;
  overflow-y: auto;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
}

.invalid-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid #e1e5e9;
  font-size: 13px;
}

.invalid-row:last-child {
  border-bottom: none;
}

.row-number {
  background: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
}

.row-data {
  flex: 1;
  color: #333;
  font-weight: 500;
}

.row-errors {
  color: #dc3545;
  font-size: 12px;
  max-width: 200px;
  text-align: right;
}

/* Removed Rows Styles */
.removed-details h5 {
  color: #6c757d;
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
}

.removed-list {
  max-height: 200px;
  overflow-y: auto;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
}

.removed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid #e1e5e9;
  font-size: 13px;
}

.removed-row:last-child {
  border-bottom: none;
}

.removed-row .row-number {
  background: #6c757d;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
}

.removed-row .row-data {
  flex: 1;
  color: #666;
  font-weight: 500;
}

.removed-row .row-reason {
  color: #6c757d;
  font-size: 12px;
  max-width: 200px;
  text-align: right;
}

/* Deleted Rows Styles */
.deleted-details h5 {
  color: #dc3545;
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
}

.deleted-list {
  max-height: 200px;
  overflow-y: auto;
  background: #fff5f5;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #fed7d7;
}

.deleted-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid #fed7d7;
  font-size: 13px;
}

.deleted-row:last-child {
  border-bottom: none;
}

.deleted-row .row-number {
  background: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
}

.deleted-row .row-data {
  flex: 1;
  color: #666;
  font-weight: 500;
}

.deleted-row .row-reason {
  color: #dc3545;
  font-size: 12px;
  max-width: 200px;
  text-align: right;
}

/* Export Buttons Styles */
.export-buttons {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.export-header h5 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.export-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.export-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.export-btn.deleted-export {
  background: #dc3545;
  color: white;
}

.export-btn.deleted-export:hover {
  background: #c82333;
}

.export-btn.valid-export {
  background: #28a745;
  color: white;
}

.export-btn.valid-export:hover {
  background: #218838;
}

/* Logs Button Styles */
.logs-button-container {
  margin-top: 20px;
  text-align: center;
}

.logs-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.logs-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.logs-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Logs Modal Styles */
.logs-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.logs-modal-overlay.show {
  opacity: 1;
}

.logs-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.logs-modal-overlay.show .logs-modal-content {
  transform: scale(1);
}

.logs-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logs-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logs-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.logs-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.logs-modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.logs-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.log-stat-item {
  text-align: center;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.log-stat-number {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.log-stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.log-section {
  margin-bottom: 25px;
}

.log-section h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.log-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.log-table-header {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 1fr;
  gap: 15px;
  padding: 12px 15px;
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.log-table-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 1fr;
  gap: 15px;
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  align-items: center;
}

.log-table-row:last-child {
  border-bottom: none;
}

.log-table-row.removed {
  background: #fff5f5;
  border-left: 4px solid #6c757d;
}

.log-table-row.deleted {
  background: #fff5f5;
  border-left: 4px solid #dc3545;
}

.log-table-row.valid {
  background: #f0fff4;
  border-left: 4px solid #28a745;
}

.log-row-number {
  font-weight: bold;
  color: #667eea;
}

.log-row-name {
  font-weight: 500;
  color: #333;
}

.log-row-email {
  color: #666;
  font-family: monospace;
}

.log-row-reason, .log-row-status {
  font-size: 12px;
  font-weight: 500;
}

.log-row-reason {
  color: #dc3545;
}

.log-row-status {
  color: #28a745;
}

.logs-modal-footer {
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  border-top: 1px solid #e9ecef;
}

.logs-modal-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logs-modal-btn:not(.export-all) {
  background: #6c757d;
  color: white;
}

.logs-modal-btn:not(.export-all):hover {
  background: #5a6268;
}

.logs-modal-btn.export-all {
  background: #28a745;
  color: white;
}

.logs-modal-btn.export-all:hover {
  background: #218838;
}

/* Settings Logs Section Styles */
.logs-section-settings {
  margin-bottom: 20px;
}

.logs-section-settings h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-section-settings .uploadcontainer {
  text-align: center;
}

.logs-section-settings .button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.logs-section-settings .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#csvDataContainer input {
  background: white !important;
  color: #333 !important;
  border: 2px solid #e1e5e9 !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

#csvDataContainer input:focus {
  outline: none !important;
  border-color: #8B5CF6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
  transform: translateY(-1px) !important;
}

/* Modern Input Styling */
input[type="text"], input[type="email"], select, textarea {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 2px solid #e1e5e9 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #333 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(10px) !important;
}

input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: #8B5CF6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
  transform: translateY(-1px) !important;
  background: white !important;
}

/* Modern Select Styling */
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 16px !important;
  padding-right: 40px !important;
  appearance: none !important;
  cursor: pointer !important;
}

/* Modern Checkbox Styling */
input[type="checkbox"] {
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  border: 2px solid #e1e5e9 !important;
  border-radius: 6px !important;
  background: white !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.3s ease !important;
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #C084FC 100%) !important;
  border-color: #8B5CF6 !important;
}

input[type="checkbox"]:checked::after {
  content: '✓' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 12px !important;
}

/* Modern Color Input Styling */
input[type="color"] {
  width: 50px !important;
  height: 50px !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

input[type="color"]:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Modern Range Slider Styling */
input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  height: 8px !important;
  border-radius: 4px !important;
  background: #e1e5e9 !important;
  outline: none !important;
  cursor: pointer !important;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #C084FC 100%) !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3) !important;
  transition: all 0.3s ease !important;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2) !important;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4) !important;
}

/* Modern Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #C084FC 100%);
  border-radius: 4px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #7C3AED 0%, #9333EA 50%, #A855F7 100%);
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 2s infinite;
}

/* Modern Card Hover Effects */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
  .preview-section, .settings-section {
    border-radius: 16px;
  }
  
  .button {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .preview-header h2, .settings-header h2 {
    font-size: 24px;
  }
}

.csv-row {
  transition: background-color 0.3s ease;
}

.csv-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
  main {
    padding: 15px;
  }
  
  .settings-content {
    padding: 20px;
  }
  
  .preview-content {
    padding: 20px;
  }
}

@media screen and (max-width: 800px) {
  main {
    flex-direction: column;
    padding: 10px;
    gap: 20px;
  }
  
  .preview-section,
  .settings-section {
    flex: none;
    width: 100%;
    max-width: none;
  }
  
  .settings-content {
    padding: 15px;
    gap: 20px;
  }
  
  .preview-content {
    padding: 15px;
  }
  
  .template-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .toolscontainer > div {
    flex-direction: column;
    gap: 15px;
  }
  
  .download-options {
    max-width: 100%;
    width: 100%;
  }
  
  .downloadcontainer {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    text-align: center;
  }

  .downloadcontainer > div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .downloadcontainer .button {
    width: 100%;
    max-width: 280px;
  }
}

@media screen and (max-width: 600px) {
  .download-options {
    padding: 16px 12px;
  }

  .downloadcontainer {
    padding: 10px;
    font-size: 0.95rem;
  }

  .preview-header h2,
  .settings-header h2 {
    font-size: 20px;
  }
  
  .settings-content h3 {
    font-size: 16px;
  }
  
  .preview-content,
  .settings-content {
    padding: 15px;
  }
}


