/* ════════════════════════════════════════════
   CALL ELAYNE — PREMIUM REDESIGN v2
   Inspired by Juazeiro do Norte × Taroudant split-screen mock
   ════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --font-serif: 'Cormorant Garamond', 'Playfair Display', serif;
  --font-sans: 'Outfit', system-ui, sans-serif;

  --ink: #2c3e50;
  --ink-soft: #4a5a6a;
  --muted: #6b7480;

  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: blur(22px) saturate(140%);
  --shadow-soft: 0 10px 30px rgba(30, 40, 60, 0.12);
  --shadow-lift: 0 18px 50px rgba(30, 40, 60, 0.18);

  --gold: #c9a063;
  --accent: #ff8a5b;
}

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hidden { display: none !important; }

/* ── Layout container ─────────────────────── */
.join-screen {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.split-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../img/background.jpg');
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.join-screen::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.52);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 12px 36px rgba(15,23,42,0.22);
}

/* subtle warm vignette + top light wash for legibility */
.bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(62,189,205,0.22) 0%, rgba(62,189,205,0.08) 46%, rgba(226,138,82,0.07) 54%, rgba(226,138,82,0.22) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(180deg, rgba(255,245,230,0.18) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.08) 100%);
}

/* ── Corner decorative accents ────────────── */
.corner-accent {
  position: absolute;
  width: 140px;
  height: 140px;
  z-index: 2;
  pointer-events: none;
}
.corner-accent svg { width: 100%; height: 100%; }
.corner-tl { top: 14px; left: 18px; }
.corner-tr { top: 14px; right: 18px; }

/* ── Top bar ──────────────────────────────── */
.top-bar {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 40px;
  padding: 34px 70px 10px;
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.logo-new {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 4.4vw, 4.2rem);
  letter-spacing: 0.5px;
  color: #f7f1e6;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.18),
    0 6px 22px rgba(0,0,0,0.22);
  line-height: 1;
}
.logo-underline {
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  border-radius: 2px;
}

/* ── Profile cards ────────────────────────── */
.profile-card {
  justify-self: start;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 22px;
  padding: 14px 28px 14px 18px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  box-shadow: var(--shadow-soft);
  min-width: 260px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.top-bar > .profile-card:last-of-type { justify-self: end; }

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: rgba(255,255,255,0.78);
  transition: opacity .25s ease;
  opacity: 1;
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .28s ease, transform .28s ease;
  pointer-events: none;
}

.profile-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 20px 48px rgba(30, 40, 60, 0.22), 0 0 0 1px rgba(255,255,255,0.7) inset;
  border-color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.9);
}
.profile-card:disabled {
  opacity: 1;
}
.profile-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}
.profile-card.active {
  box-shadow: 0 10px 30px rgba(108,99,255,0.18), 0 0 0 2px rgba(108,99,255,0.35) inset;
}
.profile-card:hover::after,
.profile-card.connecting::after {
  opacity: 1;
  transform: scale(1);
}

.profile-elayne-card::after {
  background:
    radial-gradient(circle at 16% 24%, rgba(255,255,255,0.95) 0 10%, transparent 11%),
    radial-gradient(circle at 92% 14%, rgba(255, 220, 120, 0.55) 0 0.45rem, transparent 0.5rem),
    linear-gradient(115deg, rgba(18, 176, 161, 0.34), rgba(255, 242, 166, 0.42) 48%, rgba(18, 150, 105, 0.25)),
    url('../img/background.jpg');
  background-size: auto, auto, auto, 220%;
  background-position: center, center, center, 18% 48%;
}

.profile-mostafa-card::after {
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,0.85) 0 10%, transparent 11%),
    linear-gradient(115deg, rgba(190, 42, 55, 0.22), rgba(255, 214, 142, 0.44) 50%, rgba(19, 116, 82, 0.20)),
    url('../img/background.jpg');
  background-size: auto, auto, 220%;
  background-position: center, center, 82% 48%;
}

.profile-card.connecting {
  pointer-events: none;
  color: #132238;
  /* Animated flowing gradient background */
  background-size: 300% 300% !important;
  animation: connectingFlow 2.2s ease infinite !important;
  box-shadow:
    0 22px 60px rgba(0,0,0,0.28),
    0 0 0 2.5px rgba(255,255,255,0.55) inset !important;
  border-color: rgba(255,255,255,0.7) !important;
}

/* The flowing gradient itself */
@keyframes connectingFlow {
  0%   { background-position: 0% 50%;   filter: brightness(1); }
  33%  { background-position: 100% 50%; filter: brightness(1.06); }
  66%  { background-position: 50% 100%; filter: brightness(1.03); }
  100% { background-position: 0% 50%;   filter: brightness(1); }
}

/* Connecting text in Portuguese — replaces hint */
.profile-card.connecting .profile-hint {
  right: auto;
  left: 0;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(19, 34, 56, 0.82) !important;
  transform: translateY(0) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.3px !important;
}

/* Pulse dot inside the hint for connecting state */
.profile-card.connecting .profile-hint::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(19, 34, 56, 0.7);
  animation: connectDot 1.1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes connectDot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.7); }
}

/* Shift name up slightly to make room for the connecting text */
.profile-card.connecting .profile-name {
  transform: translateY(-6px);
  transition: transform 0.3s ease;
}

.profile-flag {
  width: 44px;
  height: 30px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  flex-shrink: 0;
  display: inline-block;
}
.profile-flag svg { display: block; width: 100%; height: 100%; }

