/* Binance Login Page Clone */
:root {
  --binance-yellow: #F0B90B;
  --binance-yellow-hover: #f5c842;
  --bg-dark: #1C2127;
  --bg-input: #2B3139;
  --bg-card: #23262D;
  --border-light: #474D57;
  --border-subtle: rgba(255, 255, 255, 0.15);
  --text-primary: #EAECEF;
  --text-secondary: #B7BDC6;
  --text-muted: #848E9C;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

[hidden] {
  display: none !important;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 24px;
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

/* Header / Logo */
.header {
  width: 100%;
  margin-bottom: 48px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--binance-yellow);
  cursor: default;
}

.logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--binance-yellow);
}

/* Main content */
.main-content {
  width: 100%;
  flex: 1;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 32px;
  text-align: left;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: -8px;
}

.input-wrapper {
  position: relative;
}

.error-message {
  font-size: 14px;
  color: #F6465D;
  margin-top: -4px;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}

.error-message.visible {
  opacity: 1;
}

.step-2-placeholder {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  padding: 24px 0;
}

.email-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

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

.email-input:focus {
  border-color: var(--binance-yellow);
  background-color: var(--bg-input);
}

/* Links */
.link {
  color: var(--text-secondary);
  text-decoration: underline;
  cursor: default;
}

.link:hover {
  color: var(--text-primary);
}

.link-secondary {
  color: var(--text-secondary);
  text-decoration: none;
}

.link-secondary:hover {
  color: var(--text-primary);
}

.link-accent {
  color: var(--binance-yellow);
  text-decoration: none;
}

.link-accent:hover {
  color: var(--binance-yellow-hover);
}

/* Primary button */
.btn-primary {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: #1a1b20;
  background-color: var(--binance-yellow);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--binance-yellow-hover);
}

.btn-primary:disabled {
  cursor: not-allowed;
}

.btn-primary .btn-loader {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.btn-primary .btn-loader[hidden] {
  display: none !important;
}

.btn-primary .btn-text[hidden] {
  display: none !important;
}

.btn-primary .btn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #1a1b20;
  animation: btn-bounce 1.4s ease-in-out infinite both;
}

.btn-primary .btn-dot:nth-child(1) { animation-delay: -0.32s; }
.btn-primary .btn-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes btn-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.6; }
  40% { transform: scale(1); opacity: 1; }
}

/* Separator */
.separator {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.separator-line {
  flex: 1;
  height: 1px;
  background-color: var(--border-subtle);
}

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

/* Social buttons */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-social:hover {
  background-color: #33363d;
  border-color: #5a616b;
}

.social-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.social-icon-apple,
.social-icon-passkey {
  color: #fff;
}

/* Action links (Create account, Need help) */
.action-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.link-action {
  font-size: 14px;
  text-align: center;
}

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 32px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-link:hover {
  color: var(--text-secondary);
}

.footer-icon {
  width: 18px;
  height: 18px;
}

/* Password step */
.password-step .login-title {
  margin-bottom: 8px;
}

.masked-email {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.password-wrapper {
  display: flex;
  align-items: center;
}

.password-input {
  padding-right: 48px;
  border: 2px solid var(--binance-yellow);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
}

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

.eye-icon {
  width: 24px;
  height: 24px;
}

.password-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  text-align: center;
}

.password-links .link-accent {
  font-size: 14px;
}

/* Verification modals (Phone, Email Code, Authenticator) */
.verification-modal {
  width: 100%;
  position: relative;
  padding-top: 40px;
}

.verification-modal .modal-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.verification-modal .modal-close:hover {
  color: var(--text-primary);
}

.verification-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  text-align: left;
}

.verification-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.verification-terms {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-icon {
  width: 18px;
  height: 18px;
}

.verification-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.verification-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  outline: none;
}

.input-with-action,
.input-with-paste {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.input-with-action .verification-input,
.input-with-paste .verification-input {
  flex: 1;
  border: none;
  background: transparent;
}

.get-code-btn,
.paste-btn {
  background: none;
  border: none;
  color: var(--binance-yellow);
  font-size: 14px;
  font-weight: 600;
  padding: 0 16px;
  cursor: pointer;
}

.get-code-btn:hover,
.paste-btn:hover {
  color: var(--binance-yellow-hover);
}

.get-code-btn.clicked,
.get-code-btn:disabled {
  color: var(--text-muted);
  cursor: default;
}

.get-code-btn:disabled:hover {
  color: var(--text-muted);
}

.btn-submit {
  margin-top: 8px;
}

.security-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--binance-yellow);
  text-decoration: none;
}

.security-link:hover {
  color: var(--binance-yellow-hover);
}

.binance-risk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  font-size: 12px;
  color: var(--text-muted);
}

.padlock-icon {
  width: 16px;
  height: 16px;
}

.secure-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.secure-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}
