.codetude-cv-generator {
  max-width: 1400px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  padding: 20px;
}

/* Header */
.cv-gen-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  color: white;
}

.cv-gen-header h1 {
  margin: 0 0 10px 0;
  font-size: 36px;
  font-weight: 700;
}

.cv-gen-header p {
  margin: 0;
  font-size: 18px;
  opacity: 0.95;
}

/* Layout Principal */
.cv-gen-container {
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

/* Sidebar de Formulário */
.cv-gen-form-sidebar {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 30px;
  height: fit-content;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.cv-gen-form-sidebar::-webkit-scrollbar {
  width: 8px;
}

.cv-gen-form-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.cv-gen-form-sidebar::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

/* Tabs */
.cv-gen-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.cv-gen-tab {
  padding: 10px 18px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  color: #555;
}

.cv-gen-tab:hover {
  border-color: #667eea;
  color: #667eea;
}

.cv-gen-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
}

/* Tab Content */
.cv-gen-tab-content {
  display: none;
}

.cv-gen-tab-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Groups */
.cv-form-group {
  margin-bottom: 20px;
}

.cv-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.cv-form-group label .required {
  color: #e74c3c;
  margin-left: 3px;
}

.cv-form-input,
.cv-form-textarea,
.cv-form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
  box-sizing: border-box;
}

.cv-form-input:focus,
.cv-form-textarea:focus,
.cv-form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cv-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.cv-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Repeater Fields */
.cv-repeater-item {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  position: relative;
}

.cv-repeater-remove {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #e74c3c;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.cv-repeater-remove:hover {
  background: #c0392b;
  transform: rotate(90deg);
}

.cv-repeater-add {
  background: #f8f9fa;
  color: #667eea;
  border: 2px dashed #667eea;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.cv-repeater-add:hover {
  background: #667eea;
  color: white;
}

/* Skills Tags */
.cv-skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cv-skill-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cv-skill-remove {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.cv-skill-remove:hover {
  opacity: 1;
}

.cv-skill-input-wrapper {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.cv-skill-input-wrapper input {
  flex: 1;
}

.cv-skill-add-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.cv-skill-add-btn:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

/* Suggested Skills */
.cv-suggested-skills {
  margin-top: 15px;
}

.cv-suggested-skills-title {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 600;
}

.cv-suggested-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-suggested-skill {
  background: #f0f0f0;
  color: #555;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e0e0e0;
}

.cv-suggested-skill:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Preview Area */
.cv-gen-preview-area {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 30px;
}

.cv-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.cv-preview-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

.cv-template-selector {
  display: flex;
  gap: 10px;
}

.cv-template-btn {
  padding: 8px 16px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.cv-template-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.cv-template-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* CV Preview */
.cv-preview-container {
  background: white;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  min-height: 800px;
  margin-bottom: 20px;
}

/* Action Buttons */
.cv-gen-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cv-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.cv-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.cv-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cv-btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.cv-btn-secondary:hover {
  background: #f8f9fa;
}

.cv-btn-success {
  background: #27ae60;
  color: white;
}

.cv-btn-success:hover {
  background: #229954;
  transform: translateY(-2px);
}

.cv-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Color Picker */
.cv-color-picker-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cv-color-preview {
  width: 50px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.2s;
}

.cv-color-preview:hover {
  border-color: #667eea;
  transform: scale(1.05);
}

.cv-color-input {
  flex: 1;
}

/* Info Box */
.cv-info-box {
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
}

.cv-info-box svg {
  flex-shrink: 0;
  color: #17a2b8;
}

.cv-info-box-content p {
  margin: 0;
  color: #0c5460;
  font-size: 14px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1200px) {
  .cv-gen-container {
    grid-template-columns: 1fr;
  }

  .cv-gen-form-sidebar {
    position: relative;
    top: 0;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .cv-gen-header h1 {
    font-size: 28px;
  }

  .cv-form-row {
    grid-template-columns: 1fr;
  }

  .cv-gen-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .cv-gen-actions {
    flex-direction: column;
  }

  .cv-btn {
    width: 100%;
  }
}

/* Loading Overlay */
.cv-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cv-loading-content {
  background: white;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
}

.cv-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
