/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --phone-width: 393px;
  --phone-height: 852px;
  --bg-primary: #000;
  --bg-secondary: #1c1c1e;
  --bg-tertiary: #2c2c2e;
  --bg-elevated: #3a3a3c;
  --bg-glass: rgba(28, 28, 30, 0.75);
  --text-primary: #fff;
  --text-secondary: #8e8e93;
  --text-muted: #636366;
  --text-black: #1c1c1e;
  --accent: #0a84ff;
  --accent-glow: rgba(10, 132, 255, 0.3);
  --danger: #ff453a;
  --success: #30d158;
  --warning: #ff9f0a;
  --bubble-sent: #0a84ff;
  --bubble-received: #2c2c2e;
  --separator: rgba(84, 84, 88, 0.4);
  --separator-light: rgba(84, 84, 88, 0.15);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --safe-top: 54px;
  --safe-bottom: 34px;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050505;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* ========== PHONE FRAME ========== */
.phone-container {
  position: relative;
  width: var(--phone-width);
  height: var(--phone-height);
}

.phone-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 48px;
  overflow: hidden;
  border: 2.5px solid #2a2a2a;
  box-shadow:
    0 0 0 1.5px #1a1a1a,
    0 0 0 4px #0a0a0a,
    0 0 80px rgba(10, 132, 255, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.9);
  transition: box-shadow 0.4s ease;
}

/* ========== DYNAMIC ISLAND ========== */
.notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.notch-camera {
  width: 12px;
  height: 12px;
  background: #0a0a1a;
  border-radius: 50%;
  border: 2px solid #1c1c1e;
}

.notch-speaker {
  display: none;
}

/* ========== STATUS BAR ========== */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 36px 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 99;
  pointer-events: none;
  letter-spacing: -0.3px;
}

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

/* Signal bars */
.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 12px;
}

.signal-bars span {
  width: 3px;
  background: #fff;
  border-radius: 1px;
}

.signal-bars span:nth-child(1) { height: 4px; }
.signal-bars span:nth-child(2) { height: 6px; }
.signal-bars span:nth-child(3) { height: 9px; }
.signal-bars span:nth-child(4) { height: 12px; }

.carrier-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Wi-Fi arcs */
.wifi-icon {
  display: flex;
  align-items: center;
}

.wifi-arcs {
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
  width: 15px;
  height: 12px;
}

.wifi-arcs span {
  border: 1.5px solid #fff;
  border-bottom: none;
  border-radius: 50% 50% 0 0;
  margin: 0 auto;
}

.wifi-arcs span:nth-child(1) { width: 6px; height: 3px; }
.wifi-arcs span:nth-child(2) { width: 10px; height: 4px; }
.wifi-arcs span:nth-child(3) { width: 14px; height: 5px; }

/* Battery */
.battery-icon {
  display: flex;
  align-items: center;
  gap: 0;
}

.battery-body {
  width: 22px;
  height: 11px;
  border: 1.5px solid #fff;
  border-radius: 3px;
  padding: 1.5px;
  display: flex;
  align-items: center;
}

.battery-body::after {
  content: '';
  display: block;
  width: 70%;
  height: 100%;
  background: #fff;
  border-radius: 1px;
}

.battery-cap {
  width: 2px;
  height: 4px;
  background: #fff;
  border-radius: 0 1px 1px 0;
  margin-left: -0.5px;
}

/* ========== SCREEN ========== */
.screen {
  position: absolute;
  top: var(--safe-top);
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  overflow: hidden;
}

.screen-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #000;
}

.screen-page.active {
  display: flex;
}

/* ========== INCOMING CALL ========== */
.incoming-call-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #0d0d1a 0%, #0a0f14 35%, #050508 100%);
}

.incoming-call-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  z-index: 1;
  padding-bottom: 40px;
}

.caller-avatar {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #2c2c2e, #3a3a3c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: var(--text-secondary);
  border: 2px solid rgba(255,255,255,0.08);
  margin-bottom: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.caller-avatar.active {
  border-color: rgba(48, 209, 88, 0.5);
  box-shadow: 0 8px 40px rgba(48, 209, 88, 0.2);
}

.caller-name {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.caller-number {
  font-size: 16px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.call-ringing {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 6px;
}

.ring-dots span {
  width: 4px;
  height: 4px;
  background: var(--text-secondary);
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
  animation: ringPulse 1.2s ease-in-out infinite;
}

.ring-dots span:nth-child(2) { animation-delay: 0.2s; }
.ring-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ringPulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.7); }
  40% { opacity: 1; transform: scale(1.3); }
}

