* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #ffffff;
  color: #1a1a1a;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
}

/* Screen Management */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* Splash Screen */
#splash-screen {
  background-color: #F5A623;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.splash-logo {
  width: 300px;
  max-width: 80vw;
  height: auto;
  object-fit: contain;
}

.splash-loader {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Spinner */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #666;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-small-white {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 1.5rem;
}

.back-btn,
.help-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #333;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.back-btn:hover,
.help-btn:hover {
  background-color: #f0f0f0;
}

.header-logo {
  width: 140px;
  height: auto;
  object-fit: contain;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 0 1.5rem 2rem;
  overflow: hidden;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
}

.page-subtitle {
  font-size: 1rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.link {
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.link:hover {
  color: #333;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  position: relative;
}

.input-label {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
  pointer-events: none;
}

.input {
  width: 100%;
  padding: 1.75rem 1rem 0.75rem;
  font-size: 1rem;
  border: 2px solid #3b82f6;
  border-radius: 0.5rem;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}

.input:focus {
  border-color: #2563eb;
}

.input::placeholder {
  color: #aaa;
}

.input.error {
  border-color: #ef4444;
}

.otp-input {
  font-family: monospace;
  letter-spacing: 0.25em;
}

.hidden {
  display: none !important;
}

/* Forgot Password */
.forgot-password {
  text-align: right;
  margin-top: 0.5rem;
}

/* Error Message */
.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Timer Row */
.timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.timer-text {
  font-size: 0.875rem;
  color: #666;
}

.resend-btn {
  background: none;
  border: none;
  font-size: 0.875rem;
  cursor: pointer;
}

.resend-btn:disabled {
  color: #aaa;
  text-decoration: none;
  cursor: not-allowed;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.btn-primary {
  background-color: #e5e5e5;
  color: #999;
}

.btn-primary:disabled {
  background-color: #e5e5e5;
  color: #999;
}

.btn-primary:not(:disabled) {
  background-color: #3b82f6;
  color: #ffffff;
}

.btn-primary:not(:disabled):hover {
  background-color: #2563eb;
}

.btn-verify {
  background-color: #7cb9e8;
  color: #fff;
}

.btn-verify:not(:disabled) {
  background-color: #7cb9e8;
  color: #fff;
}

.btn-verify:not(:disabled):hover {
  background-color: #6aa8d7;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-text {
  display: inline-block;
}

.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Transition Loader Overlay */
.transition-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #F5A623;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Responsive */
@media (min-width: 480px) {
  .main-content {
    max-width: 400px;
    margin: 0 auto;
  }
  
  .header {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
}
