* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f7fa;
  color: #2d3748;
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

.install-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.install-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 40px;
  text-align: center;
}

.install-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.install-header p {
  font-size: 16px;
  opacity: 0.95;
}

.install-content {
  padding: 40px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-hint {
  display: block;
  font-size: 0.875rem;
  color: #718096;
  margin-top: 4px;
  margin-bottom: 8px;
}

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: #4a5568;
  margin-top: 4px;
}

.current-file {
  margin-bottom: 15px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.current-file strong {
  color: #2d3748;
  margin-right: 10px;
}

.current-file a {
  color: #667eea;
  text-decoration: none;
}

.current-file a:hover {
  text-decoration: underline;
}

.current-file img {
  border-radius: 4px;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  color: #2d3748;
  background: #ffffff;
  transition: all 0.3s;
}

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

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.background-type-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.background-type-option {
  flex: 1;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  background: #ffffff;
}

.background-type-option:hover {
  border-color: #667eea;
  background: #f7fafc;
}

.background-type-option.selected {
  border-color: #667eea;
  background: #edf2f7;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.background-type-option input[type="radio"] {
  margin-right: 8px;
}

.background-type-option label {
  cursor: pointer;
  font-weight: 500;
  color: #4a5568;
  margin: 0;
}

.file-upload-area {
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  background: #f7fafc;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload-area:hover {
  border-color: #667eea;
  background: #edf2f7;
}

.file-upload-area.dragover {
  border-color: #667eea;
  background: #e6fffa;
}

.file-upload-area input[type="file"] {
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  font-size: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden;
}

.file-upload-icon {
  font-size: 48px;
  margin-bottom: 10px;
  color: #a0aec0;
}

.file-upload-text {
  color: #4a5568;
  font-weight: 500;
  margin-bottom: 5px;
}

.file-upload-hint {
  color: #718096;
  font-size: 13px;
}

.file-preview {
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.file-preview img,
.file-preview video {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dynamic-items-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dynamic-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.dynamic-item input,
.dynamic-item select {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  background: #ffffff;
  color: #2d3748;
}

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

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  width: 100%;
  padding: 16px;
  font-size: 16px;
  margin-top: 10px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #48bb78;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 14px;
}

.btn-secondary:hover {
  background: #38a169;
}

.btn-remove {
  background: #f56565;
  color: #ffffff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-remove:hover {
  background: #e53e3e;
}

.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: #c6f6d5;
  color: #22543d;
  border: 1px solid #9ae6b4;
}

.alert-error {
  background: #fed7d7;
  color: #742a2a;
  border: 1px solid #fc8181;
}

.alert-info {
  background: #bee3f8;
  color: #2c5282;
  border: 1px solid #90cdf4;
}

.hidden {
  display: none;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .install-content {
    padding: 24px;
  }

  .install-header {
    padding: 30px 20px;
  }

  .install-header h1 {
    font-size: 24px;
  }

  .dynamic-item {
    flex-direction: column;
  }

  .background-type-selector {
    flex-direction: column;
  }
}
