body {
  background: #0a101a;
  color: #fff;
  font-family: 'Poppins', Arial, sans-serif;
}
.signup-container {
  display: flex;
  min-height: 100vh;
}
.signup-form-section {
  flex: 1;
  max-width: 520px;
  margin: auto 0;
  padding: 48px 40px 24px 40px;
  background: #10172b;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.signup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ff9900;
}
.login-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.button.orange {
  background: #ff9900;
  color: #fff;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.button.orange:hover {
  background: #e67c00;
}
h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.3rem;
}
form#signup-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.form-row {
  display: flex;
  gap: 1rem;
}
input[type='text'], input[type='email'], input[type='password'] {
  background: #0a101a;
  border: 1px solid #222b3a;
  color: #fff;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  width: 100%;
  outline: none;
  transition: border 0.2s;
}
input[type='text']:focus, input[type='email']:focus, input[type='password']:focus {
  border: 1px solid #ff9900;
}
.checkbox {
  display: flex;
  align-items: center;
  font-size: 0.98rem;
  gap: 0.5rem;
}
.signup-footer {
  margin-top: 2rem;
  text-align: center;
  color: #bfc6e0;
  font-size: 0.95rem;
}
.signup-image-section {
  flex: 1;
  background: #0a101a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.signup-image-section img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
}
@media (max-width: 900px) {
  .signup-container {
    flex-direction: column;
  }
  .signup-image-section {
    order: -1;
    min-height: 220px;
    padding: 2rem 0;
  }
  .signup-form-section {
    max-width: 100vw;
    padding: 32px 10vw 24px 10vw;
  }
}
@media (max-width: 600px) {
  body {
    background: #0a101a;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }
  .signup-container {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 0;
    width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .signup-image-section {
    order: -1;
    min-height: 120px;
    padding: 2rem 0 1rem 0;
    justify-content: center;
    align-items: center;
    width: 100vw;
  }
  .signup-image-section img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    margin: 0 auto;
    display: block;
  }
  .signup-form-section {
    background: #181f36;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    margin: 0 auto 2.5rem auto;
    padding: 2rem 1.2rem 1.5rem 1.2rem;
    width: 94vw;
    max-width: 370px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
  }
  .signup-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    gap: 0;
  }
  .logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff9900;
    letter-spacing: 0.5px;
  }
  .login-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
  }
  .login-link span {
    font-size: 0.98rem;
    color: #bfc6e0;
  }
  .login-link .button.orange {
    width: auto;
    min-width: unset;
    padding: 0.35rem 1rem;
    font-size: 0.98rem;
    margin: 0;
    border-radius: 6px;
    box-shadow: none;
    white-space: nowrap;
  }
  h2 {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    margin-top: 0.2rem;
    text-align: left;
    color: #fff;
    font-weight: 600;
  }
  form#signup-form {
    gap: 0.8rem;
    margin-bottom: 1.2rem;
  }
  .form-row {
    flex-direction: column;
    gap: 0.7rem;
  }
  input[type='text'], input[type='email'], input[type='password'] {
    font-size: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: #10173a;
    border: 1px solid #232b3a;
    color: #fff;
    width: 100%;
    box-sizing: border-box;
  }
  .button.orange[type='submit'] {
    width: 100%;
    margin: 0.7rem 0 0 0;
    font-size: 1.08rem;
    padding: 0.85rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255,153,0,0.08);
  }
  .signup-footer {
    margin-top: 1.2rem;
    font-size: 0.93rem;
    color: #bfc6e0;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .signup-form-section {
    padding: 1.2rem 0.5rem 1rem 0.5rem;
    border-radius: 12px;
    width: 99vw;
    max-width: 99vw;
  }
  .signup-image-section img {
    max-width: 90px;
    max-height: 90px;
  }
  .logo {
    font-size: 1.1rem;
  }
}

#loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #191919;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}
#loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.loader {
  width: 64px;
  height: 64px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader::before, .loader::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 6px solid transparent;
  width: 48px;
  height: 48px;
  top: 8px;
  left: 8px;
}
.loader::before {
  border-top: 6px solid #ffb300;
  border-right: 6px solid #ffb300;
  animation: spin 1s linear infinite;
}
.loader::after {
  border-bottom: 6px solid #ffb300;
  border-left: 6px solid #ffb300;
  animation: spin 1s linear infinite reverse;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Error Modal Styles */
#error-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(16, 23, 43, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: opacity 0.3s;
}
#error-modal.hidden {
  opacity: 0;
  pointer-events: none;
}
.error-modal-content {
  background: #10173a;
  color: #fff;
  padding: 2.5rem 2rem 2rem 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  text-align: center;
  min-width: 320px;
  max-width: 90vw;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1.15rem;
}
#error-modal-message {
  display: block;
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
  color: #ffb300;
  word-break: break-word;
}
#close-error-modal {
  background: #ff9900;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 2.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#close-error-modal:hover {
  background: #e67c00;
}
