@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Nunito:wght@600;700;800;900&display=swap');

:root {
  --oje-teal: #0b4a4a;
  --oje-teal-mid: #0e5e5c;
  --oje-teal-deep: #062f30;
  --oje-gold: #f6d15a;
  --oje-gold-mid: #e8b42a;
  --oje-gold-deep: #c48412;
  --oje-cyan: #7ee7ff;
  --oje-cream: #fff8e8;
  --oje-brown: #4a2c10;
  --oje-safe-top: env(safe-area-inset-top, 0px);
  --oje-safe-bottom: env(safe-area-inset-bottom, 0px);
  --oje-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  min-height: 100%;
  font-family: 'Nunito', system-ui, sans-serif;
}

body.oje-auth {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: #6ec8ea;
  color: var(--oje-cream);
  overflow-x: hidden;
}

.oje-screen {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8, 40, 42, 0.08) 0%, rgba(8, 40, 42, 0.04) 38%, rgba(8, 40, 42, 0.38) 100%),
    url('../OJE.png') center top / cover no-repeat;
}

.oje-screen::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(4, 22, 24, 0.45));
}

.oje-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(18px + var(--oje-safe-top)) 18px calc(22px + var(--oje-safe-bottom));
}

.oje-back {
  align-self: flex-start;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #1a7a74 0%, #0b4546 100%);
  border: 2px solid rgba(246, 209, 90, 0.55);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.oje-back svg { width: 16px; height: 16px; }

.oje-brand { text-align: center; margin-top: 2px; padding-top: 20px; position: relative; }

.oje-brand__logo {
  width: min(220px, 68vw);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.oje-brand__logo--sm {
  width: min(180px, 52vw);
}

.oje-mark {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(46px, 14vw, 62px);
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: transparent;
  background: linear-gradient(180deg, #fff6c8 0%, #ffe27a 22%, #f0c33a 52%, #c48412 88%, #8a5610 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 3px 0 #5a3208) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.oje-mark--sm { font-size: clamp(30px, 9vw, 38px); }

.oje-crown {
  position: absolute;
  left: 50%;
  top: 0;
  width: 28px;
  height: 22px;
  transform: translate(-42%, 0);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.oje-ribbon {
  margin: 10px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1b8078 0%, #0a4546 100%);
  border: 1.5px solid var(--oje-gold);
  box-shadow: 0 4px 0 rgba(60, 32, 6, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.oje-ribbon svg { width: 16px; height: 16px; flex-shrink: 0; }

.oje-ribbon span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fff;
  white-space: nowrap;
}

.oje-page-title {
  margin-top: 12px;
  font-family: 'Cinzel', serif;
  font-size: clamp(20px, 5.6vw, 24px);
  font-weight: 800;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.oje-page-sub {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: rgba(255, 248, 232, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.oje-steps {
  width: 100%;
  max-width: 340px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  margin: 16px 0 4px;
}

.oje-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.oje-step__dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.42);
  color: #5a6a70;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.oje-step__dot svg { width: 16px; height: 16px; }

.oje-step.is-active .oje-step__dot,
.oje-step.is-done .oje-step__dot {
  color: var(--oje-brown);
  border-color: #8a5610;
  background: linear-gradient(180deg, #ffe98a 0%, #f0c33a 55%, #c48412 100%);
  box-shadow: 0 0 12px rgba(246, 209, 90, 0.65), 0 3px 0 #8a5610;
}

.oje-step__label {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.oje-step:not(.is-active):not(.is-done) .oje-step__label { opacity: 0.7; }

.oje-step-line {
  height: 2px;
  width: 28px;
  margin-bottom: 18px;
  background: repeating-linear-gradient(90deg, #d7a028 0 5px, transparent 5px 9px);
  opacity: 0.7;
}

.oje-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  min-height: clamp(340px, 52vh, 440px);
  margin-top: 18px;
  padding: 34px 22px 30px;
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(90, 230, 255, 0.16), transparent 55%),
    linear-gradient(165deg, rgba(18, 96, 94, 0.94) 0%, rgba(10, 58, 58, 0.96) 48%, rgba(6, 36, 38, 0.97) 100%);
  border: 2px solid var(--oje-gold);
  box-shadow:
    0 0 0 4px rgba(10, 50, 50, 0.55),
    0 0 0 6px #e8b42a,
    0 0 22px rgba(90, 230, 255, 0.28),
    0 16px 32px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.oje-gem {
  position: absolute;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #e8ffff 0%, #5ad8ff 45%, #1a7ad0 100%);
  box-shadow: 0 0 8px rgba(90, 230, 255, 0.8);
  z-index: 2;
}
.oje-gem--tl { top: 10px; left: 10px; }
.oje-gem--tr { top: 10px; right: 10px; }
.oje-gem--bl { bottom: 10px; left: 10px; }
.oje-gem--br { bottom: 10px; right: 10px; }

.oje-flourish {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--oje-gold);
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 0 8px rgba(246, 209, 90, 0.7);
}
.oje-flourish--top { top: -8px; }
.oje-flourish--bottom { bottom: -8px; }

.oje-card__title {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  color: #fff;
  margin-bottom: 22px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.oje-card .oje-field {
  height: 56px;
  margin-bottom: 14px;
  padding: 0 14px;
  border-radius: 18px;
}

.oje-card .oje-field input {
  font-size: 16px;
}

.oje-card .oje-btn {
  min-height: 54px;
  margin-top: 10px;
  font-size: 19px;
}

.oje-alert {
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(224, 82, 43, 0.2);
  border: 1px solid rgba(255, 170, 140, 0.45);
  color: #ffe8e0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.oje-panel[hidden] { display: none !important; }

.oje-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  margin-bottom: 12px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(4, 22, 24, 0.55);
  border: 1.5px solid rgba(126, 231, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(246, 209, 90, 0.12);
}

.oje-field:focus-within {
  border-color: var(--oje-gold);
  box-shadow: 0 0 0 2px rgba(246, 209, 90, 0.28);
}

.oje-field__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--oje-gold);
}

.oje-prefix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
  margin-right: 2px;
  border-right: 1px solid rgba(126, 231, 255, 0.35);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.oje-prefix svg { width: 10px; height: 10px; opacity: 0.8; }

.oje-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
}

.oje-field input::placeholder { color: rgba(255, 248, 232, 0.48); font-weight: 700; }

.oje-eye {
  border: 0;
  background: none;
  color: rgba(255, 248, 232, 0.62);
  display: grid;
  place-items: center;
  padding: 4px;
  cursor: pointer;
}
.oje-eye svg { width: 20px; height: 20px; }
.oje-eye.is-on { color: var(--oje-gold); }

.oje-gift {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 16px;
  border: 1.5px dashed rgba(246, 209, 90, 0.55);
  background: rgba(4, 22, 24, 0.32);
}

.oje-gift .oje-field {
  flex: 1;
  margin: 0;
  height: 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.oje-gift__copy { min-width: 0; }

.oje-gift__title {
  font-size: 12px;
  font-weight: 900;
  color: var(--oje-gold);
  margin-bottom: 2px;
}

.oje-gift__hint {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 248, 232, 0.7);
}

.oje-btn {
  width: 100%;
  margin-top: 6px;
  min-height: 50px;
  border: 2px solid #8a5610;
  border-radius: 999px;
  cursor: pointer;
  color: var(--oje-brown);
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #fff1a8 0%, #f6d15a 28%, #e8b42a 68%, #c48412 100%);
  box-shadow: 0 5px 0 #8a5610, 0 10px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.oje-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #8a5610, 0 4px 8px rgba(0, 0, 0, 0.28); }

.oje-btn--ghost {
  margin-top: 10px;
  background: rgba(4, 22, 24, 0.28);
  border-color: rgba(246, 209, 90, 0.4);
  color: var(--oje-gold);
  box-shadow: none;
  min-height: 42px;
  font-size: 14px;
}

.oje-switch {
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 248, 232, 0.92);
}

.oje-switch a {
  color: var(--oje-gold);
  text-decoration: none;
  font-weight: 900;
}

.oje-done {
  text-align: center;
  padding: 8px 6px 4px;
}

.oje-done__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--oje-brown);
  background: linear-gradient(180deg, #fff1a8, #e8b42a);
  box-shadow: 0 0 18px rgba(246, 209, 90, 0.55);
}

.oje-done__icon svg { width: 32px; height: 32px; }

.oje-done h2 {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  margin-bottom: 6px;
}

.oje-done p {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 248, 232, 0.85);
  line-height: 1.45;
}

.oje-spacer { flex: 1; min-height: 12px; }

@media (max-height: 740px) {
  .oje-mark { font-size: 44px; }
  .oje-card {
    margin-top: 12px;
    min-height: clamp(300px, 46vh, 380px);
    padding: 26px 18px 22px;
  }
  .oje-card .oje-field { height: 52px; margin-bottom: 12px; }
  .oje-card .oje-btn { min-height: 50px; }
  .oje-field { height: 48px; margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .oje-btn { transition: none; }
}
