:root {
  --bg-color: #1e1e2e;
  --text-color: #fff;
  --accent-color: #ffa500;
  --input-bg: rgba(34, 34, 54, 0.8);
  --input-border: #2e2e4d;
  --input-focus-shadow: rgba(255, 165, 0, 0.6);
}

[data-theme="light"] {
  --bg-color: #fefefe;
  --text-color: #222;
  --accent-color: #ff6600;
  --input-bg: #fff;
  --input-border: #ccc;
  --input-focus-shadow: rgba(255, 102, 0, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem;
  background-color: var(--bg-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: start;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  width: 100%;
  background: var(--input-bg);
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(124, 195, 255, 0.15);
  padding: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

h1 {
  text-align: center;
  color: var(--accent-color);
  margin-bottom: 2rem;
  font-weight: 700;
}

/* Progress Bar */
.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.step {
  width: 30px;
  height: 30px;
  background-color: #444466;
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  cursor: default;
  transition: background-color 0.3s ease;
  user-select: none;
}

.step.active, .step.completed {
  background-color: var(--accent-color);
  color: #000;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.form-step.active {
  display: block;
}

/* Form labels and inputs */
label {
  font-weight: 600;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  position: relative;
}

input, textarea {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  padding: 0.7rem;
  font-size: 1rem;
  border-radius: 6px;
  transition: border 0.2s ease, box-shadow 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

input:focus, textarea:focus {
  outline: none;
  border: 1px solid var(--accent-color);
  box-shadow: 0 0 8px 2px var(--input-focus-shadow);
  transform: scale(1.03);
}

/* Textarea */
textarea {
  resize: none;
}

/* Number inputs */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

/* Buttons */
.buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

button {
  background-color: var(--accent-color);
  color: #000;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  user-select: none;
}

button:disabled {
  background-color: #666666;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background-color: #cc8a00;
}

/* Tooltip */
.tooltip {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--accent-color);
  cursor: help;
  position: relative;
  font-weight: bold;
  user-select: none;
}

.tooltip:focus::after,
.tooltip:hover::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: 125%;
  transform: translateX(-50%);
  background: rgba(255, 165, 0, 0.9);
  color: #000;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.tooltip::after {
  content: "";
  opacity: 0;
  pointer-events: none;
}

/* Custom Select */
.custom-select {
  position: relative;
  user-select: none;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  color: var(--text-color);
  padding: 0.7rem;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
}

.select-selected {
  position: relative;
  user-select: none;
}

.select-items {
  position: absolute;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  margin-top: 4px;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 99;
}

.select-items div {
  padding: 0.7rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--input-border);
  user-select: none;
}

.select-items div:hover {
  background-color: #3e3e5e;
}

.select-items.open {
  max-height: 200px;
  overflow-y: auto;
}

.checkmark {
  color: var(--accent-color);
  display: none;
}

.select-items div.selected .checkmark {
  display: inline;
}

/* Error message */
#error-message {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

/* Success & Error Messages */
#form-message {
  margin-top: 1rem;
  font-weight: bold;
  font-size: 1rem;
  display: none;
  padding: 0.7rem;
  border-radius: 6px;
  user-select: none;
}

#form-message.success {
  background-color: #2e4d2e;
  color: #aaffaa;
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

#form-message.error {
  background-color: #4d2e2e;
  color: #ff6b6b;
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* Dark mode toggle button */
#toggle-theme {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--accent-color);
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  box-shadow: 0 0 8px var(--accent-color);
  user-select: none;
  z-index: 1000;
}

/* Fade in animation */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}
