/* ==========================================================================
   VIBRA - Main Styles & Layout Architecture
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050608;
  font-family: var(--font-family);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessible inputs enable text selection */
input, textarea {
  user-select: text;
}

/* Background Ambient Glow */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.6;
}

.glow-orb-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 50vw;
  height: 50vw;
  max-width: 450px;
  max-height: 450px;
  background: radial-gradient(circle, rgba(255, 51, 102, 0.18) 0%, rgba(255, 51, 102, 0) 70%);
  border-radius: 50%;
  filter: blur(50px);
}

.glow-orb-2 {
  position: absolute;
  bottom: 10%;
  right: 15%;
  width: 60vw;
  height: 60vw;
  max-width: 500px;
  max-height: 500px;
  background: radial-gradient(circle, rgba(186, 40, 230, 0.15) 0%, rgba(186, 40, 230, 0) 70%);
  border-radius: 50%;
  filter: blur(60px);
}

/* Desktop Frame Simulator */
.app-viewport-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  background-color: #06070a;
}

/* Mobile Device Frame for Desktop Testing */
.device-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 440px;
  max-height: 920px;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 40px;
}

/* Frame Toggle Controls Bar (Desktop helper) */
.simulator-bar {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 20, 30, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.sim-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.sim-btn:hover, .sim-btn.active {
  background: var(--bg-pill);
  color: var(--text-primary);
}

/* Fullscreen mode toggle on desktop */
body.fullscreen-mode .device-frame {
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Simulated Mobile Status Bar */
.status-bar {
  height: 44px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-primary);
  z-index: 100;
  flex-shrink: 0;
  pointer-events: none;
}

.notch-island {
  width: 110px;
  height: 24px;
  background-color: #000000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.15);
}

.notch-camera {
  width: 9px;
  height: 9px;
  background-color: #0e121e;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notch-sensor {
  width: 5px;
  height: 5px;
  background-color: #0a0b12;
  border-radius: 50%;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* App Header */
.app-header {
  height: var(--header-height);
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 90;
  flex-shrink: 0;
}

/* Official Logo Zone */
.brand-logo-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.brand-header-logo-img {
  height: 38px;
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  object-fit: contain;
}

.brand-badge-18 {
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.5px;
}

/* Active Intention Header Pill */
.header-intent-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-pill);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  max-width: 155px;
}

.header-intent-pill:hover, .header-intent-pill:active {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(0.97);
}

.intent-pill-emoji {
  font-size: 1rem;
}

.intent-pill-text {
  font-size: var(--font-size-xs);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.intent-pill-arrow {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover, .icon-btn:active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: scale(0.95);
}

/* App Main Body / Screens Container */
.app-screen-container {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-app);
  z-index: 10;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.screen::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.screen.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

/* Bottom Navigation Bar */
.bottom-nav {
  height: var(--bottom-nav-height);
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 6px);
  z-index: 90;
  flex-shrink: 0;
}

.nav-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
  padding: 6px 0;
}

.nav-item-icon {
  width: 24px;
  height: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.nav-item-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: var(--transition-fast);
}

.nav-item-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: var(--transition-fast);
}

.nav-item.active {
  color: var(--brand-primary);
}

.nav-item.active .nav-item-icon {
  transform: translateY(-2px);
}

.nav-item.active .nav-item-icon svg {
  stroke: var(--brand-primary);
  filter: drop-shadow(0 0 8px rgba(255, 51, 102, 0.4));
}

.nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--grad-vibra);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(255, 51, 102, 0.5);
  border: 1.5px solid var(--bg-surface);
}

/* Global Button Styles */
.btn-primary {
  height: 52px;
  min-height: 52px;
  background: var(--grad-vibra);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 51, 102, 0.35);
  transition: var(--transition-fast);
  padding: 0 24px;
  width: 100%;
}

.btn-primary:hover, .btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 4px 14px rgba(255, 51, 102, 0.5);
}

.btn-secondary {
  height: 52px;
  min-height: 52px;
  background: var(--bg-pill);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0 24px;
  width: 100%;
}

.btn-secondary:hover, .btn-secondary:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.98);
}
