/* ════════════════════════════════════════════════════════
   landing.css  —  Dual Split Portal (Yiran Studio & Savi So)
   Aesthetic: Fullscreen 50/50 Dual Studio Portal (No Scroll)
════════════════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --blue:   #007BFF;
  --blue-d: #0056b3;
  --white:  #ffffff;
  --ink:    #0d0d0d;
  --yellow: #FFD600;
  --mint:   #20ba72;
  --mint-d: #16965a;
  --dark:   #0a0e0d;
  --muted:  rgba(255, 255, 255, 0.65);
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  border-radius: 0px !important;
}

html, body {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #0d0d0d;
  color: var(--white);
  font-family: 'Roboto', sans-serif;
}

/* ── MAIN SPLIT WRAPPER ── */
main.split-portal-main {
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* ── 50/50 SPLIT VIEWPORT ── */
.split-viewport {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── EACH HALF ── */
.split-half {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px clamp(20px, 4vw, 56px);
  text-decoration: none;
  color: #ffffff;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
  user-select: none;
}

.half-bg-pattern {
  position: absolute;
  inset: 0;
  background-size: 36px 36px;
  background-position: 0 0, 0 18px, 18px -18px, -18px 0;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.split-half:hover .half-bg-pattern {
  opacity: 0.8;
}

/* ── LEFT HALF: YIRAN STUDIO ── */
.half-yiran {
  background: var(--blue);
  border-right: 2px solid rgba(255, 255, 255, 0.2);
}

.half-yiran .half-bg-pattern {
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.065) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.065) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.065) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.065) 75%);
}

.half-yiran:hover {
  background: #0070ea;
}

/* ── RIGHT HALF: SAVI SO. ── */
.half-saviso {
  background: var(--mint);
  border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.half-saviso .half-bg-pattern {
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.065) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.065) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.065) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.065) 75%);
}

.half-saviso:hover {
  background: #3ea074;
}

/* ── HALF CONTENT ── */
.half-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.half-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.half-badge {
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  padding: 4px 12px;
  text-transform: uppercase;
}

.badge-blue {
  background: #ffffff;
  color: var(--blue);
}

.badge-saviso {
  background: #ffffff;
  color: var(--mint);
}

.half-sub-tag {
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  opacity: 0.85;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffffff;
}

/* ── TITLES & TYPOGRAPHY ── */
.half-title {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 6px;
}

.half-cn {
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 20px;
}

.cn-saviso {
  color: var(--yellow);
  font-weight: 700;
}

.half-desc {
  font-size: clamp(0.92rem, 1.35vw, 1.05rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  max-width: 440px;
  margin-bottom: 36px;
}

/* ── ACTION BUTTONS ── */
.half-enter-btn {
  width: 100%;
  max-width: 280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-family: 'BBHBartle', 'SourceHanSansSC', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, color 0.2s;
  box-sizing: border-box;
}

.btn-yiran-action {
  background: #ffffff;
  color: var(--blue);
}

.split-half.half-yiran:hover .btn-yiran-action {
  background: var(--yellow);
  color: #0d0d0d;
  transform: translateY(-2px);
}

.btn-saviso-action {
  background: #ffffff;
  color: var(--mint);
}

.split-half.half-saviso:hover .btn-saviso-action {
  background: var(--yellow);
  color: #0d0d0d;
  transform: translateY(-2px);
}

.half-arrow {
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

.split-half:hover .half-arrow {
  transform: translateX(6px);
}

.half-enter-btn.locked {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

/* ── FLOATING MIRRORS BAR ── */
.portal-bottom-bar {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mirrors-container {
  position: relative;
  display: inline-flex;
}

.mirrors-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  background: rgba(13, 13, 13, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: 'BBHBartle', sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.mirrors-toggle:hover {
  background: rgba(13, 13, 13, 0.95);
  border-color: var(--yellow);
}

.mirrors-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 300px;
  background: #141a18;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  text-align: left;
}

.mirrors-container.open .mirrors-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mirrors-menu-title {
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: #8899a6;
  padding: 6px 10px 8px;
  text-transform: uppercase;
}

.mirror-option {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  color: #ffffff;
  background: #1b2421;
  text-decoration: none;
  margin-bottom: 6px;
  border: 1px solid transparent;
  transition: background 0.15s;
}

.mirror-option:hover {
  background: var(--yellow);
  color: #0d0d0d;
}

.mirror-option:hover .mirror-option-name {
  color: #0d0d0d;
}

.mirror-option.active {
  border-color: var(--mint);
}

.mirror-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mirror-option-name {
  font-family: 'BBHBartle', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.mirror-option-domain {
  font-size: 0.74rem;
  opacity: 0.65;
}

.mirror-badge {
  font-size: 0.6rem;
  font-weight: 900;
  padding: 2px 6px;
}

.main-badge {
  background: var(--yellow);
  color: #0d0d0d;
}

.backup-badge {
  background: #334155;
  color: #ffffff;
}

/* ── PRELOADER OVERLAY ── */
#preloader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: auto;
  background: var(--blue, #007BFF);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8vh 24px;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

#preloader-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-body {
  width: 100%;
  max-width: 650px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
  margin: 30px 0;
  mask-image: linear-gradient(to bottom, transparent 0%, white 15%, white 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, white 15%, white 85%, transparent 100%);
}

.preloader-body::-webkit-scrollbar { display: none; }

#tlog-inner {
  display: flex;
  flex-direction: column;
  padding: 10px 0 80px;
}

.tline {
  font-family: monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  opacity: 0;
  transform: translateY(5px);
  animation: tlineIn 0.1s ease forwards;
}

@keyframes tlineIn {
  to { opacity: 1; transform: translateY(0); }
}

.tline.dim    { color: rgba(255, 255, 255, 0.45); }
.tline.mid    { color: rgba(255, 255, 255, 0.7); }
.tline.green  { color: #adff2f; }
.tline.blue   { color: #b3d9ff; }
.tline.yellow { color: #FFD600; font-weight: 500; }
.tline.cyan   { color: #e0ffff; }
.tline.muted  { color: rgba(255, 255, 255, 0.25); }
.tline.bold   { color: #ffffff; font-weight: bold; }

.preloader-footer {
  width: 100%;
  max-width: 650px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: 'BBHBartle', monospace;
}

.progress-label {
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

.progress-percent {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--yellow);
}

#tprogress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

#tprogress-bar {
  width: 0%;
  height: 100%;
  background: var(--yellow);
  transition: width 0.1s ease;
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 820px) {
  html, body, main.split-portal-main {
    height: auto;
    overflow-y: auto;
  }
  .split-viewport {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }
  .half-yiran {
    border-right: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 60px 20px 80px;
  }
  .half-saviso {
    padding: 60px 20px 80px;
  }
  .half-title {
    font-size: 2.2rem;
  }
  .portal-bottom-bar {
    position: static;
    transform: none;
    padding: 20px;
    background: #080a09;
  }
}
