/* ui-mockups.css */

/* iPhone Frame container */
.iphone-frame {
  width: 320px;
  height: 650px;
  border-radius: 40px;
  background-color: var(--obsidian);
  border: 12px solid #1c2128; /* dark gray bezel */
  box-shadow: inset 0 0 0 2px #333, 0 30px 60px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

/* Dynamic Island notch */
.iphone-frame::before {
  content: '';
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 26px;
  background-color: #000;
  border-radius: 14px;
  z-index: 100;
}

/* Base UI wrapper */
.ui-screen {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  font-family: var(--font-main);
  background-color: var(--obsidian);
}

/* ============================
   Dim 01: The Sonar Map 
   ============================ */
.ui-sonar-map {
  background: radial-gradient(circle at center, #0a1118, #030f1c);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-grid {
  position: absolute;
  width: 200%; height: 200%;
  background-image: 
    linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: slowDrift 30s linear infinite;
}

.hotspot {
  position: absolute;
  width: 12px; height: 12px;
  background: var(--sonar-cyan);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--sonar-cyan);
}

.hotspot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--sonar-cyan);
  animation: mapPing 3s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
}

.hotspot:nth-child(1) { top: 30%; left: 40%; }
.hotspot:nth-child(2) { top: 60%; left: 70%; animation-delay: 1s; }
.hotspot:nth-child(3) { top: 75%; left: 30%; animation-delay: 2s; }

@keyframes slowDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-40px, -40px); }
}

@keyframes mapPing {
  0% { width: 12px; height: 12px; opacity: 1; }
  100% { width: 100px; height: 100px; opacity: 0; }
}

/* Floating Bottom Control Island */
.control-island {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 60px;
  background: rgba(21, 26, 33, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.island-icon {
  width: 24px; height: 24px;
  background: var(--text-muted);
  border-radius: 50%;
  opacity: 0.5;
}
.island-icon.active {
  background: var(--sonar-cyan);
  box-shadow: 0 0 10px var(--sonar-cyan);
  opacity: 1;
}

/* ============================
   Dim 02: Crew Beacons
   ============================ */
.ui-crew-beacons {
  background: #030f1c;
}

.crew-beacon {
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--liquid-amber);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 15px var(--liquid-amber);
  color: #000;
  font-size: 11px;
  font-weight: bold;
}
.crew-beacon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--liquid-amber);
  animation: mapPing 2s ease-out infinite;
}

.crew-beacon.me {
  top: 50%; left: 50%;
  background: var(--sonar-cyan);
  box-shadow: 0 0 15px var(--sonar-cyan);
}
.crew-beacon.me::after { border-color: var(--sonar-cyan); animation-duration: 4s; }

.crew-beacon.b1 { top: 40%; left: 40%; animation: float1 15s ease-in-out infinite alternate; }
.crew-beacon.b2 { top: 55%; left: 65%; animation: float2 20s ease-in-out infinite alternate; }
.crew-beacon.b3 { top: 30%; left: 70%; animation: float3 18s ease-in-out infinite alternate; }

@keyframes float1 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, -15px); }
}
@keyframes float2 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-25px, 20px); }
}
@keyframes float3 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-10px, -30px); }
}

/* Status Panel */
.status-panel {
  position: absolute;
  top: 50px; left: 20px; right: 20px;
  background: rgba(21, 26, 33, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
.status-title { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.status-text { font-size: 14px; font-weight: 500; color: #fff; margin-top: 4px; }
.status-text span { color: var(--liquid-amber); }

/* ============================
   Dim 03: The Rabbit Hole (Artist)
   ============================ */
.ui-rabbit-hole {
  background: var(--obsidian);
  color: #fff;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-bottom: 80px;
}
.ui-rabbit-hole::-webkit-scrollbar { display: none; }

.artist-cover {
  width: 100%; height: 280px;
  background: linear-gradient(to bottom, transparent, var(--obsidian)),
              url('https://images.unsplash.com/photo-1514525253161-7a46d19cd819?q=80&w=600&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
}
.artist-info {
  padding: 0 20px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}
.artist-name { font-size: 28px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.03em;}
.artist-genre { font-size: 12px; color: var(--sonar-cyan); margin-bottom: 16px; letter-spacing: 1px; text-transform: uppercase;}
.artist-bio { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 24px; }

.track-list {
  padding: 0 20px;
}
.track-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.track-item.playing .track-title { color: var(--liquid-amber); }
.track-info { display: flex; align-items: center; gap: 12px; }
.play-btn { width: 32px; height: 32px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.track-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px;}
.track-duration { font-size: 12px; color: var(--text-muted); }

/* Audio Visualizer */
.visualizer {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.track-item.playing .visualizer {
  display: flex;
}
.vis-bar {
  width: 3px;
  background-color: var(--liquid-amber);
  border-radius: 2px;
  animation: bounceBar 0.5s ease infinite alternate;
}
.vis-bar:nth-child(1) { height: 4px; animation-delay: 0.1s; }
.vis-bar:nth-child(2) { height: 10px; animation-delay: 0.3s; }
.vis-bar:nth-child(3) { height: 6px; animation-delay: 0.5s; }
.vis-bar:nth-child(4) { height: 12px; animation-delay: 0.2s; }

@keyframes bounceBar {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* ============================
   Dim 04: Echoes (Chat)
   ============================ */
.ui-echoes {
  background: var(--obsidian);
  display: flex;
  flex-direction: column;
}
.chat-header {
  padding: 50px 20px 16px 20px;
  background: rgba(5, 8, 10, 0.9);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center;
  z-index: 10;
}
.chat-title { font-size: 16px; font-weight: 600; }
.chat-title span { color: var(--liquid-amber); font-size: 12px; margin-left: 8px;}

/* The Fading Mask */
.chat-messages {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  position: relative;
  /* Mask to fade out top */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
}

.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.4;
  animation: slideUpFade 0.5s ease-out;
}
.msg.in {
  background: var(--slate-grey);
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg.out {
  background: rgba(255, 179, 71, 0.15);
  color: var(--liquid-amber);
  border: 1px solid rgba(255, 179, 71, 0.3);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Fading animation simulation */
.msg:nth-child(1) { opacity: 0.05; }
.msg:nth-child(2) { opacity: 0.3; }
.msg:nth-child(3) { opacity: 0.7; }
.msg:nth-child(4) { opacity: 1; }

@keyframes slideUpFade {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.chat-input {
  height: 80px;
  padding: 16px 20px;
  background: var(--obsidian);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.input-box {
  width: 100%; height: 36px;
  background: var(--slate-grey);
  border-radius: 18px;
  display: flex; align-items: center; padding: 0 16px;
  color: var(--text-muted); font-size: 13px;
}

/* ============================
   Dim 05: The Currents (Fest)
   ============================ */
.ui-festival {
  background: #02070d;
}
.fest-map {
  position: absolute; width: 300%; height: 300%;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.1) 0%, transparent 60%);
  animation: slowDrift 40s linear infinite;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 50px;
}
/* A swarm of small dots */
.swarm-dot {
  width: 6px; height: 6px;
  background: var(--sonar-cyan);
  border-radius: 50%;
  opacity: 0.6;
  box-shadow: 0 0 5px var(--sonar-cyan);
}
.swarm-dot.crew {
  background: var(--liquid-amber);
  width: 8px; height: 8px;
  opacity: 1;
  box-shadow: 0 0 10px var(--liquid-amber);
}
