/* ==============================================================================
   Realistic CSS Device Frames & Hardware Bezels
   ============================================================================== */

/* Device Stage Wrapper */
.device-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  width: 100%;
  height: calc(100vh - 72px);
  overflow: auto;
  padding: 24px;
  position: relative;
  transition: transform var(--transition-smooth);
}

/* Base Bezel Container */
.device-frame {
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  background: #000;
  user-select: none;
}

/* ==============================================================================
   1. MacBook Pro 14" Frame
   ============================================================================== */
.macbook-frame {
  width: 1020px;
  max-width: 95vw;
  border-radius: 18px 18px 12px 12px;
  background: #1e2024; /* Space Gray anodized aluminum */
  padding: 12px 12px 18px 12px;
  border: 1px solid #33363f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.macbook-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1512 / 982;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #111;
  display: flex;
  flex-direction: column;
}

/* MacBook Display Notch */
.macbook-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 24px;
  background: #000;
  border-radius: 0 0 10px 10px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.macbook-camera {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #081a28;
  border: 1px solid #1d3557;
  position: relative;
}

.macbook-camera::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 2px;
  height: 2px;
  background: #38bdf8;
  border-radius: 50%;
}

.macbook-led {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.8;
  box-shadow: 0 0 4px #10b981;
}

/* macOS Realistic Titlebar & Safari Toolbar */
.macbook-titlebar {
  height: 38px;
  background: #252830;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 40;
}

.mac-traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 80px;
}

.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.traffic-light.close { background: #ff5f56; }
.traffic-light.minimize { background: #ffbd2e; }
.traffic-light.maximize { background: #27c93f; }

.mac-safari-bar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 60px 0 0;
}

.mac-safari-address {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 3px 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 480px;
  width: 100%;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mac-safari-address svg {
  width: 12px;
  height: 12px;
  fill: #64748b;
}

/* MacBook Chassis Bottom Lip */
.macbook-bottom-chassis {
  height: 12px;
  width: 100%;
  background: linear-gradient(180deg, #18191c 0%, #121315 100%);
  border-radius: 0 0 10px 10px;
  margin-top: 6px;
  position: relative;
  display: flex;
  justify-content: center;
}

.macbook-notch-cutout {
  width: 110px;
  height: 4px;
  background: #252830;
  border-radius: 0 0 4px 4px;
}

/* ==============================================================================
   2. iPhone 15 Pro Frame
   ============================================================================== */
.iphone-frame {
  width: 393px;
  height: 852px;
  border-radius: 54px;
  background: #171719; /* Natural Titanium matte frame */
  padding: 12px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85), inset 0 0 0 2px #3c3d42, 0 0 0 2px #101012;
  position: relative;
}

/* Titanium Side Hardware Buttons */
.iphone-frame::before {
  /* Volume & Action buttons on left */
  content: '';
  position: absolute;
  left: -4px;
  top: 115px;
  width: 3px;
  height: 26px; /* Action button */
  background: #3a3b40;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 48px 0 #3a3b40, 0 100px 0 #3a3b40; /* Volume Up & Down */
}

.iphone-frame::after {
  /* Power button on right */
  content: '';
  position: absolute;
  right: -4px;
  top: 160px;
  width: 3px;
  height: 54px;
  background: #3a3b40;
  border-radius: 0 2px 2px 0;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Dynamic Island */
.iphone-dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 35px;
  background: #000;
  border-radius: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  box-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.island-camera {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0c1626;
  border: 1px solid #1e293b;
  position: relative;
}

.island-camera::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 3px;
  height: 3px;
  background: #2563eb;
  border-radius: 50%;
}

.island-sensor {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #08080a;
}

/* iPhone Home Bar Indicator */
.iphone-home-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 135px;
  height: 5px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  z-index: 50;
  pointer-events: none;
}

/* iPhone Landscape Rotation */
.iphone-frame.landscape {
  width: 852px;
  height: 393px;
}

.iphone-frame.landscape .iphone-dynamic-island {
  top: 50%;
  left: 14px;
  transform: translateY(-50%) rotate(90deg);
}

.iphone-frame.landscape .iphone-home-bar {
  bottom: 6px;
  width: 180px;
}

/* ==============================================================================
   3. Windows 11 Chrome Frame
   ============================================================================== */
.windows-frame {
  width: 1100px;
  max-width: 95vw;
  border-radius: 10px;
  background: #18191c;
  border: 1px solid #2e3038;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.windows-titlebar {
  height: 42px;
  background: #202124; /* Chrome dark theme tab strip */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 10px;
  border-bottom: 1px solid #2e3038;
}

.chrome-tabs-strip {
  display: flex;
  align-items: flex-end;
  height: 100%;
  gap: 2px;
}

.chrome-tab {
  height: 34px;
  background: #292a2d;
  border-radius: 8px 8px 0 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #e8eaed;
  max-width: 200px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chrome-tab svg {
  width: 14px;
  height: 14px;
}

.chrome-tab-close {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

.chrome-tab-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chrome-new-tab {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #9aa0a6;
  cursor: pointer;
  margin-bottom: 3px;
}

.chrome-new-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.win11-controls {
  display: flex;
  height: 100%;
}

.win-btn {
  width: 46px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa0a6;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.win-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.win-btn.close:hover {
  background: #e81123;
  color: #fff;
}

.windows-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

/* ==============================================================================
   4. Real Android 14 Frame
   ============================================================================== */
.android-frame {
  width: 390px;
  height: 844px;
  border-radius: 46px;
  background: #0f1012;
  padding: 10px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85), 0 0 0 2px #26272b;
  position: relative;
}

.android-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 38px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.android-punch-hole {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #000;
  border-radius: 50%;
  z-index: 50;
  border: 1px solid #1a1a1a;
}

.android-punch-hole::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 3px;
  height: 3px;
  background: #1e3a8a;
  border-radius: 50%;
}

.android-nav-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  z-index: 50;
  pointer-events: none;
}

.android-frame.landscape {
  width: 844px;
  height: 390px;
}

.android-frame.landscape .android-punch-hole {
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
}

/* ==============================================================================
   Embedded Stream & Suspend Placeholder
   ============================================================================== */
.device-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  display: block;
  flex: 1;
}

/* Suspended State Screen */
.device-suspended-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #171b26 0%, #0a0c10 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
  text-align: center;
  padding: 30px;
}

.suspended-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.suspended-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.suspended-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn-power-on {
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-power-on:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.45);
}