.call-actions {
  display: flex;
  gap: 60px;
  margin-top: 50px;
}

.call-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  font-size: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  color: #fff;
  position: relative;
}

.call-btn:active {
  transform: scale(0.88);
}

.call-btn.decline {
  background: var(--danger);
  box-shadow: 0 6px 24px rgba(255, 69, 58, 0.45);
}

.call-btn.accept {
  background: var(--success);
  box-shadow: 0 6px 24px rgba(48, 209, 88, 0.45);
}

/* ========== ACTIVE CALL ========== */
.active-call-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #050d08 0%, #0a0f14 35%, #050508 100%);
}

.active-call-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  z-index: 1;
  padding-bottom: 40px;
}

.call-timer {
  font-size: 20px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  font-weight: 400;
}

.call-status-dots {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.call-status-dots span {
  width: 5px;
  height: 5px;
  background: var(--success);
  border-radius: 50%;
  animation: audioPulse 0.8s ease-in-out infinite;
}

.call-status-dots span:nth-child(1) { animation-delay: 0s; }
.call-status-dots span:nth-child(2) { animation-delay: 0.15s; }
.call-status-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes audioPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

.active-call-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
}

.call-btn-small {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.2s;
  background: rgba(255,255,255,0.1);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.call-btn-small:active {
  transform: scale(0.9);
  background: rgba(255,255,255,0.18);
}

.call-btn-small.active {
  background: var(--danger);
}

/* ========== HOME SCREEN ========== */
.home-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 22px;
  gap: 18px;
  background: linear-gradient(180deg, #0a0a14 0%, #0d1020 20%, #080c18 50%, #0a0a10 100%);
  position: relative;
}

.home-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 10%, rgba(30, 60, 120, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(60, 20, 80, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.home-screen > * {
  position: relative;
  z-index: 1;
}

.home-widget {
  margin-top: 14px;
  margin-bottom: 2px;
}

.widget-time {
  font-size: 56px;
  font-weight: 200;
  color: var(--text-primary);
  letter-spacing: -2px;
  line-height: 1;
}

.widget-date {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 400;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 13px 18px;
  color: var(--text-muted);
  font-size: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.04);
}

.search-bar i {
  font-size: 14px;
  opacity: 0.7;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 8px;
  padding: 6px 4px;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

.app-icon:active {
  transform: scale(0.85);
  opacity: 0.75;
}

.app-icon .icon-bg {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: relative;
}

.app-icon span {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  text-align: center;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

/* App icon colors */
.icon-green { background: linear-gradient(135deg, #30d158, #28b84b); }
.icon-blue { background: linear-gradient(135deg, #0a84ff, #0066cc); }
.icon-yellow { background: linear-gradient(135deg, #ffd60a, #cca800); }
.icon-red { background: linear-gradient(135deg, #ff453a, #cc372e); }
.icon-purple { background: linear-gradient(135deg, #bf5af2, #9445cc); }
.icon-orange { background: linear-gradient(135deg, #ff6b35, #e05520); }
.icon-teal { background: linear-gradient(135deg, #64d2ff, #40a8cc); }
.icon-gray { background: linear-gradient(135deg, #636366, #48484a); }

/* ========== DOCK ========== */
.dock {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 32px 32px 0 0;
  padding: 4px 10px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 0 -8px;
  position: relative;
  z-index: 1;
}

.dock-icons {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 8px 12px 4px;
}

.dock-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s;
  font-size: 24px;
  color: var(--accent);
  opacity: 0.9;
}

.dock-icon span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

.dock-icon:active {
  transform: scale(0.82);
  opacity: 0.7;
}

.dock-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(255, 69, 58, 0.4);
}

.home-indicator {
  width: 134px;
  height: 5px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  margin: 8px auto 8px;
}

/* ========== APP PAGES ========== */
.app-page {
  background: #000;
}

.app-header {
  display: flex;
  align-items: center;
  padding: 8px 8px 8px 4px;
  gap: 4px;
  background: rgba(28, 28, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  min-height: 44px;
  border-bottom: 0.5px solid var(--separator);
  z-index: 10;
}

.app-header .app-title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.3px;
}

.app-header .app-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  font-weight: 400;
}

.app-header-contact {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-header-contact > div:last-child {
  min-width: 0;
}

.app-back, .app-action {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.app-back:active, .app-action:active {
  background: rgba(255,255,255,0.1);
}

/* ========== MESSAGES LIST ========== */
.message-threads {
  flex: 1;
  overflow-y: auto;
  background: #000;
}

.message-thread {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--separator-light);
  transition: background 0.12s;
}

.message-thread:active {
  background: var(--bg-secondary);
}

.thread-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  flex-shrink: 0;
}

.thread-info {
  flex: 1;
  min-width: 0;
}

.thread-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

.thread-preview {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.thread-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.thread-time {
  font-size: 13px;
  color: var(--text-muted);
}

.thread-unread {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* ========== CONVERSATION ========== */
.conv-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.conversation-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #000;
}

.message-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.35;
  word-wrap: break-word;
  animation: messageIn 0.3s ease-out;
  position: relative;
}

.message-bubble.received {
  align-self: flex-start;
  background: var(--bubble-received);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.message-bubble.sent {
  align-self: flex-end;
  background: var(--bubble-sent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-bubble .msg-time {
  font-size: 10px;
  opacity: 0.5;
  margin-top: 3px;
  text-align: right;
  letter-spacing: 0.1px;
}

.message-bubble .msg-sender {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 2px;
  font-weight: 600;
}

.message-bubble + .message-bubble {
  margin-top: 0;
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Message link */
.message-link {
  display: inline-block;
  background: rgba(10, 132, 255, 0.2);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 4px;
  border: 1px solid rgba(10, 132, 255, 0.3);
  transition: background 0.15s;
}

.message-link:active {
  background: rgba(10, 132, 255, 0.35);
}

/* ========== PHOTOS ========== */
.photos-grid {
  padding: 2px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: #000;
}

.photo-thumb {
  aspect-ratio: 1;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.photo-thumb:active {
  opacity: 0.7;
}

.photo-thumb .photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: rgba(255,255,255,0.5);
}

.photo-thumb .photo-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.photo-viewer-header {
  background: rgba(0,0,0,0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.photo-viewer-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  flex-direction: column;
  padding: 24px;
  gap: 14px;
  padding-top: 56px;
}

.photo-viewer-content .photo-display {
  width: 280px;
  height: 280px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 90px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.photo-viewer-content .photo-caption {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  max-width: 300px;
  line-height: 1.4;
}

/* ========== NOTES ========== */
.notes-list {
  flex: 1;
  overflow-y: auto;
  background: #000;
}

.note-item {
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--separator-light);
  cursor: pointer;
  transition: background 0.12s;
}

.note-item:active {
  background: var(--bg-secondary);
}

.note-item .note-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}

.note-item .note-date {
  font-size: 13px;
  color: #ff9f0a;
}

.note-item .note-preview {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

.note-detail-content {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
  background: #000;
}

.note-detail-content .note-date-full {
  font-size: 13px;
  color: #ff9f0a;
  margin-bottom: 14px;
}

.note-detail-content .note-body {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.55;
  white-space: pre-wrap;
  letter-spacing: -0.1px;
}

/* ========== CONTACTS ========== */
.contacts-list {
  flex: 1;
  overflow-y: auto;
  background: #000;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--separator-light);
  transition: background 0.12s;
}

.contact-item:active {
  background: var(--bg-secondary);
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  flex-shrink: 0;
}

.contact-info .contact-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.contact-info .contact-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}

.contact-detail-content {
  flex: 1;
  overflow-y: auto;
  background: #000;
}

.contact-header-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 16px;
  gap: 8px;
}

.contact-avatar-lg {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.contact-name-lg {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.contact-actions-row {
  display: flex;
  gap: 24px;
  margin-top: 10px;
}

.contact-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--accent);
  font-size: 12px;
}

.contact-action i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.contact-action:active i {
  background: var(--bg-elevated);
}

.contact-detail-fields {
  padding: 8px 16px;
}

.contact-field {
  padding: 12px 0;
  border-bottom: 0.5px solid var(--separator-light);
}

.contact-field .field-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.contact-field .field-value {
  font-size: 15px;
  color: var(--accent);
}

.contact-notes-section {
  padding: 16px;
}

.contact-notes-section .notes-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.contact-notes-section .notes-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== BROWSER ========== */
.browser-header {
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
}

.browser-url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 0;
  border: 0.5px solid rgba(255,255,255,0.06);
}

.browser-url-bar i {
  color: var(--success);
  font-size: 11px;
  opacity: 0.7;
}

.browser-url-bar span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

.browser-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  padding: 8px 16px;
  border-bottom: 0.5px solid var(--separator);
  overflow-x: auto;
}

.browser-tab {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.browser-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.browser-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px;
  background: #000;
}

.browser-content .page-headline {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.browser-content .page-byline {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.browser-content .page-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.browser-content .page-body p {
  margin-bottom: 10px;
}

.browser-content .page-image {
  width: 100%;
  height: 160px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-muted);
}

.browser-content .search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--separator-light);
  cursor: pointer;
}

.browser-content .search-result:active {
  opacity: 0.7;
}

.browser-content .search-result .result-url {
  font-size: 12px;
  color: #30d158;
}

.browser-content .search-result .result-title {
  font-size: 16px;
  color: var(--accent);
  font-weight: 500;
}

.browser-content .search-result .result-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ========== VOICE MEMOS ========== */
.voice-list {
  flex: 1;
  overflow-y: auto;
  background: #000;
}

.voice-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--separator-light);
  transition: background 0.12s;
}

.voice-item:active {
  background: var(--bg-secondary);
}

.voice-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.voice-play-btn.playing {
  background: var(--accent);
  color: #fff;
  animation: playingPulse 1.2s ease-in-out infinite;
}

@keyframes playingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(10, 132, 255, 0); }
}

.voice-info {
  flex: 1;
  min-width: 0;
}

.voice-info .voice-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

.voice-info .voice-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.voice-waveform {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 26px;
  margin-top: 4px;
}

.voice-waveform span {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.35;
}

.voice-waveform.playing span {
  animation: waveAnim 0.4s ease-in-out infinite;
}

@keyframes waveAnim {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.9; }
}

/* ========== LOCK SCREEN ========== */
.lock-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(160deg, #060610 0%, #030310 50%, #060610 100%);
  gap: 8px;
}

.lock-time {
  font-size: 72px;
  font-weight: 100;
  color: var(--text-primary);
  letter-spacing: -3px;
}

.lock-date {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
}

.lock-icon {
  margin-top: 50px;
  font-size: 22px;
  color: var(--text-muted);
}

.lock-swipe {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 24px;
}

/* ========== NOTIFICATION ========== */
.notification-banner {
  position: absolute;
  top: 58px;
  left: 14px;
  right: 14px;
  background: rgba(44, 44, 46, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 16px;
  padding: 14px 16px;
  z-index: 80;
  display: flex;
  gap: 12px;
  cursor: pointer;
  animation: notifSlide 0.45s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  border: 0.5px solid rgba(255,255,255,0.08);
}

@keyframes notifSlide {
  from { transform: translateY(-80px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.notification-banner .notif-icon {
  font-size: 22px;
  color: var(--accent);
  padding-top: 2px;
}

.notification-banner .notif-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.35;
}

.notification-banner .notif-app {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 3px;
}

/* ========== HACK SCREEN ========== */
.hack-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #000a00;
  padding: 36px 18px 24px;
  font-family: 'SF Mono', 'Cascadia Code', 'Courier New', monospace;
  overflow: hidden;
  position: relative;
}

.hack-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, 0.012) 2px,
    rgba(0, 255, 0, 0.012) 4px
  );
  pointer-events: none;
  z-index: 2;
  animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

.hack-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 3;
}

.hack-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 200, 0, 0.2);
  margin-bottom: 18px;
  color: #0f0;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  position: relative;
  z-index: 4;
}

.hack-blink {
  animation: hackBlink 0.8s step-end infinite;
}

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

.hack-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 4;
  overflow-y: auto;
}

.hack-line {
  font-size: 11px;
  line-height: 1.55;
  color: #0f0;
  opacity: 0;
  transform: translateY(5px);
  animation: hackLineIn 0.3s ease-out forwards;
}

.hack-line.dim { color: rgba(0, 220, 0, 0.5); }
.hack-line.amber { color: #ffb800; font-weight: 600; }
.hack-line.red { color: #ff3b30; }
.hack-line.white { color: #ddd; font-weight: 500; }

.hack-line.progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hack-line .progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(0, 220, 0, 0.12);
  border-radius: 2px;
  overflow: hidden;
  max-width: 130px;
}

.hack-line .progress-fill {
  height: 100%;
  background: #0f0;
  border-radius: 2px;
  width: 0;
  transition: width 0.5s ease-out;
}

.hack-line .progress-done {
  color: #0f0;
  font-size: 10px;
  font-weight: 600;
}

@keyframes hackLineIn {
  to { opacity: 1; transform: translateY(0); }
}

.hack-launch-container {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
  position: relative;
  z-index: 4;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.btn-launch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 44px;
  background: transparent;
  border: 2px solid #0f0;
  color: #0f0;
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-launch:active {
  transform: scale(0.95);
  background: rgba(0, 220, 0, 0.15);
  box-shadow: 0 0 40px rgba(0, 220, 0, 0.4), inset 0 0 24px rgba(0, 220, 0, 0.08);
}

.btn-launch::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,220,0,0.15), transparent);
  animation: glitchSweep 2.5s linear infinite;
}

@keyframes glitchSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ========== RESPONSIVE ========== */

/* Default (mobile-first): fullscreen, no phone frame */
html, body {
  display: block;
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.phone-container {
  width: 100%;
  height: 100%;
  height: 100dvh;
  position: fixed;
  inset: 0;
}

.phone-frame {
  border-radius: 0;
  border: none;
  box-shadow: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

:root {
  --phone-width: 100vw;
  --phone-height: 100vh;
  --safe-top: max(44px, env(safe-area-inset-top, 44px));
  --safe-bottom: max(20px, env(safe-area-inset-bottom, 20px));
}

.screen {
  top: var(--safe-top);
  bottom: var(--safe-bottom);
}

.status-bar {
  height: var(--safe-top);
  padding: 0 max(20px, env(safe-area-inset-right, 20px)) 6px max(20px, env(safe-area-inset-left, 20px));
  align-items: flex-end;
}

.notch {
  display: none;
}

.dock {
  padding-bottom: calc(var(--safe-bottom) - 4px);
}

.home-indicator {
  margin-bottom: 4px;
}

.screen, .screen-page {
  overscroll-behavior: none;
}

/* Desktop / large screens: show phone frame */
@media (min-width: 768px) {
  html, body {
    display: flex;
    justify-content: center;
    align-items: center;
    position: static;
    inset: auto;
    background: #050505;
  }

  .phone-container {
    width: var(--phone-width-desktop, 393px);
    height: var(--phone-height-desktop, 852px);
    position: relative;
    inset: auto;
  }

  .phone-frame {
    border-radius: 48px;
    border: 2.5px solid #2a2a2a;
    box-shadow:
      0 0 0 1.5px #1a1a1a,
      0 0 0 4px #0a0a0a,
      0 0 80px rgba(10, 132, 255, 0.06),
      0 30px 80px rgba(0, 0, 0, 0.9);
    width: 100%;
    height: 100%;
  }

  :root {
    --phone-width: 393px;
    --phone-height: 852px;
    --safe-top: 54px;
    --safe-bottom: 34px;
  }

  .screen {
    top: var(--safe-top);
    bottom: var(--safe-bottom);
  }

  .status-bar {
    height: var(--safe-top);
    padding: 0 28px 8px;
    align-items: flex-end;
  }

  .notch {
    display: flex;
  }

  .dock {
    padding-bottom: 0;
  }

  .home-indicator {
    margin-bottom: 6px;
  }

  .screen, .screen-page {
    overscroll-behavior: auto;
  }
}

@media (min-width: 768px) and (max-height: 880px) {
  .phone-container {
    width: auto;
    height: 92vh;
  }

  :root {
    --phone-height: 92vh;
    --phone-width: calc(92vh * 0.461);
  }

  .phone-frame {
    width: 100%;
    height: 100%;
  }
}
