/* 
  =========================================
  MIRAI STUDIO - ULTRA PREMIUM DESIGN SYSTEM
  =========================================
  Theme: Dark Gloss Space & High Glassmorphism
  Colors: Neon Cyan, Cyber Violet, Soft Emerald & Hot Pink
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-deep: #050609;
  --bg-studio: #090b12;
  --glass-bg: rgba(10, 13, 24, 0.55);
  --glass-bg-hover: rgba(22, 28, 48, 0.75);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-border-glow: rgba(0, 242, 254, 0.15);
  
  /* Brand Colors */
  --primary-cyan: #00f2fe;
  --primary-violet: #8a2be2;
  --accent-pink: #ff2a5f;
  --accent-green: #00f5a0;
  --accent-orange: #ff9f43;
  
  /* Text */
  --text-main: #f3f4f6;
  --text-muted: #858da0;
  --text-dark: #0f111a;
  
  /* Shadows & Neon Glows */
  --glow-cyan: 0 0 20px rgba(0, 242, 254, 0.45);
  --glow-violet: 0 0 20px rgba(138, 43, 226, 0.45);
  --glow-pink: 0 0 20px rgba(255, 42, 95, 0.45);
  --glow-green: 0 0 20px rgba(0, 245, 160, 0.45);
  --shadow-main: 0 12px 40px 0 rgba(0, 0, 0, 0.55);
  
  /* Fonts */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 242, 254, 0.15) transparent;
}

/* cyber-thin scrollbars */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 254, 0.1);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-cyan);
  box-shadow: var(--glow-cyan);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  background-image: 
    radial-gradient(at 0% 0%, rgba(138, 43, 226, 0.12) 0px, transparent 40%),
    radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.08) 0px, transparent 40%),
    radial-gradient(at 50% 50%, rgba(5, 6, 9, 1) 0px, rgba(9, 11, 18, 0.98) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Neon grid backplate */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 242, 254, 0.005) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 242, 254, 0.005) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* =========================================
   LAYOUT STRUCTURE
   ========================================= */

.app-container {
  display: grid;
  grid-template-columns: 86px 1fr 390px;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  position: relative;
}

/* --- SIDEBAR --- */
.sidebar {
  background: rgba(6, 8, 14, 0.7);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
  justify-content: space-between;
  z-index: 10;
  box-shadow: 5px 0 30px rgba(0, 0, 0, 0.3);
}

.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  margin-bottom: 40px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover {
  transform: scale(1.15) rotate(8deg);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  width: 100%;
  align-items: center;
}

.nav-item {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.nav-item:hover i {
  transform: scale(1.1);
}

/* Capsule Glowing active bar on sidebar left */
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--primary-cyan);
  box-shadow: var(--glow-cyan);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item.active::before {
  opacity: 1;
}

.nav-item:hover, .nav-item.active {
  color: var(--primary-cyan);
  background: var(--glass-bg-hover);
  border: 1px solid rgba(0, 242, 254, 0.2);
  box-shadow: inset 0 0 10px rgba(0, 242, 254, 0.05);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(138, 43, 226, 0.12));
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 75px;
  background: #0b0d16;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-main);
}

.nav-item:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.user-profile {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-display);
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.user-profile:hover {
  transform: scale(1.08);
  border-color: var(--primary-cyan);
  box-shadow: var(--glow-cyan);
}

/* --- MAIN STUDIO SECTION --- */
.main-studio {
  display: grid;
  grid-template-rows: 76px 1fr 186px;
  height: 100vh;
  padding: 0 28px 24px 28px;
  overflow: hidden;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}

.studio-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.studio-title h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff, #b0b8c8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.live-badge {
  background: rgba(255, 42, 95, 0.08);
  border: 1px solid rgba(255, 42, 95, 0.3);
  color: var(--accent-pink);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulse-red 2s infinite;
  box-shadow: inset 0 0 10px rgba(255, 42, 95, 0.05);
}

.live-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  background-color: var(--accent-pink);
  border-radius: 50%;
}

.quick-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.stat-item i {
  color: var(--primary-cyan);
  font-size: 14px;
}

.stat-item .value {
  color: var(--text-main);
  font-weight: 700;
}

