@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #f2e7db;
  --text: #2b201c;
  --muted: #7b685f;
  --line: rgba(67,48,38,0.08);
  --card: rgba(255,250,246,0.72);
  --card-solid: #fffaf6;
  --accent: #9b4d36;
  --accent2: #d6a15d;
  --btn-text: #fffaf6;
  --bg-secondary: #ede5dc;
  --border: rgba(67,48,38,0.12);
  --border-light: rgba(67,48,38,0.2);
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow: 0 4px 20px rgba(43, 32, 28, 0.1);
  --shadow-lg: 0 8px 40px rgba(43, 32, 28, 0.15);
  --transition: all 0.2s ease;
}

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

html {
  font-size: 16px;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.25rem;
  position: relative;
  background: linear-gradient(135deg, var(--bg) 0%, #e8dccf 100%);
}

.onboarding-slider {
  width: 100%;
  max-width: 30rem;
  overflow: hidden;
}

.slide-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-card {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

.slide-content {
  text-align: center;
  max-width: 22.5rem;
}

.slide-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--btn-text);
  box-shadow: var(--shadow);
}

.slide-content h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.slide-content h1 span {
  color: var(--accent);
}

.slide-content p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.slide-indicators {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
}

.indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--line);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  background: var(--accent);
  width: 1.5rem;
  border-radius: var(--radius-full);
}

.indicator:hover {
  background: var(--accent2);
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--card-solid);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.slide-nav:hover {
  background: var(--bg);
  border-color: var(--accent);
}

.slide-nav.prev { left: 1.25rem; }
.slide-nav.next { right: 1.25rem; }

.slide-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 32, 28, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
}

.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 25rem;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  z-index: 101;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--line);
  color: var(--text);
}

.modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-logo {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-desc {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  outline: none;
  transition: var(--transition);
}

.field input:focus {
  border-color: var(--accent);
  background: var(--card-solid);
}

.field input::placeholder {
  color: var(--muted);
}

.password-input {
  position: relative;
}

.password-input input {
  padding-right: 2.75rem;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
}

.toggle-password:hover {
  color: var(--accent);
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
}

.checkbox-field input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
  margin-top: 0.125rem;
}

.checkbox-field span {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
}

.forgot-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.875rem;
  cursor: pointer;
  text-align: right;
  padding: 0;
}

.forgot-link:hover {
  text-decoration: underline;
}

.form-message {
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.form-message.error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--danger);
}

.form-message.success {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.3);
  color: var(--success);
}

.btn-onboarding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-onboarding.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: var(--btn-text);
  box-shadow: var(--shadow);
}

.btn-onboarding.primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-onboarding.secondary {
  background: var(--card-solid);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-onboarding.secondary:hover {
  background: var(--bg);
  border-color: var(--accent);
}

.btn-onboarding.tertiary {
  background: transparent;
  color: var(--muted);
}

.btn-onboarding.tertiary:hover {
  color: var(--text);
}

.btn-onboarding.google {
  background: var(--card-solid);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-onboarding.google:hover {
  background: var(--bg);
  border-color: var(--border-light);
}

.full-width {
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  color: var(--muted);
  font-size: 0.8125rem;
}

@media (max-width: 480px) {
  .slide-content h1 {
    font-size: 1.5rem;
  }
  
  .slide-icon {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
  }
  
  .slide-nav {
    display: none;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
}
