/* iPhone 17 Pro frame — 393×852pt, Dynamic Island, ash bezels */
.phone-frame {
  width: 393px;
  height: 852px;
  border-radius: 50px;
  border: 6px solid #4a4a4e;
  overflow: hidden;
  box-shadow:
    0 0 0 2px #3a3a3e,
    inset 0 0 0 1px #5a5a5e,
    0 25px 60px rgba(0,0,0,0.3);
  position: relative;
  flex-shrink: 0;
  background: #000;
}

/* Dynamic Island */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 36px;
  background: #000;
  border-radius: 20px;
  z-index: 50;
  pointer-events: none;
}

/* Side button (power) */
.phone-frame::after {
  content: '';
  position: absolute;
  top: 160px;
  right: -8px;
  width: 3px;
  height: 80px;
  background: #4a4a4e;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

.phone-screen {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}

.phone-screen::-webkit-scrollbar {
  display: none;
}

/* MacBook Pro frame — 1280×800 viewport, Space Black */
.laptop-frame {
  width: 1280px;
  position: relative;
  flex-shrink: 0;
}

/* Screen bezel — Ash */
.laptop-screen {
  width: 1280px;
  height: 800px;
  border-radius: 12px;
  border: 14px solid #4a4a4e;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 0 2px #3a3a3e,
    inset 0 0 0 1px #5a5a5e,
    0 25px 60px rgba(0,0,0,0.3);
  position: relative;
}

/* Camera notch */
.laptop-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #3a3a3e;
  border-radius: 50%;
  z-index: 50;
  pointer-events: none;
  border: 1px solid #5a5a5e;
}

/* Browser chrome bar */
.laptop-browser-bar {
  height: 36px;
  background: #1e1e1e;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
}

.laptop-browser-bar .dots {
  display: flex;
  gap: 6px;
}

.laptop-browser-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.laptop-browser-bar .dot-red { background: #ff5f57; }
.laptop-browser-bar .dot-yellow { background: #febc2e; }
.laptop-browser-bar .dot-green { background: #28c840; }

.laptop-browser-bar .url-bar {
  flex: 1;
  max-width: 400px;
  margin: 0 auto;
  background: #111;
  border-radius: 6px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #666;
  font-family: system-ui, sans-serif;
}

/* Base/hinge — wider than screen, centered, flush against screen */
.laptop-base {
  width: 1380px;
  height: 12px;
  background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
  border-radius: 0 0 10px 10px;
  margin: -2px auto 0 auto;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.laptop-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 3px;
  background: #333;
  border-radius: 0 0 3px 3px;
}

.laptop-iframe {
  width: 100%;
  height: calc(100% - 36px);
  border: none;
  overflow: hidden;
}

.laptop-iframe::-webkit-scrollbar {
  display: none;
}

/* ═══ UI Polish Improvements ═══ */

/* #2 — Subtle depth border on card components */
.bg-surface-400,
.bg-surface-300 {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* #4 — Smooth box-shadow transition on interactive cards */
a[class*="bg-surface-"],
button[class*="bg-surface-"],
div[class*="bg-surface-"][class*="rounded-"] {
  transition: box-shadow 300ms ease, background-color 200ms ease-out, transform 200ms ease-out;
}

/* #6 — Scale transform on hover for interactive cards + #12 will-change for performance */
a[class*="bg-surface-"][class*="rounded-"]:hover {
  transform: scale(1.02);
}
a[class*="bg-surface-"][class*="rounded-"],
button[class*="hover\\:bg-"] {
  will-change: transform;
}

/* #8 — Frosted glass on bottom sheet overlays */
.bg-surface-900\/95 {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* #14 — Inset shadow on text input fields for depth in dark theme */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
textarea {
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

/* #16 — 200ms ease-out transition on all color changes for interactive elements */
a, button, input, [role="button"] {
  transition: color 200ms ease-out, background-color 200ms ease-out, border-color 200ms ease-out, box-shadow 200ms ease-out;
}

/* #17 — Consistent focus halo on card elements */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(56,189,248,0.3);
  border-radius: 9999px;
}

/* #18 — Softer divider lines between list items */
.border-neutral-800 {
  border-color: rgba(42, 48, 56, 0.5) !important;
}

/* #9 — Consistent shadow-glow on all primary accent action buttons */
button.bg-accent-400,
a.bg-accent-400,
[class*="bg-accent-400"]:is(button, a) {
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

/* #11 — Smooth transition between nested surface backgrounds */
[class*="bg-surface-400"] [class*="bg-surface-300"],
[class*="bg-surface-500"] [class*="bg-surface-400"] {
  background-image: linear-gradient(135deg, var(--color-surface-400), var(--color-surface-500));
}

/* #15 — Increase waveform container border-radius to match surrounding cards */
waveform-visual svg,
waveform-section svg {
  border-radius: 1.25rem;
}

/* #19 — Micro-animation for recording dot bounce */
@keyframes rec-dot-bounce {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}
.rec-dot {
  animation: rec-dot-bounce 1s ease-in-out infinite !important;
}