/* Dynamic Scanner Viewport Container */
.viewport-container {
  margin: 18px 0;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-studio);
  box-shadow: var(--shadow-main);
  /* Elegant slow pulse in ambient mode */
  animation: border-glow-ambient 8s infinite ease-in-out;
}

@keyframes border-glow-ambient {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.55), inset 0 0 15px rgba(255, 255, 255, 0.01);
  }
  50% {
    border-color: rgba(0, 242, 254, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 242, 254, 0.03), inset 0 0 20px rgba(0, 242, 254, 0.02);
  }
}

.viewport-container.recording {
  border-color: var(--accent-pink);
  box-shadow: 0 0 25px rgba(255, 42, 95, 0.25), var(--shadow-main);
  animation: none;
}

/* 3D Canvas space */
.avatar-canvas {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #111422 0%, #050609 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatar-canvas.chromakey {
  background: #00ff00 !important;
}

/* Canvas Overlays */
.canvas-overlay-top {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.stream-timer {
  background: rgba(5, 6, 9, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.recording .timer-dot {
  background-color: var(--accent-pink);
  animation: blink 1s infinite;
}

.fps-badge {
  background: rgba(5, 6, 9, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-green);
  border: 1px solid rgba(0, 245, 160, 0.25);
  letter-spacing: 0.5px;
}

/* Countdown Overlay screen */
.countdown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 6, 9, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.countdown-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 130px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: scale-up-out 1s infinite ease-in-out;
}

/* Floating PIP webcam */
.webcam-pip {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 170px;
  height: 128px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--primary-cyan);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), var(--glow-cyan);
  z-index: 4;
  background: #000;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  /* Force iOS Safari GPU acceleration and clipping */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  isolation: isolate;
}

.webcam-pip:hover {
  width: 250px;
  height: 188px;
}

.webcam-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  border-radius: inherit;
}

.mesh-overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  border-radius: inherit;
}

.pip-status {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(5, 6, 9, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--primary-cyan);
  border: 1px solid rgba(0, 242, 254, 0.1);
}

/* Floating Viewport HUD Controls */
.viewport-hud {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 12, 20, 0.68);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 28px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 4;
  box-shadow: var(--shadow-main), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

.hud-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary-cyan);
  border-color: var(--primary-cyan);
  transform: translateY(-2px);
}

.hud-btn.active {
  background: var(--primary-cyan);
  color: var(--bg-deep);
  border-color: var(--primary-cyan);
  box-shadow: var(--glow-cyan);
}

#btn-mode-toggle.active {
  background: var(--primary-violet);
  color: #fff;
  border-color: var(--primary-violet);
  box-shadow: var(--glow-violet);
}

.hud-btn.btn-rec {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  color: #fff;
  width: 54px;
  height: 54px;
  font-size: 21px;
}

.hud-btn.btn-rec:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: var(--glow-pink);
}

.hud-btn.btn-rec.recording {
  background: #fff;
  border-color: #fff;
  color: var(--accent-pink);
  animation: pulse-red-bg 1.5s infinite;
}

.hud-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

/* Bottom Drawer Asset Selection Drawer */
.bottom-drawer {
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-main), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.section-header h3 i {
  color: var(--primary-cyan);
}

.tab-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid var(--glass-border);
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--primary-cyan);
  border: 1px solid rgba(0, 242, 254, 0.05);
}

.avatar-carousel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.avatar-card {
  flex: 0 0 106px;
  height: 98px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
}

.avatar-card img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: transform 0.3s ease;
}

.avatar-card span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.avatar-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 242, 254, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.avatar-card:hover img {
  transform: scale(1.08);
}

.avatar-card.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.06), rgba(138, 43, 226, 0.06));
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15), inset 0 0 10px rgba(0, 242, 254, 0.05);
}

.avatar-card.active img {
  border-color: var(--primary-cyan);
  box-shadow: var(--glow-cyan);
}

.avatar-card.active span {
  color: var(--primary-cyan);
  font-weight: 700;
}

.avatar-card .pro-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, var(--accent-pink), var(--primary-violet));
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 5px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* =========================================
   RIGHT CONTROL PANEL
   ========================================= */

