:root {
  --accent-color: rgb(65, 170, 203);

  --size-1: 5px;
  --size-2: 8px;
  --size-3: 13px;
  --size-4: 21px;
  --size-5: 34px;
  --size-6: 55px;
  --size-7: 89px;
  --size-8: 144px;
  --size-9: 233px;
  --size-10: 377px;
  --size-11: 610px;
  --size-12: 987px;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
  margin: 0;
}

nav {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 var(--size-6);
  position: absolute;
  top: 0;
  left: 0;
  a {
    color: inherit;
    text-decoration: inherit;
  }
}

flex-spacer {
  flex-grow: 1;
}

main {
  padding: var(--size-6);
}
@media screen and (width < 500px) {
  main {
    padding: var(--size-6) 0;
  }
}

profile-btn {
  /* position: absolute;
  top: var(--size-4);
  right: var(--size-6); */

  height: 3rem;

  border-radius: 9999999px;
  aspect-ratio: 1/1;

  background-image: url(/assets/icons/profile.svg);
  background-repeat: no-repeat;
  background-size: contain;

  a {
    display: block;
    width: 100%;
    height: 100%;
  }
}

back-btn {
  height: 3rem;

  border-radius: 9999999px;
  aspect-ratio: 1/1;

  background-image: url(/assets/icons/back.svg);
  background-repeat: no-repeat;
  background-size: contain;
}

/* ==================================================== */

/* --- Modern Form Styles --- */

/* --- Modern Form Styles (Classless & Corrected) --- */

/* Set up custom properties for easy theme changes */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --background-color: #f8f9fa;
  --input-bg: #fff;
  --input-border: #ced4da;
  --input-focus-border: #80bdff;
  --text-color: #495057;
  --placeholder-color: #6c757d;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  padding: 2rem;
}

form {
  max-width: 600px;
  margin: 0 auto;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  margin-bottom: 1.5rem;
}

legend {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

label,legend {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* --- General Text Input Styling --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--input-bg);
  background-clip: padding-box;
  border: 1px solid var(--input-border);
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-sizing: border-box; /* Ensures padding doesn't affect width */
}

/* --- Placeholder Styling --- */
input::placeholder,
textarea::placeholder {
  color: var(--placeholder-color);
  opacity: 1;
}

/* --- Focus State --- */
input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* --- Textarea --- */
textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Select Dropdown --- */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.25rem;
}

/* --- Checkbox and Radio Button Custom Styling --- */
input[type="checkbox"],
input[type="radio"] {
  opacity: 0;
  position: absolute;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  position: relative;
  padding-left: 2rem;
  cursor: pointer;
  display: inline-block;
  line-height: 1.5rem;
}

input[type="checkbox"] + label::before,
input[type="radio"] + label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* Checkbox specific */
input[type="checkbox"] + label::before {
  border-radius: 0.25rem;
}

input[type="checkbox"]:checked + label::before {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
}

/* Radio specific */
input[type="radio"] + label::before {
  border-radius: 50%;
}

input[type="radio"]:checked + label::before {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* -- CORRECTED radio button dot positioning -- */
input[type="radio"]:checked + label::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 0.85rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #fff;
  transform: translate(-50%, -50%); /* Perfectly center the dot */
}

/* --- Button Styling --- */
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
  display: inline-block;
  font-weight: 400;
  color: #fff;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -webkit-appearance: none; /* Removes default iOS styling */
}

button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

button:focus,
input[type="submit"]:focus,
input[type="reset"]:focus,
input[type="button"]:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}

/* Secondary button styling using an attribute selector */
button[type="reset"] {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

button[type="reset"]:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

/* --- Range Input Styling --- */
/* 1. General Reset for the Range Input Wrapper */
input[type="range"] {
  -webkit-appearance: none; /* Override default look on WebKit */
  -moz-appearance: none; /* Override default look on Firefox */
  appearance: none;
  width: 100%;
  background: transparent; /* Remove default background */
  outline: none;
  margin: 0.5rem 0;
}

/* 2. WebKit (Chrome, Safari, Edge) Specific Styling */

/* The Track */
input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.5rem; /* Define track height */
  background: var(--input-border);
  border-radius: 0.25rem;
  cursor: pointer;
}

/* The Thumb (Handle) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; /* Essential to override default */
  appearance: none;
  /* By removing margin-top, we let the browser center it on the track */
  height: 1.25rem;
  width: 1.25rem;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  /* The browser now correctly centers the 1.25rem thumb on the 0.5rem track */
  margin-top: -0.375rem; /* Re-introduce a more robust calculation */
}

/* 3. Firefox Specific Styling */

/* The Track */
input[type="range"]::-moz-range-track {
  width: 100%;
  height: 0.5rem;
  background: var(--input-border);
  border-radius: 0.25rem;
  cursor: pointer;
}

/* The Thumb (Handle) */
input[type="range"]::-moz-range-thumb {
  height: 1.25rem;
  width: 1.25rem;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 4. Focus & Hover States (Unchanged) */

input[type="range"]:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

input[type="range"]:focus::-moz-range-thumb {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

input[type="range"]:hover::-webkit-slider-thumb {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]:hover::-moz-range-thumb {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}
/* --- Capsule Link Component --- */
.capsule-link {
  display: inline-block; /* Allows padding and vertical alignment */
  text-decoration: none;
  font-weight: 600; /* Bold text */
  color: #fff;

  /* The gradient background */
  background-image: linear-gradient(
    135deg,
    var(--primary-color, #007bff),
    #0056b3
  );

  /* Padding creates the size. Using 'em' keeps it relative to font size */
  padding: 0.3em 1.2em;

  /* border-radius creates the capsule shape */
  border-radius: 999px;

  /* Sizing and alignment */
  font-size: 0.95em; /* Slightly smaller to feel balanced with padding */
  line-height: 1.4; /* Ensures it doesn't disrupt line spacing too much */
  vertical-align: middle; /* Aligns it nicely with surrounding text */

  /* Subtle shadow for depth */
  box-shadow: 0 2px 5px rgba(0, 86, 179, 0.2);

  /* Smooth transitions for hover/focus effects */
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.capsule-link:hover {
  transform: translateY(-2px); /* Lifts the capsule slightly */
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3);
}

.capsule-link:focus {
  outline: none;
  /* Accessibility focus ring, consistent with other components */
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  user-select: none;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.btn:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}
