:root {
  --primary: #a98e64;
  --primary-hover: #967d58;
  --bg-main: #fcfcfc;
  --bg-card: #ffffff;
  --text-main: #111111;
  --text-muted: #555555;
  --border-color: #d1d5db;
  --error: #ef4444;
  --success: #10b981;
  --radius: 0px;
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

.background-elements { 
  display: none; 
}

.container {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  z-index: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-logo {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 5px;
  margin-bottom: 40px;
  text-align: center;
  color: #000;
}

.brand-logo .reg-mark {
  font-size: 10px;
  vertical-align: super;
  letter-spacing: 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid #eaeaea;
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-header {
  text-align: left;
  margin-bottom: 32px;
}

.card-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.row {
  display: flex;
  gap: 16px;
}

.row .form-control {
  flex: 1;
}

/* Input with Icon (MUI Style) */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  padding-right: 45px;
  cursor: pointer;
}

.input-icon {
  position: absolute;
  right: 16px;
  width: 20px;
  height: 20px;
  color: #9ca3af;
  pointer-events: none;
}

/* Wheel Picker Modal Style */
.wheel-modal {
  width: 90% !important;
  max-width: 360px !important;
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
  border-radius: 28px !important; /* Extra rounded like the image */
}

.wheel-header {
  padding: 24px;
  text-align: center;
  position: relative;
  font-weight: 500;
  letter-spacing: 1px;
  color: #333;
  font-size: 15px;
}

.wheel-close-btn {
  position: absolute;
  right: 24px;
  top: 24px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.wheel-container {
  display: flex;
  height: 220px;
  position: relative;
  padding: 0 10px;
  mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
}

.wheel-highlight {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  height: 44px;
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
  border-radius: 8px;
}

.wheel-column {
  flex: 1;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  z-index: 1;
}

.wheel-column::-webkit-scrollbar {
  display: none;
}

.wheel-spacer {
  height: 88px; /* height of 2 items */
}

.wheel-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 18px;
  color: #999;
  transition: color 0.2s, transform 0.2s;
  cursor: pointer;
}

.wheel-item.active {
  color: #000;
  font-weight: 600;
  transform: scale(1.1);
}

.wheel-footer {
  padding: 24px;
}

.wheel-submit-btn {
  width: 100%;
  padding: 16px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.wheel-submit-btn:hover {
  opacity: 0.9;
}

.form-control {
  margin-bottom: 24px;
  position: relative;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="tel"],
input[type="date"],
select.form-select {
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  appearance: none;
}

select.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23707070%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px top 50%;
  background-size: 10px auto;
}

select.form-select:invalid, select.form-select option[value=""] {
  color: #9ca3af;
}

input::placeholder {
  color: #9ca3af;
}

input:focus, select.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

input.invalid, select.form-select.invalid {
  border-color: var(--error);
  background: #fff;
}

input.invalid:focus, select.form-select.invalid:focus {
  box-shadow: 0 0 0 1px var(--error);
}

.error-msg {
  color: var(--error);
  font-size: 12px;
  margin-top: 6px;
  display: block;
  opacity: 0;
  transform: translateY(-4px);
  position: absolute;
  pointer-events: none;
  transition: var(--transition);
  font-weight: 500;
}

.error-msg.show {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

/* Phone prefix styling */
.phone-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.phone-prefix {
  position: absolute;
  left: 16px;
  color: var(--text-main);
  font-size: 14px;
  pointer-events: none;
  font-weight: 500;
}

.phone-input-wrapper input {
  padding-left: 50px;
}

/* Buttons */
button[type="submit"], .primary-btn {
  width: 100%;
  padding: 14px;
  background: var(--text-main);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.primary-btn { 
  width: auto; 
  min-width: 120px; 
  background: var(--primary);
  margin-top: 0;
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--primary);
}
.primary-btn:hover {
  background: var(--primary-hover);
}

button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

button[type="submit"].btn-cooldown {
  background: #6b7280;
  opacity: 1;
  cursor: not-allowed;
  letter-spacing: 0.5px;
}

.secondary-btn {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  margin-right: 12px;
}

.secondary-btn:hover {
  background: #f3f4f6;
}

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  position: absolute;
  right: 20px;
}

.loader.hidden {
  display: none;
}

.modal-loader.hidden {
  display: none;
}

/* Success Modal Stylings */
.success-card {
  text-align: center;
  padding: 40px 30px;
}

.success-icon {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 20px;
  animation: bounce 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
}

.success-card h2 {
  color: var(--primary);
  font-size: 28px;
  margin-bottom: 12px;
}

.success-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 16px;
  margin-bottom: 30px;
}

.centered-action {
  justify-content: center;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.message {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
  display: none;
  animation: fadeIn 0.3s ease;
  text-align: center;
}

.message.show {
  display: block;
}

.message.error {
  background: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.message.success {
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 24px 24px 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 0 24px 24px 24px;
  overflow-y: auto;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Scrollbar for modal body */
.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.modal-footer {
  padding: 24px;
  border-top: 1px solid #eaeaea;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 480px) {
  .row {
    flex-direction: column;
    gap: 0;
  }
  .card {
    padding: 30px 20px;
    border: none;
    box-shadow: none;
  }
  body {
    background-color: var(--bg-card);
  }
}