.profile-name {
  font-family: var(--font-sans);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.profile-hint {
  position: absolute;
  right: 18px;
  bottom: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(44, 62, 80, 0.0);
  letter-spacing: 0;
  transform: translateY(5px);
  transition: color .22s ease, transform .22s ease;
}

.profile-card:hover .profile-hint,
.profile-card.connecting .profile-hint {
  color: rgba(44, 62, 80, 0.76);
  transform: translateY(0);
}

/* ── Center connect area (absolutely centered under logo) ── */
.center-connect {
  display: none;
}

.who-text {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  text-transform: uppercase;
  letter-spacing: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.btn-connect-new {
  position: relative;
  border: none;
  padding: 16px 46px;
  border-radius: 999px;
  color: #3a2a14;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  letter-spacing: 0.4px;
  background:
    linear-gradient(135deg,
      #ffd5a8 0%,
      #f5b98f 18%,
      #f0a79a 38%,
      #d9b8e3 58%,
      #a7c9ef 78%,
      #9fd8c2 100%);
  box-shadow:
    0 14px 30px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -8px 18px rgba(255,255,255,0.25);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-connect-new::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.45);
  pointer-events: none;
}
.btn-connect-new:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 22px 44px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -8px 18px rgba(255,255,255,0.25);
  filter: brightness(1.04);
}
.btn-connect-new:active { transform: translateY(-1px) scale(1.00); }

.btn-plus {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 500;
  font-size: 2.2rem;
  line-height: 1;
  opacity: 0.85;
}

/* ── Main grid ────────────────────────────── */
.main-content {
  position: relative;
  z-index: 5;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.3fr) minmax(280px, 1fr);
  align-items: center;
  padding: 0 70px 90px;
  gap: 48px;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 26px;
  justify-content: center;
}

.side-column { max-width: 360px; }
.main-content .side-column:last-child { justify-self: end; }

/* ── Widget cards ─────────────────────────── */
.widget-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.widget-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(255,255,255,0.35), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(201,160,99,0.08), transparent 40%);
  pointer-events: none;
}

.city-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.3px;
}

/* ── Analog clock ─────────────────────────── */
.analog-clock {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,0.9), rgba(255,255,255,0.55));
  border: 1.5px solid rgba(255,255,255,0.8);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.7),
    inset 0 -6px 12px rgba(0,0,0,0.04),
    0 6px 18px rgba(0,0,0,0.08);
}
.tick {
  position: absolute;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  transform: translate(-50%, -50%);
}
.tick-12 { top: 12%; left: 50%; }
.tick-3  { top: 50%; left: 88%; }
.tick-6  { top: 88%; left: 50%; }
.tick-9  { top: 50%; left: 12%; }

.clock-center {
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  background: #333;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.8);
}
.hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  background: #2c3e50;
  border-radius: 5px;
  transform: translateX(-50%) rotate(0deg);
}
.hour-hand { width: 4px;   height: 38px; z-index: 3; }
.min-hand  { width: 3px;   height: 54px; z-index: 4; }
.sec-hand  { width: 1.5px; height: 60px; background: #e76f51; z-index: 5; }

.clock-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.2px;
}

/* ── Weather card ─────────────────────────── */
.widget-weather { padding: 20px 18px; }
.weather-container {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
}
.weather-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.weather-divider {
  width: 1px;
  height: 70px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.12), transparent);
}
.weather-day {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}
.weather-icon { font-size: 2rem; line-height: 1; }
.weather-temp { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.weather-desc { font-size: 0.82rem; color: var(--muted); }

/* ── Center art chips ─────────────────────── */
.center-column {
  position: relative;
  height: 100%;
  min-height: 280px;
}
.art-chip {
  position: absolute;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 8px 16px 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  white-space: nowrap;
}
.art-chip .chip-flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.art-chip .chip-flag svg { display: block; width: 100%; height: 100%; }

.art-chip-left  { top: 45%; left: 8%;  }
.art-chip-right { top: 45%; right: 6%; }

/* ── Footer ───────────────────────────────── */
.footer-new {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  z-index: 8;
  display: flex;
  justify-content: center;
  padding: 0 30px;
}
.footer-pill {
  background: rgba(20,25,35,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f4ece0;
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-style: italic;
  max-width: 880px;
  text-align: center;
  line-height: 1.5;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 1200px) {
  html, body { overflow: auto; }
  .join-screen {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  .join-screen::before { inset: 12px; }
  .top-bar {
    grid-template-columns: 1fr auto 1fr;
    justify-items: center;
    padding: 22px 24px 8px;
    gap: 12px;
  }
  .profile-card { min-width: 220px; }
  .logo-new { font-size: 2.8rem; }
  .main-content {
    grid-template-columns: minmax(250px, 1fr) minmax(250px, 1fr);
    padding: 30px 24px 120px;
    gap: 24px;
  }
  .side-column { max-width: 420px; width: 100%; }
  .center-column { display: none; }
  .corner-accent { width: 90px; height: 90px; opacity: .7; }
}

@media (max-width: 600px) {
  .join-screen::before { display: none; }
  .top-bar {
    grid-template-columns: 1fr;
    padding: 18px 18px 8px;
  }
  .profile-card {
    justify-self: center !important;
    width: min(100%, 330px);
    min-width: 0;
    padding: 12px 18px;
    border-radius: 18px;
  }
  .logo-new { font-size: 2.2rem; }
  .who-text { letter-spacing: 4px; font-size: 0.75rem; }
  .profile-name { font-size: 1.25rem; }
  .profile-hint { right: 16px; bottom: 7px; }
  .main-content {
    grid-template-columns: 1fr;
    padding: 22px 18px 125px;
  }
  .analog-clock { width: 130px; height: 130px; }
  .widget-card { border-radius: 20px; padding: 18px 16px; }
  .footer-new { bottom: 16px; padding: 0 18px; }
  .footer-pill { font-size: 0.78rem; padding: 10px 18px; }
}
