.profile-page {
  background: #000;
  color: #fff;
  min-height: 100vh;
}

.profile-page .rb-login-btn {
  visibility: hidden;
  pointer-events: none;
}

.profile-hero {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.profile-card {
  width: min(440px, 90vw);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 40px 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.profile-card[hidden] {
  display: none !important;
}

.profile-title {
  font-family: var(--brand-font);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  letter-spacing: -0.01em;
  margin: 0;
}

.profile-subtitle {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  font-size: 1rem;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.profile-message.is-hidden {
  display: none;
}

.profile-message.is-error {
  background: rgba(225, 6, 0, 0.12);
  border-color: rgba(225, 6, 0, 0.35);
  color: #ffffff;
}

.profile-message.is-success {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.35);
  color: #ffffff;
}

.profile-message.is-info {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
}

.signup-only {
  display: none;
}

.profile-form.is-signup .signup-only {
  display: block;
}

.profile-form.is-signup .login-only {
  display: none;
}

.login-step-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.profile-form.is-login-step1 .login-step-email {
  display: flex;
}

.profile-form.is-login-step2 .login-step-password {
  display: flex;
}

.login-step1-only {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.profile-form.is-login-step1 .login-step1-only {
  display: flex;
}

.signup-step-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.profile-form.is-signup.is-signup-step1 .signup-step-email {
  display: flex;
}

.profile-form.is-signup.is-signup-step2 .signup-step-details {
  display: flex;
}

.signup-note {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.4;
}

.signup-email-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  justify-content: center;
  text-align: center;
}

.signup-email-value {
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
}

.forgot-only {
  display: none;
}

.profile-form.is-forgot .forgot-only {
  display: block;
}

.profile-form.is-forgot .login-only,
.profile-form.is-forgot .signup-only {
  display: none;
}

.profile-form.is-forgot #customGoogleBtn {
  display: none !important;
}

.profile-form.is-forgot #googleBtnContainer {
  display: none !important;
}

.profile-form.is-forgot #googleBtnContainerSignup {
  display: none !important;
}

.recovery-code-step,
.recovery-password-step {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.profile-form.is-recovering .recovery-code-step {
  display: flex;
}

.profile-form.is-code-verified .recovery-code-step {
  display: none;
}

.profile-form.is-code-verified .recovery-password-step {
  display: flex;
}

.profile-form.is-code-verified .recovery-email-input {
  display: none;
}

.profile-recovery-email {
  margin: 2px 0 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.profile-form.is-recovering #profileRecoverBtn {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 14px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  box-shadow: none;
}

.profile-form.is-code-verified #profileRecoverBtn {
  display: none;
}

.profile-hint {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.profile-back-link {
  display: none;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  cursor: pointer;
  padding: 0;
  align-self: flex-start;
  margin-bottom: 8px;
}

.profile-back-link:hover,
.profile-back-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.profile-card.is-forgot .profile-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-back-link::before {
  content: "←";
  font-size: 0.95rem;
  line-height: 1;
}

.profile-card.is-forgot {
  text-align: left;
}

.profile-card.is-forgot .profile-title {
  padding-top: 0;
  margin-top: 6px;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.05;
}

.profile-card.is-forgot .profile-subtitle {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.7);
}

.profile-form.is-signup .profile-link.login-only {
  display: none;
}

.profile-link--alt {
  background: transparent;
  border: none;
  padding: 0;
  text-align: center;
  cursor: pointer;
  align-self: center;
}

.profile-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.7);
}

.profile-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-input:focus {
  border-color: rgba(225, 6, 0, 0.85);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.2);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.profile-btn {
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: 999px;
  background: #e10600;
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.profile-btn:hover,
.profile-btn:focus-visible {
  background-color: #0b0b0b;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

.profile-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-btn--secondary:hover,
.profile-btn--secondary:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.profile-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 8px 0;
}

.profile-separator::before,
.profile-separator::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.profile-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 4px;
}

.profile-link:hover,
.profile-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.profile-cta {
  margin: 2px 0 4px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-link-highlight {
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 700;
  color: #6cc6ff;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.profile-link-highlight:hover,
.profile-link-highlight:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-email-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.login-email-value {
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
}

.profile-card.is-login-step2 .profile-back-link,
.profile-card.is-signup .profile-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.is-authenticated #profileLoginCard {
  display: none;
}

body.is-authenticated #profileInfoCard {
  display: flex;
}

.profile-card--info {
  gap: 20px;
  align-items: stretch;
}

.profile-card.is-forgot .profile-title {
  padding-top: 12px;
}

.profile-info-list {
  display: grid;
  gap: 14px;
  text-align: left;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-info-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.profile-info-value {
  font-weight: 700;
}

@media (max-width: 720px) {
  .profile-card {
    padding: 32px 24px;
  }
}
