/* ============================================================
   KAZAN iOS 18 Design System — Pure Responsive iPhone Simulator
   Flawless alignment, zero overlapping, perfect modal isolation
   ============================================================ */

/* ── Global Viewport Resets (Desktop Studio Ambient) ───── */
html, body {
  width: 100% !important;
  height: 100% !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: #07090F !important;
  background-image:
    radial-gradient(ellipse at 50% 25%, rgba(0, 229, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(124, 77, 255, 0.08) 0%, transparent 60%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Pretendard Variable", sans-serif !important;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
}

/* ── Hide All Default MkDocs Chrome ──────────────────────── */
.md-header,
.md-tabs,
.md-sidebar,
.md-footer,
.md-banner,
.md-search,
.md-dialog,
.md-announce,
.md-skip {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── MkDocs Wrapper Chain: completely transparent pass-through ── */
.md-container,
.md-main,
.md-main__inner,
.md-grid,
.md-content,
.md-content__inner {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  overflow: visible !important;
  border: none !important;
  box-shadow: none !important;
}

/* ── iPhone 16 Pro Global Viewport (Responsive Stage) ───── */
.iphone-global-viewport {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  z-index: 1000 !important;
  background-color: #07090F !important;
  background-image:
    radial-gradient(ellipse at 50% 25%, rgba(0, 229, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(124, 77, 255, 0.08) 0%, transparent 60%) !important;
}

/* iPhone Hardware Device Container */
.iphone-global-device {
  position: relative;
  width: 412px;
  height: 864px;
  max-width: min(412px, 94vw);
  max-height: min(864px, 95vh);
  border-radius: 52px;
  background: #000;
  padding: 10px;
  box-shadow: 
    0 0 0 3px #3d414a,
    0 0 0 6px #1c1d22,
    0 0 0 7px #0a0b0e,
    0 35px 90px -15px rgba(0, 0, 0, 0.85),
    0 0 50px rgba(0, 229, 255, 0.12);
  user-select: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  margin: auto !important;
  transition: max-width 0.25s ease, max-height 0.25s ease;
}

/* Hardware Buttons (Action Button, Volume, Power) */
.iphone-global-device::before {
  content: '';
  position: absolute;
  top: 115px;
  left: -8px;
  width: 4px;
  height: 26px;
  background: #3a3d45;
  border-radius: 3px 0 0 3px;
  box-shadow: 0 45px 0 0 #3a3d45, 0 95px 0 0 #3a3d45;
}

.iphone-global-device::after {
  content: '';
  position: absolute;
  top: 175px;
  right: -8px;
  width: 4px;
  height: 64px;
  background: #3a3d45;
  border-radius: 0 3px 3px 0;
}

/* Dynamic Wallpaper & Reflection */
.iphone-global-wallpaper {
  position: absolute;
  inset: 10px;
  border-radius: 42px;
  background: linear-gradient(145deg, #090e1a 0%, #17112c 35%, #0d1e38 70%, #060913 100%);
  pointer-events: none;
  z-index: 1;
}

.iphone-global-wallpaper::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(0, 229, 255, 0.38) 0%, transparent 45%),
    radial-gradient(circle at 85% 32%, rgba(124, 77, 255, 0.45) 0%, transparent 50%),
    radial-gradient(circle at 45% 75%, rgba(255, 56, 35, 0.35) 0%, transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(0, 200, 150, 0.25) 0%, transparent 50%);
  filter: blur(40px);
}

.iphone-global-glare {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 38%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 2;
  border-radius: 42px 42px 0 0;
}

/* ── Top Status Bar & Dynamic Island (Fixed Header) ────── */
.iphone-global-status-bar {
  position: relative;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 20px 0 !important;
  height: 48px !important;
  z-index: 80;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
}

.ios-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  width: 60px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Dynamic Island */
.ios-dynamic-island {
  position: absolute;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
  width: 120px;
  height: 33px;
  background: #000;
  border-radius: 20px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  z-index: 100001 !important;
  box-sizing: border-box;
}

.ios-island-content {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-family: monospace;
  color: #00E5FF;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ios-island-camera {
  position: absolute;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0d131f;
  border: 1px solid #1a2233;
}

.ios-dynamic-island:hover,
.ios-dynamic-island.expanded {
  width: 220px;
  height: 40px;
  border-radius: 24px;
  padding: 0 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.3);
}

.ios-dynamic-island:hover .ios-island-content,
.ios-dynamic-island.expanded .ios-island-content {
  opacity: 1;
}

/* Status Icons */
.ios-status-icons {
  display: flex !important;
  align-items: center !important;
  gap: 6px;
  width: 60px;
  justify-content: flex-end;
  white-space: nowrap;
}

.ios-battery {
  width: 22px;
  height: 11px;
  border: 1.5px solid #fff;
  border-radius: 3px;
  padding: 1px;
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.ios-battery::after {
  content: '';
  position: absolute;
  right: -3.5px;
  width: 2px;
  height: 4px;
  background: #fff;
  border-radius: 0 1px 1px 0;
}

.ios-battery-level {
  width: 100%;
  height: 100%;
  background: #34C759;
  border-radius: 1.5px;
}

/* ── iOS Safari Top Navigation Bar (On Sub-Pages) ───────── */
.iphone-safari-top-bar {
  position: relative;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 14px 8px;
  background: rgba(18, 22, 34, 0.88);
  backdrop-filter: blur(25px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  box-sizing: border-box;
}

.safari-back-btn,
.safari-home-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.safari-back-btn:hover,
.safari-home-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  color: #00E5FF;
  border-color: #00E5FF;
}

.safari-url-pill {
  flex: 1;
  height: 32px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.safari-lock-icon {
  font-size: 0.72rem;
  opacity: 0.7;
}

.safari-url-text {
  font-size: 0.75rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Scrollable Screen Interior (Main Display) ──────────── */
.iphone-global-screen {
  position: relative;
  z-index: 10;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 14px 16px;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* Custom Sleek Scrollbar */
.iphone-global-screen::-webkit-scrollbar {
  width: 3px;
}
.iphone-global-screen::-webkit-scrollbar-track {
  background: transparent;
}
.iphone-global-screen::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.iphone-global-screen .md-content {
  width: 100%;
}

.iphone-global-screen .md-content__inner {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
}

/* Sub-page Typography */
.iphone-global-screen .md-typeset h1 {
  font-size: 1.5rem !important;
  line-height: 1.25 !important;
  margin: 0.5rem 0 0.8rem !important;
}

.iphone-global-screen .md-typeset h2 {
  font-size: 1.25rem !important;
  margin-top: 1.4rem !important;
  margin-bottom: 0.5rem !important;
}

.iphone-global-screen .md-typeset p,
.iphone-global-screen .md-typeset li {
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
}

/* ── Bottom Home Indicator Bar (Fixed Footer) ───────────── */
.iphone-global-home-bar-area {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding-bottom: 5px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.iphone-global-home-bar {
  width: 135px;
  height: 5px;
  background: #fff;
  border-radius: 999px;
  opacity: 0.85;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.iphone-global-home-bar:hover {
  opacity: 1;
  transform: scaleY(1.4);
  background: #00E5FF;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

/* ── Springboard Home Container (Aligned & Responsive) ──── */
.ios-home-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 4px 0 8px;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

/* ── Top iOS Widgets (2x2 Grid) ─────────────────────────── */
.ios-widgets-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.ios-widget {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(25px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 120px;
  min-height: 120px;
  max-height: 120px;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: #fff;
  text-decoration: none !important;
}

.ios-widget:hover {
  transform: scale(1.02);
}

.ios-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1;
}

.ios-widget-day {
  color: #FF453A;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ios-widget-weather {
  font-size: 0.75rem;
  letter-spacing: -0.01em;
}

.ios-widget-date-num {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0;
}

.ios-widget-footer {
  font-size: 0.68rem;
  opacity: 0.85;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.025em;
}

.ios-widget-system {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.16) 0%, rgba(124, 77, 255, 0.25) 100%);
}

.ios-system-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: monospace;
  font-size: 0.7rem;
  color: #00E5FF;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
}

.ios-status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 8px #34C759;
  animation: pulseGreen 2s infinite;
}

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

.ios-system-stat {
  display: flex;
  flex-direction: column;
  margin: 1px 0 3px;
}

.ios-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.ios-stat-label {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-top: 2px;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.ios-system-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.ios-system-bar-fill {
  width: 88%;
  height: 100%;
  background: linear-gradient(90deg, #00E5FF, #7C4DFF);
  transition: width 0.3s ease;
}

/* ── 4-Column Balanced App Grid (8 Icons: 2 Rows x 4 Cols) ─ */
.ios-app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 6px;
  justify-items: center;
  width: 100%;
  flex-shrink: 0;
  margin-top: 4px;
}

.ios-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  color: #fff !important;
  cursor: pointer;
  position: relative;
  background: none;
  border: none;
  padding: 0;
  width: 64px;
  touch-action: manipulation;
  flex-shrink: 0;
}

.ios-app-icon {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 22%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), filter 0.16s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.ios-app-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -1px 1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.ios-app-item:hover .ios-app-icon {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.ios-app-item:active .ios-app-icon {
  transform: scale(0.9);
}

.ios-app-label {
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  max-width: 66px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.ios-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  background: #FF3B30;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 5;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* App Themes */
.app-bg-vpn { background: linear-gradient(135deg, #FF3823 0%, #D81E0B 100%); }
.app-bg-safari { background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%); }
.app-bg-terminal { background: linear-gradient(135deg, #1A1F2C 0%, #0D111A 100%); border: 1px solid rgba(0, 229, 255, 0.3); }
.app-bg-about { background: linear-gradient(135deg, #7C4DFF 0%, #4A148C 100%); }
.app-bg-settings { background: linear-gradient(135deg, #8E8E93 0%, #636366 100%); }
.app-bg-github { background: linear-gradient(135deg, #24292E 0%, #161B22 100%); }
.app-bg-signal-post { background: linear-gradient(135deg, #00E5FF 0%, #007799 100%); }
.app-bg-lab-project { background: linear-gradient(135deg, #FF9500 0%, #CC6600 100%); }
.app-bg-mcp { background: linear-gradient(135deg, #5856D6 0%, #3634A3 100%); }

.app-bg-server {
  background: linear-gradient(135deg, #00C896 0%, #007A5C 100%);
  color: #fff;
  transition: all 0.3s ease;
}

.app-bg-server.server-off {
  background: linear-gradient(135deg, #4A4D55 0%, #2B2D33 100%);
  color: #8E929B;
}

.server-status-badge.on {
  background: #34C759 !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.7) !important;
}

.server-status-badge.off {
  background: #FF3B30 !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.6) !important;
}

.server-status-badge.connecting {
  background: #FF9500 !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(255, 149, 0, 0.8) !important;
  animation: pulseGreen 1s infinite;
}

.server-status-badge.discon {
  background: #636366 !important;
  color: #E5E5EA !important;
  box-shadow: none !important;
}

/* Folder Closed (2x2 Mini Icons) */
.ios-folder {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
}

.ios-folder-mini-icon {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Page Indicator Dots */
.ios-page-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 6px 0 2px;
}

.ios-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}
.ios-dot.active {
  background: #fff;
  width: 14px;
  border-radius: 999px;
}

/* ── Floating Frosted Glass Dock ────────────────────────── */
.ios-dock-container {
  padding: 2px 2px 0;
  width: 100%;
  box-sizing: border-box;
}

.ios-dock {
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(35px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;
  padding: 8px 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
  box-sizing: border-box;
  min-height: 70px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ios-dock .ios-app-item {
  width: 54px;
}
.ios-dock .ios-app-icon {
  width: 52px;
  height: 52px;
}
.ios-dock .ios-app-label {
  display: none;
}

/* ========================================================
   MODALS: Strictly Hidden Until Triggered (Zero In-Flow Leak)
   ======================================================== */

/* While in .iphone-global-screen (before JS hoisting), force invisible */
.iphone-global-screen .ios-folder-overlay,
.iphone-global-screen .ios-terminal-modal,
.iphone-global-screen .ios-settings-modal,
.iphone-global-screen .ios-server-modal,
.md-content .ios-folder-overlay,
.md-content .ios-terminal-modal,
.md-content .ios-settings-modal,
.md-content .ios-server-modal,
.md-content .ios-post-modal,
.md-content .ios-passcode-modal {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  opacity: 0 !important;
}

/* After JS hoisting into .iphone-global-device: base hidden state */
.ios-folder-overlay,
.ios-terminal-modal,
.ios-settings-modal,
.ios-server-modal,
.ios-post-modal,
.ios-passcode-modal {
  display: none !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 250 !important;
  box-sizing: border-box !important;
}

/* When Active: Display Flex Overlay */
.ios-folder-overlay.active,
.ios-terminal-modal.active,
.ios-settings-modal.active,
.ios-server-modal.active,
.ios-post-modal.active,
.ios-passcode-modal.active {
  display: flex !important;
}

/* 1) Folder Overlay */
.ios-folder-overlay {
  background: rgba(10, 14, 26, 0.55);
  backdrop-filter: blur(35px) saturate(180%) brightness(0.65);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.25s ease forwards;
}

.ios-folder-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 310px;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-folder-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.ios-folder-box {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 32px;
  padding: 20px 16px;
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 10px;
  justify-items: center;
  box-sizing: border-box;
}

.ios-folder-close-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

/* 2) Terminal Modal */
.ios-terminal-modal {
  inset: 48px 10px 36px !important;
  background: rgba(13, 17, 23, 0.96) !important;
  backdrop-filter: blur(30px);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 24px;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  animation: modalScaleUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-terminal-header {
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: #00E5FF;
}

.ios-terminal-dots { display: flex; gap: 6px; }
.ios-terminal-dot { width: 10px; height: 10px; border-radius: 50%; cursor: pointer; }
.ios-terminal-dot.close { background: #FF5F56; }
.ios-terminal-dot.min { background: #FFBD2E; }
.ios-terminal-dot.max { background: #27C93F; }

.ios-terminal-body {
  padding: 12px 14px;
  flex: 1;
  overflow-y: auto;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #E8EAF0;
}

/* 3) Settings Modal */
.ios-settings-modal {
  inset: 48px 10px 36px !important;
  background: rgba(28, 28, 30, 0.96) !important;
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 26px;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  animation: modalScaleUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-settings-header {
  height: 42px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 0.95rem;
}

.ios-settings-body {
  padding: 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 4) Server Control Center Modal */
.ios-server-modal {
  inset: 48px 10px 36px !important;
  background: rgba(18, 24, 38, 0.96) !important;
  backdrop-filter: blur(35px) saturate(180%);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 26px;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  animation: modalScaleUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-server-header {
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
  color: #00E5FF;
}

.ios-server-body {
  padding: 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.server-master-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.server-power-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid #34C759;
  background: rgba(52, 199, 89, 0.15);
  color: #34C759;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 25px rgba(52, 199, 89, 0.35);
}

.server-power-circle:hover {
  transform: scale(1.08);
  box-shadow: 0 0 35px rgba(52, 199, 89, 0.6);
}

.server-power-circle:active {
  transform: scale(0.92);
}

.server-power-circle.off {
  border-color: #FF3B30;
  background: rgba(255, 59, 48, 0.15);
  color: #FF3B30;
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.3);
}

.server-state-badge {
  font-family: monospace;
  font-size: 0.78rem;
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(52, 199, 89, 0.2);
  color: #34C759;
  border: 1px solid rgba(52, 199, 89, 0.4);
}

.server-state-badge.off {
  background: rgba(255, 59, 48, 0.2);
  color: #FF3B30;
  border-color: rgba(255, 59, 48, 0.4);
}

.server-metrics-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
}

.server-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.server-metric-row:last-child {
  border-bottom: none;
}

/* Server Endpoint Config & Quick Action UI */
.server-config-card {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-config-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #00E5FF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.server-endpoint-input-wrap {
  display: flex;
  gap: 6px;
}

.server-endpoint-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-family: monospace;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.server-endpoint-input:focus {
  border-color: #00E5FF;
  background: rgba(255, 255, 255, 0.12);
}

.server-ping-btn {
  background: #007AFF;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.server-ping-btn:hover {
  background: #0056b3;
}

.server-code-snip {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: monospace;
  font-size: 0.7rem;
  color: #58A6FF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.server-container-list::-webkit-scrollbar {
  width: 4px;
}
.server-container-list::-webkit-scrollbar-track {
  background: transparent;
}
.server-container-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.server-cbtn:active {
  transform: scale(0.94);
  filter: brightness(1.2);
}

.server-code-snip:hover {
  border-color: #58A6FF;
  background: rgba(13, 17, 23, 1);
}

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

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Mobile Pure Native Responsiveness (Screen < 640px) ── */
@media (max-width: 640px) {
  html, body {
    background: #000 !important;
  }

  .iphone-global-viewport {
    padding: 0 !important;
    perspective: none !important;
  }

  .iphone-global-device {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .iphone-global-device::before,
  .iphone-global-device::after {
    display: none !important;
  }

  .iphone-global-wallpaper {
    border-radius: 0 !important;
    inset: 0 !important;
  }

  .ios-browser-modal {
    border-radius: 0 !important;
  }

  .iphone-global-glare {
    display: none !important;
  }

  .iphone-global-status-bar {
    padding: 10px 18px 0;
  }

  .iphone-terminal-modal,
  .iphone-settings-modal,
  .ios-server-modal,
  .ios-post-modal {
    inset: 48px 8px 28px !important;
    border-radius: 20px;
  }
}

/* ========================================================
   HP GEN8 PASSCODE LOCK MODAL (iOS Style PIN Screen)
   ======================================================== */
.ios-passcode-modal {
  display: none;
  inset: 0 !important;
  background: rgba(10, 14, 26, 0.78) !important;
  backdrop-filter: blur(40px) saturate(180%);
  z-index: 10000 !important;
  position: absolute !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.ios-passcode-modal.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.ios-passcode-card {
  width: 100%;
  max-width: 310px;
  background: rgba(26, 32, 46, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 24px;
  padding: 26px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
  animation: modalScaleUp 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-passcode-card.shake {
  animation: passcodeShake 0.4s ease-in-out forwards;
}

@keyframes passcodeShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.ios-passcode-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 12px rgba(0, 229, 255, 0.5));
}

.ios-passcode-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.ios-passcode-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.ios-passcode-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ios-passcode-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.95rem;
  color: #fff;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.ios-passcode-input:focus {
  border-color: #00E5FF;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.ios-passcode-submit {
  width: 100%;
  background: linear-gradient(135deg, #007AFF 0%, #00C7FF 100%);
  border: none;
  border-radius: 12px;
  padding: 11px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.35);
  transition: transform 0.15s, opacity 0.15s;
}

.ios-passcode-submit:hover {
  opacity: 0.95;
  transform: scale(1.02);
}

.ios-passcode-msg {
  color: #FF453A;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 10px;
}

.ios-passcode-cancel {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  margin-top: 12px;
  cursor: pointer;
  padding: 4px 8px;
}

.ios-passcode-cancel:hover {
  color: #fff;
}

/* ========================================================
   SPRINGBOARD DRAG & DROP REORDERING
   ======================================================== */
.ios-app-item[draggable="true"] {
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
}

.ios-app-item[draggable="true"]:active {
  cursor: grabbing;
}

.ios-app-item.dragging {
  opacity: 0.45 !important;
  transform: scale(1.14) rotate(2.5deg) !important;
  z-index: 100 !important;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.65));
}

.ios-app-item.drag-over {
  transform: scale(0.9) !important;
  filter: brightness(1.3) drop-shadow(0 0 10px rgba(0, 229, 255, 0.7));
  border-radius: 16px;
}

.ios-dock.container-drag-over {
  border-color: rgba(0, 229, 255, 0.7) !important;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.35) !important;
}

.ios-app-grid.container-drag-over {
  outline: 2px dashed rgba(0, 229, 255, 0.5);
  border-radius: 20px;
}

/* ========================================================
   NEW POST EDITOR MODAL (iOS Style Writing App)
   ======================================================== */
.ios-post-modal {
  display: none;
  inset: 28px 10px 24px !important;
  background: rgba(18, 24, 38, 0.98) !important;
  backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 26px;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  z-index: 9999 !important;
  position: absolute !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  animation: modalScaleUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-post-modal.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.ios-post-modal-header {
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.ios-post-modal-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.ios-post-cancel-btn {
  background: none;
  border: none;
  color: #FF3B30;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.ios-post-publish-btn {
  background: #007AFF;
  border: none;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.ios-post-publish-btn:hover {
  background: #0056b3;
  transform: scale(1.04);
}

.ios-post-modal-body {
  padding: 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ios-post-title-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
  padding: 6px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  outline: none;
  box-sizing: border-box;
  letter-spacing: -0.025em;
}

.ios-post-title-input:focus {
  border-bottom-color: #00E5FF;
}

.ios-post-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ios-post-meta-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.72rem;
  color: #fff;
  outline: none;
  letter-spacing: -0.015em;
}

.ios-post-date-badge {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.ios-post-editor-toolbar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 4px 0;
  flex-shrink: 0;
}

.post-tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.post-tool-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00E5FF;
  color: #00E5FF;
}

.ios-post-textarea {
  flex: 1;
  min-height: 220px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.82rem;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard Variable", sans-serif;
  line-height: 1.6;
  color: #fff;
  outline: none;
  resize: none;
  box-sizing: border-box;
  letter-spacing: -0.015em;
}

.ios-post-textarea:focus {
  border-color: rgba(0, 229, 255, 0.5);
}

.ios-post-sub-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s;
}

.ios-post-sub-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00E5FF;
  color: #00E5FF;
}

/* ========================================================
   13. POST & BOOKMARK SEGMENTED CONTROL & FOLDER STYLES
   ======================================================== */
.ios-segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2px;
}

.ios-segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.ios-segment-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.ios-segment-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.9);
}

.app-bg-bookmark {
  background: linear-gradient(135deg, #007AFF 0%, #00F5D4 100%) !important;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.35) !important;
}

.mini-post {
  background: linear-gradient(135deg, #00C7FF 0%, #0072FF 100%);
}

.mini-bookmark {
  background: linear-gradient(135deg, #007AFF 0%, #00F5D4 100%);
}

.ios-folder-action-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.ios-folder-sub-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

.ios-folder-sub-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.ios-folder-sub-btn.lock-btn:hover {
  background: rgba(255, 159, 10, 0.25);
  border-color: #FF9F0A;
  color: #FF9F0A;
}

.ios-folder-sub-btn.is-locked {
  background: rgba(255, 159, 10, 0.2);
  border-color: rgba(255, 159, 10, 0.6);
  color: #FF9F0A;
}

.ios-folder-sub-btn.disband-btn:hover {
  background: rgba(255, 59, 48, 0.25);
  border-color: #FF3B30;
  color: #FF3B30;
}

.ios-folder-lock-badge {
  position: absolute;
  top: -4px;
  left: 2px;
  background: #FF9F0A;
  color: #000;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* ========================================================
   KAZAN IN-OS SECURE BROWSER & VPN STYLES
   ======================================================== */
.ios-browser-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0b0f19;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 40px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  animation: browserSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.ios-browser-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(22, 28, 45, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.ios-browser-nav-btns {
  display: flex;
  gap: 4px;
  align-items: center;
}

.ios-browser-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s;
}

.ios-browser-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ios-browser-omnibar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0 10px;
  height: 34px;
  gap: 6px;
  transition: border-color 0.2s;
}

.ios-browser-omnibar-wrap:focus-within {
  border-color: #00E5FF;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.ios-browser-ssl-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

.ios-browser-omnibar {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.82rem;
}

.ios-browser-action-icon {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px;
  transition: transform 0.15s;
}

.ios-browser-action-icon:hover {
  transform: scale(1.15);
  color: #FFD60A;
}

/* VPN Control Badge */
.ios-browser-vpn-control {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  user-select: none;
}

.ios-browser-vpn-control:hover {
  background: rgba(255, 255, 255, 0.16);
}

.ios-browser-vpn-control.vpn-active {
  background: rgba(0, 245, 212, 0.18);
  border-color: #00F5D4;
  color: #00F5D4;
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
}

.ios-browser-vpn-control.vpn-active .ios-vpn-icon {
  animation: vpnPulse 1.8s infinite ease-in-out;
}

@keyframes vpnPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 4px #00F5D4); }
  100% { transform: scale(1); }
}

.ios-browser-close-btn {
  background: rgba(255, 59, 48, 0.2);
  border: 1px solid rgba(255, 59, 48, 0.4);
  color: #FF3B30;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.15s;
}

.ios-browser-close-btn:hover {
  background: #FF3B30;
  color: #fff;
}

/* Tabs Bar */
.ios-browser-tabs-bar {
  display: flex;
  align-items: center;
  background: rgba(15, 20, 32, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px 0;
  gap: 6px;
  overflow-x: auto;
  flex-shrink: 0;
}

.ios-browser-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  padding: 6px 12px;
  border-radius: 8px 8px 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s;
}

.ios-browser-tab.active {
  background: #0b0f19;
  border-color: rgba(0, 229, 255, 0.3);
  color: #fff;
  font-weight: 600;
}

.ios-tab-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 2px;
  line-height: 1;
}

.ios-tab-close-btn:hover {
  color: #FF3B30;
}

.ios-browser-newtab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s;
}

.ios-browser-newtab-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Viewport & Speed Dial */
.ios-browser-viewport-container {
  flex: 1;
  position: relative;
  background: #0b0f19;
  overflow: hidden;
}

.ios-browser-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.ios-browser-speed-dial {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 20px;
  overflow-y: auto;
}

.speed-dial-hero {
  text-align: center;
}

.speed-dial-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #00E5FF 0%, #007AFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.speed-dial-badge {
  margin-top: 6px;
  display: inline-block;
  padding: 3px 10px;
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 999px;
  font-size: 0.68rem;
  color: #00F5D4;
}

.speed-dial-search-box {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 440px;
}

.speed-dial-search-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
}

.speed-dial-search-box input:focus {
  border-color: #00E5FF;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.speed-dial-search-box button {
  background: #007AFF;
  border: none;
  border-radius: 12px;
  color: #fff;
  padding: 0 16px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.speed-dial-search-box button:hover {
  opacity: 0.9;
}

.speed-dial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 440px;
}

.speed-dial-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.speed-dial-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  border-color: rgba(0, 229, 255, 0.4);
}

.speed-dial-card-icon {
  font-size: 1.6rem;
}

.speed-dial-card-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-align: center;
}

/* Loader */
.ios-browser-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #00E5FF;
  font-size: 0.82rem;
  z-index: 10;
}

.ios-browser-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 229, 255, 0.2);
  border-top-color: #00E5FF;
  border-radius: 50%;
  animation: browserSpin 0.8s linear infinite;
}

@keyframes browserSpin {
  to { transform: rotate(360deg); }
}

