/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.builder-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 25px;
  max-width: 1600px;
  margin: 0 auto;
  height: calc(100vh - 40px);
}

/* Form Section */
.form-section {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  padding: 25px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.form-section h1 {
  font-size: 28px;
  color: #2d3748;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section h1 i {
  color: #667eea;
}

/* Image Upload */
.image-upload-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding: 15px;
  background: #f7fafc;
  border-radius: 15px;
}

.image-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #667eea;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-btn {
  background: #667eea;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.upload-btn:hover {
  background: #5a67d8;
  transform: translateY(-2px);
}

.remove-image-btn {
  background: #e53e3e;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.remove-image-btn:hover {
  background: #c53030;
  transform: translateY(-2px);
}

/* Form Elements */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  color: #4a5568;
  font-weight: 500;
  font-size: 14px;
}

.input-group label i {
  color: #667eea;
  margin-right: 5px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: 0.3s;
  font-family: 'Inter', sans-serif;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Section Cards */
.section-card {
  background: #f7fafc;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-header h3 {
  color: #2d3748;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header h3 i {
  color: #667eea;
}

.add-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: 0.3s;
}

.add-btn:hover {
  background: #5a67d8;
  transform: translateY(-2px);
}

/* Dynamic Items */
.dynamic-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dynamic-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 15px;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.item-title {
  font-weight: 600;
  color: #2d3748;
}

.remove-item-btn {
  background: #e53e3e;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.remove-item-btn:hover {
  background: #c53030;
  transform: scale(1.1);
}

.item-content {
  display: grid;
  gap: 10px;
}

.item-content input,
.item-content textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
}

.item-content textarea {
  resize: vertical;
  min-height: 60px;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.reset-btn {
  background: #718096;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.reset-btn:hover {
  background: #4a5568;
}

.error-message {
  color: #e53e3e;
  font-size: 14px;
}

/* Preview Section */
.preview-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-header {
  background: white;
  border-radius: 15px;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.preview-header h2 {
  color: #2d3748;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.preview-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow-y: auto;
  height: calc(100vh - 140px);
}

/* Resume Preview Styles */
.resume-preview {
  max-width: 800px;
  margin: 0 auto;
}

.preview-header-content {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 3px solid #667eea;
}

.preview-profile-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #667eea;
}

.preview-profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-title-section {
  flex: 1;
}

.preview-name {
  font-size: 32px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 5px;
}

.preview-job-title {
  font-size: 18px;
  color: #667eea;
  margin-bottom: 10px;
}

.preview-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: #718096;
}

.preview-contact span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.preview-section {
  margin-bottom: 20px;
}

.preview-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #e2e8f0;
}

.preview-summary {
  background: #f7fafc;
  padding: 15px;
  border-radius: 8px;
  color: #4a5568;
  line-height: 1.6;
}

.preview-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-skill {
  background: #667eea;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
}

.preview-item {
  margin-bottom: 15px;
}

.preview-item-title {
  font-weight: 600;
  color: #2d3748;
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.preview-item-subtitle {
  color: #667eea;
  font-size: 14px;
  margin-bottom: 5px;
}

.preview-item-date {
  color: #718096;
  font-size: 12px;
}

.preview-item-description {
  color: #4a5568;
  font-size: 13px;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
  .builder-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .preview-card {
    height: auto;
    max-height: 600px;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .image-upload-container {
    flex-direction: column;
    text-align: center;
  }
}