/* ════════════════════════════════════════════════════════════════
   QBrain — Lock Screen CSS  v4.0
   ✦ Wider, thinner Dynamic Island
   ✦ QBrain SVG logo + cyan blink dot in island
   ✦ Logo slide animation on unlock
   ✦ PIN card deeply matched to 8K wallpaper (indigo/cyan glass)
════════════════════════════════════════════════════════════════ */

/* ── ROOT OVERLAY ──────────────────────────────────────────── */
.lock-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #ffffff;
  user-select: none;
  cursor: none;
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              opacity   0.5s ease;
}

.lock-screen-overlay.unlocked {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ── 8K WALLPAPER ──────────────────────────────────────────── */
.lock-wallpaper {
  position: absolute;
  inset: 0;
  background-image: url('../assets/lockscreen-bg.jpg');
  background-size: cover;
  background-position: center;
  animation: wallpaperDrift 40s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes wallpaperDrift {
  from { transform: scale(1.06) translate(0px,   0px); }
  to   { transform: scale(1.1)  translate(-18px,-10px); }
}

/* Dark overlay matching site palette */
.lock-wallpaper-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    155deg,
    rgba(6,7,19,0.6)  0%,
    rgba(8,9,26,0.42) 45%,
    rgba(6,7,19,0.65) 100%
  );
}

/* ── PARTICLE CANVAS ───────────────────────────────────────── */
#lock-particle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════════
   DYNAMIC ISLAND  —  wider + thinner
══════════════════════════════════════════════════════════════ */
.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;

  /* Thinner pill */
  height: 34px;
  width: 140px;           /* idle width */
  border-radius: 99px;

  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;

  transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              background 0.4s ease;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 6px 30px rgba(0,0,0,0.75),
    0 0 36px rgba(99,102,241,0.18);

  cursor: pointer;
  overflow: hidden;
}

/* Ambient pulsing glow ring */
.dynamic-island::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 99px;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.22), 0 0 22px rgba(56,189,248,0.12);
  animation: islandGlow 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes islandGlow {
  0%,100% { box-shadow: 0 0 0 1px rgba(99,102,241,0.22), 0 0 18px rgba(56,189,248,0.1); }
  50%      { box-shadow: 0 0 0 1.5px rgba(99,102,241,0.5), 0 0 38px rgba(56,189,248,0.28); }
}

/* ── EXPANDED STATE ───────────────────────────────────────── */
.dynamic-island.expanded {
  width: 290px;
}

/* ── CAMERA DOT (physical sim) ───────────────────────────── */
.island-camera-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #111;
  border: 1.5px solid rgba(56,189,248,0.35);
  flex-shrink: 0;
  position: relative;
}

.island-camera-dot::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.5), transparent);
  animation: cameraBlink 4.5s ease-in-out infinite;
}

@keyframes cameraBlink {
  0%,80%,100% { opacity: 1; }
  85%          { opacity: 0.15; }
}

/* ── QBRAIN SVG LOGO ─────────────────────────────────────── */
.island-qbrain-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.35s ease 0.15s, transform 0.4s cubic-bezier(0.16,1,0.3,1) 0.15s;
  filter: drop-shadow(0 0 4px rgba(56,189,248,0.6));
}

.dynamic-island.expanded .island-qbrain-logo {
  opacity: 1;
  transform: translateX(0);
}

/* Logo slides fully across island on unlock */
.island-qbrain-logo.logo-slide {
  animation: logoSlide 0.65s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes logoSlide {
  0%   { transform: translateX(0);    filter: drop-shadow(0 0 4px rgba(56,189,248,0.6)); }
  40%  { transform: translateX(120px);filter: drop-shadow(0 0 14px rgba(74,222,128,0.9)); }
  70%  { transform: translateX(60px); }
  100% { transform: translateX(90px); filter: drop-shadow(0 0 8px rgba(74,222,128,0.7)); }
}

/* ── CYAN BLINK DOT ──────────────────────────────────────── */
.island-blink-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
  opacity: 1;
  box-shadow: 0 0 8px #38bdf8, 0 0 18px rgba(56,189,248,0.7);
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

/* ── STATUS TEXT ─────────────────────────────────────────── */
.island-status-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s ease 0.2s, transform 0.35s ease 0.2s;
  flex: 1;
}

.dynamic-island.expanded .island-status-text {
  opacity: 1;
  transform: translateX(0);
}

/* ── CUSTOM CURSOR ───────────────────────────────────────── */
.lock-cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2147483647;
  margin: -5px 0 0 -5px;
  box-shadow: 0 0 12px rgba(255,255,255,0.9), 0 0 24px rgba(56,189,248,0.6);
  transition: transform 0.06s ease;
  will-change: transform;
}

.lock-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  pointer-events: none;
  z-index: 2147483646;
  margin: -18px 0 0 -18px;
  transition: width 0.25s ease, height 0.25s ease,
              margin 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.lock-cursor-ring.hover {
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border-color: rgba(56,189,248,0.7);
  box-shadow: 0 0 18px rgba(56,189,248,0.3);
}

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
.lock-content-wrap {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4.5rem 1.5rem 2.5rem;
}

/* ── CLOCK ───────────────────────────────────────────────── */
.lock-clock-section {
  text-align: center;
  animation: lockFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.15s both;
}

