:root {
  /* Color Palette - Premium Dark Theme */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #10b981;
  --accent: #f59e0b;
  --background: #0f172a;
  --surface: #1e293b;
  --surface-alt: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --error: #ef4444;
  --success: #10b981;
  --border: #334155;
  --radius: 12px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glass: rgba(30, 41, 59, 0.7);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.container {
  max-width: 800px;
  width: 100%;
  background: var(--surface);
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Gradient Blur Background Effect */
.container::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

.form-header {
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.form-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form-header p {
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.form-group label .required {
  color: var(--error);
  margin-left: 0.25rem;
}

.input-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;
}

.input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-control::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

textarea.input-control {
  min-height: 120px;
  resize: vertical;
}

/* Grid layout for small fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Custom Checkbox/Radio */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
}

/* File Upload */
.file-upload-container {
  border: 2px dashed var(--border);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
}

.file-upload-container:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.preview-container {
  margin-top: 1rem;
  display: none;
}

.preview-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

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

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-content {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border);
}

.modal-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
}

.modal-body p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.modal-body ul,
.modal-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Form Validation Feedback */
.error-message {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}

.input-control.is-invalid {
  border-color: var(--error);
}

/* Utilities */
.hidden {
  display: none;
}