.control-panel {
  background: rgba(6, 8, 14, 0.75);
  border-left: 1px solid var(--glass-border);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow-y: auto;
  height: 100vh;
  z-index: 10;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
}

.panel-header {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 18px;
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff, #9da8be);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panel-header p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--primary-cyan);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Add a glowing neon dot left of panel titles */
.section-title::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-cyan);
  box-shadow: var(--glow-cyan);
}

.control-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.01);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.select-dropdown {
  background: #0b0d16;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  width: 100%;
}

.select-dropdown:focus, .select-dropdown:hover {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

/* Sliders */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.slider-name {
  color: var(--text-main);
  font-weight: 600;
}

.slider-val {
  color: var(--primary-cyan);
  font-family: var(--font-display);
  font-weight: 700;
}

.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
  transition: background 0.3s ease;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-cyan);
  box-shadow: var(--glow-cyan);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid var(--bg-deep);
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.35);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.7);
}

/* Calibration Button */
.btn-calibrate {
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-violet));
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  padding: 14px 22px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--glow-cyan);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  margin-top: 10px;
}

.btn-calibrate:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.6), 0 0 25px rgba(138, 43, 226, 0.6);
}

.btn-calibrate:active {
  transform: translateY(0);
}

/* Shimmering Premium locked cards (Metallic shine on hover) */
.premium-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.premium-feature-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 42, 95, 0.02);
  border: 1px solid rgba(255, 42, 95, 0.1);
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Shimmer reflection */
.premium-feature-item::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: rotate(45deg);
  transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.premium-feature-item:hover {
  background: rgba(255, 42, 95, 0.05);
  border-color: var(--accent-pink);
  box-shadow: 0 5px 15px rgba(255, 42, 95, 0.15);
  transform: translateY(-2px);
}

.premium-feature-item:hover::after {
  left: 120%;
}

.premium-feature-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.premium-feature-info i {
  color: var(--accent-pink);
  font-size: 14px;
}

.premium-lock-icon {
  color: var(--primary-violet);
  font-size: 12px;
}

/* =========================================
   ANIMATIONS & KEYFRAMES
   ========================================= */

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 42, 95, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 42, 95, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 42, 95, 0);
  }
}

@keyframes pulse-red-bg {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 42, 95, 0.6);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 42, 95, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 42, 95, 0);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes scale-up-out {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

i {
  font-style: normal;
}

/* =========================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================= */
@media (max-width: 992px) {
  body {
    overflow-y: auto;
  }

  .app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  
  .sidebar {
    flex-direction: row;
    width: 100%;
    height: auto;
    padding: 12px 20px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    justify-content: space-between;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  }
  
  .logo {
    margin-bottom: 0;
  }
  
  .nav-menu {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }
  
  .nav-item {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  
  .nav-item i {
    font-size: 16px;
  }
  
  .nav-item::before {
    display: none;
  }
  
  .nav-item::after {
    display: none !important;
  }
  
  .sidebar-footer {
    margin-top: 0 !important;
    flex-direction: row !important;
    gap: 12px !important;
    width: auto !important;
  }
  
  .main-studio {
    padding: 16px;
    height: auto;
    min-height: 650px;
    grid-template-rows: auto 1fr auto;
  }
  
  .topbar {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
    padding-bottom: 12px;
  }
  
  .quick-stats {
    width: 100%;
    justify-content: space-around;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .stat-item {
    font-size: 11px;
  }
  
  .viewport-container {
    height: 50vh;
    min-height: 380px;
    margin: 12px 0;
  }
  
  .control-panel {
    width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--glass-border);
    padding: 24px;
  }
  
  .webcam-pip {
    width: 100px;
    height: 75px;
    top: 70px;
    bottom: auto;
    right: 15px;
  }
  
  .webcam-pip:hover {
    width: 130px;
    height: 98px;
  }

  .fps-badge {
    display: none !important;
  }

  .pip-status {
    font-size: 6px;
    bottom: 4px;
    left: 4px;
    padding: 2px 4px;
    border-radius: 4px;
    letter-spacing: 0.4px;
  }

  
  .viewport-hud {
    padding: 8px 18px;
    gap: 12px;
  }
  
  .hud-btn {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
  
  .hud-btn.btn-rec {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

