/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

/* 4. Improve defaults */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 5. Media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Form elements */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Text wrapping */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

#root,
#__next {
  isolation: isolate;
}

/* light mode  (from ai)*/
:root {
  --bg-color: #f5f3ff;
  --surface-color: #ffffff;

  --primary-color: #7c3aed;
  --primary-hover: #6d28d9;

  --text-color: #1f2937;
  --text-light: #6b7280;

  --input-bg: #ffffff;
  --input-border: #d8b4fe;
  --input-focus: #8b5cf6;

  --border-color: #e9d5ff;

  --button-text: #ffffff;

  --shadow: 0 15px 35px rgba(124, 58, 237, 0.15);
}


/* DARK MODE */

:root.dark-mode {
  --bg-color: #0f0a1f;
  --surface-color: #1a1333;

  --primary-color: #a855f7;
  --primary-hover: #9333ea;

  --text-color: #f8fafc;
  --text-light: #c4b5fd;

  --input-bg: #241b42;
  --input-border: #5b21b6;
  --input-focus: #c084fc;

  --border-color: #4c1d95;

  --button-text: #ffffff;

}


body {
  font-family: "Inter", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100dvh;
  padding: 0px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;


}


.signup-container {
  width: 100%;
  max-width: 90vw;
  background: var(--surface-color);
  padding: 40px;
  border-radius: 18px;
  transition: .3s ease;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 70%;
}

.right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30%;
}

@media (max-width: 768px) {
  .right-section {
    display: none;
  }

  .left-section {
    width: 100%;
  }
}

h1 {
  margin-bottom: 25px;
  color: var(--text-color);
  text-align: center;
}




fieldset {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;

  transition: .3s ease;
}

legend {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0 10px;
}



label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: 500;
}


/* input fields */
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  background: var(--input-bg);
  color: var(--text-color);
  border: 2px solid var(--input-border);
  border-radius: 10px;
  transition: .25s ease;
}

input::placeholder {
  color: var(--text-light);
}

input:focus {
  outline: none;
  border-color: var(--input-focus);
}

input:user-invalid {
  border-color: #dc2626;

}   

input:valid {
  border-color: #16a34a;

}


/* button */
button {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: var(--button-text);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: .25s ease;
  margin-top: 20px;
}

.switch-container {
  max-width: 100%;
  position: sticky;

}

#switchButton {
  width: 70px;
  padding: 12px;
  background: var(--primary-color);
  color: var(--button-text);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  
}

.login-link {
    margin-top: 15px;
  text-align: center;
  margin-top: 15px;
  color: var(--text-light);
  font-size: 0.9rem;
  align-items: center;
}
a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}