#converter-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  position: relative;
  box-sizing: border-box;
}

#converter-container *,
#converter-container *::before,
#converter-container *::after {
  box-sizing: border-box;
}

/* Header */
.converter-header {
  text-align: center;
  margin-bottom: 28px;
}

.converter-header h2 {
  margin: 0 0 6px 0;
  font-size: 26px;
  color: #1a1a2e;
  font-weight: 700;
}

.converter-subtitle {
  margin: 0;
  font-size: 14px;
  color: #888;
}

/* Body Layout */
.converter-body {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}

/* Panels */
.converter-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.panel-header label {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-count {
  font-size: 12px;
  color: #aaa;
  background: #f4f4f8;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

#converter-container textarea {
  flex: 1;
  min-height: 220px;
  font-size: 15px;
  font-family: 'Consolas', 'Courier New', monospace;
  padding: 14px;
  border: 2px solid #e0e0e8;
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafc;
  color: #1a1a2e;
  line-height: 1.6;
  width: 100%;
}

#converter-container textarea:focus {
  outline: none;
  border-color: #5c6bc0;
  box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);
  background: #fff;
}

/* Center Controls */
.converter-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

/* Buttons */
.btn {
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-copy {
  background: #e8eaf6;
  color: #3949ab;
  padding: 5px 12px;
}

.btn-copy:hover {
  background: #c5cae9;
}

.btn-clear {
  background: #fce4ec;
  color: #c62828;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: 700;
}

.btn-clear:hover {
  background: #f8bbd0;
}

.btn-convert {
  background: #5c6bc0;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(92, 107, 192, 0.3);
}

.btn-convert:hover {
  background: #3949ab;
  transform: scale(1.1);
}

.btn-swap {
  background: #fff3e0;
  color: #e65100;
  padding: 8px 14px;
  font-size: 13px;
}

.btn-swap:hover {
  background: #ffe0b2;
}

.btn-clear-all {
  background: #f5f5f5;
  color: #666;
  padding: 10px 28px;
  font-size: 14px;
}

.btn-clear-all:hover {
  background: #e0e0e0;
  color: #333;
}

/* Options Section */
.converter-options {
  background: #f8f9fc;
  border: 1px solid #e8e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.option-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.option-label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin: 0;
}

.checkbox-label {
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  accent-color: #5c6bc0;
  cursor: pointer;
}

#delimiter-select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

#delimiter-select:focus {
  outline: none;
  border-color: #5c6bc0;
}

/* Footer */
.converter-footer {
  text-align: center;
}

/* Toast Notification */
.toast {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #323232;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}

/* Responsive */
@media (max-width: 768px) {
  #converter-container {
    padding: 16px;
  }

  .converter-body {
    flex-direction: column;
  }

  .converter-controls {
    flex-direction: row;
    padding: 4px 0;
  }

  #converter-container textarea {
    min-height: 150px;
  }

  .converter-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