@keyframes lockFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lock-time-clock {
  font-size: clamp(5rem, 10vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  background: linear-gradient(180deg,
    #ffffff 0%,
    rgba(255,255,255,0.9) 40%,
    rgba(165,180,252,0.85) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 32px rgba(99,102,241,0.5))
          drop-shadow(0 0 60px rgba(56,189,248,0.2));
  font-variant-numeric: tabular-nums;
}

.lock-time-date {
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  margin-top: 0.6rem;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════
   PIN CARD — deeply matched to wallpaper (indigo/cyan glass)
══════════════════════════════════════════════════════════════ */
.lock-pin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.55rem;
  padding: 2rem 2.5rem 1.85rem;
  width: 100%;
  max-width: 348px;
  position: relative;

  /* Wallpaper-echo glass: indigo tinted, deep blur */
  background:
    linear-gradient(
      145deg,
      rgba(11, 10, 40, 0.62)  0%,
      rgba(14, 12, 48, 0.55) 40%,
      rgba(8,  10, 30, 0.60) 100%
    );
  border: 1px solid rgba(129, 140, 248, 0.16);
  border-radius: 26px;
  backdrop-filter: blur(48px) saturate(200%) brightness(0.9);
  -webkit-backdrop-filter: blur(48px) saturate(200%) brightness(0.9);
  box-shadow:
    0 32px 80px rgba(0,0,0,0.65),
    0 0 0 1px rgba(99,102,241,0.1),
    inset 0 1px 0 rgba(165,180,252,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 0 80px rgba(99,102,241,0.1),
    0 0 120px rgba(56,189,248,0.06);

  animation: lockFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.3s both;
}

/* Glowing top border */
.lock-pin-card::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(99,102,241,0.9),
    rgba(56,189,248,0.65),
    rgba(99,102,241,0.9),
    transparent
  );
}

/* Inner cyan nebula glow (matches wallpaper blue tones) */
.lock-pin-card::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 60px;
  background: radial-gradient(ellipse, rgba(56,189,248,0.12) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
  filter: blur(8px);
}

/* ── STATUS LABEL ────────────────────────────────────────── */
.lock-status-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(165,180,252,0.7);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.lock-status-label.success { color: #4ade80; }
.lock-status-label.error   { color: #f87171; }

/* ── PIN DOTS ────────────────────────────────────────────── */
.pin-dots-row {
  display: flex;
  gap: 1.5rem;
}

.pin-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(129,140,248,0.3);
  background: transparent;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

.pin-dot.filled {
  background: #38bdf8;
  border-color: #38bdf8;
  box-shadow:
    0 0 14px rgba(56,189,248,0.9),
    0 0 30px rgba(56,189,248,0.4),
    0 0 0 3px rgba(56,189,248,0.12);
  transform: scale(1.28);
}

.pin-dot.error-dot {
  background: #f87171;
  border-color: #f87171;
  box-shadow: 0 0 14px rgba(248,113,113,0.85);
  transform: scale(1.1);
}

/* ── KEYPAD ──────────────────────────────────────────────── */
.lock-keypad {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0.75rem;
  width: 100%;
}

.keypad-btn {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.7rem;
  font-weight: 400;
  color: #ffffff;
  cursor: pointer;
  border: none;
  outline: none;
  overflow: hidden;
  transition: all 0.16s cubic-bezier(0.16,1,0.3,1);

  /* Indigo-tinted frosted glass matching card */
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(129,140,248,0.14);
  box-shadow:
    inset 0 1px 0 rgba(165,180,252,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 4px 14px rgba(0,0,0,0.35);
}

/* Glassy inner highlight */
.keypad-btn::before {
  content: '';
  position: absolute;
  top: 5%; left: 15%; width: 70%; height: 42%;
  background: radial-gradient(ellipse at 50% 0%, rgba(165,180,252,0.16), transparent 80%);
  border-radius: 50%;
  pointer-events: none;
}

.keypad-btn:hover {
  background: rgba(99,102,241,0.28);
  border-color: rgba(129,140,248,0.35);
  box-shadow:
    inset 0 1px 0 rgba(165,180,252,0.25),
    0 6px 24px rgba(99,102,241,0.4),
    0 0 0 1px rgba(99,102,241,0.25);
  transform: scale(1.07);
}

.keypad-btn:active {
  background: rgba(56,189,248,0.32);
  border-color: rgba(56,189,248,0.5);
  transform: scale(0.91);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3), 0 0 22px rgba(56,189,248,0.55);
}

.keypad-btn.keypad-btn-action {
  background: rgba(99,102,241,0.06);
  border-color: rgba(129,140,248,0.1);
  box-shadow: none;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.65);
}

.keypad-btn.keypad-btn-action:hover {
  background: rgba(99,102,241,0.15);
  border-color: rgba(129,140,248,0.2);
  color: #ffffff;
  transform: scale(1.06);
}

.keypad-btn-sub {
  font-size: 0.49rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(165,180,252,0.5);
  margin-top: -2px;
  text-transform: uppercase;
}

/* ── BOTTOM ──────────────────────────────────────────────── */
.lock-bottom-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: lockFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.45s both;
}

.lock-hint-text {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.25);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.lock-hint-text strong {
  color: rgba(129,140,248,0.65);
  font-weight: 700;
}

.lock-home-bar {
  width: 148px; height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.22);
}
