/* ==========================================================================
   1. 100% TRANSPARENT AMOLED CARDS & CRISP BORDERS
   ========================================================================== */
.frosted-card {
  position: relative;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
  transition: transform 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
}

.frosted-card:hover {
  background: transparent;
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 0 25px var(--color-primary-glow);
}

@media (max-width: 600px) {
  .frosted-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
}

/* Running Light Sweep Effect */
.light-sweep {
  position: relative;
}

.light-sweep::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 20%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.02) 80%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.light-sweep:hover::after {
  opacity: 1;
  animation: sweepAnim 1.8s var(--ease-smooth) infinite;
}

@keyframes sweepAnim {
  0% { left: -120%; }
  100% { left: 220%; }
}

/* ==========================================================================
   2. BUTTONS & SPRING PRESS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease-spring), box-shadow 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth);
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96) !important;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #000000;
  font-weight: 800;
  border: none;
  box-shadow: 0 4px 24px var(--color-primary-glow);
  position: relative;
}

.btn-primary:hover {
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--color-primary-glow);
}

.btn-outline {
  background: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--color-primary-glow);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 0.98rem;
  font-weight: 700;
}

@media (max-width: 600px) {
  .btn-lg {
    padding: 11px 18px;
    font-size: 0.88rem;
  }
}

/* ==========================================================================
   3. PROTOCOL THEME PILL SWITCHER
   ========================================================================== */
.protocol-pill-toggle {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 3px;
  position: relative;
  user-select: none;
}

.protocol-tab {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: transparent;
  white-space: nowrap;
}

.protocol-tab:hover {
  color: #FFFFFF;
}

.protocol-tab.active {
  color: #000000;
  background: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 800;
  box-shadow: 0 2px 12px var(--color-primary-glow);
}

/* ==========================================================================
   4. STATUS LED, PILLS & BADGES
   ========================================================================== */
.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  text-decoration: none;
}

.hero-status-pill:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px var(--color-primary-glow);
  color: #FFFFFF;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  position: relative;
  flex-shrink: 0;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--color-success);
  animation: pulseRing 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-chip.badge-accent {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  box-shadow: 0 0 16px var(--color-primary-glow);
}

@media (max-width: 600px) {
  .badge-chip {
    font-size: 0.68rem;
    padding: 4px 10px;
    letter-spacing: 0.02em;
  }
}

/* ==========================================================================
   5. TERMINAL WINDOW (MACOS / LINUX IDE STYLE)
   ========================================================================== */
.terminal-window {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.t-dot.red { background: #FF5F56; }
.t-dot.yellow { background: #FFBD2E; }
.t-dot.green { background: #27C93F; }

.terminal-title {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.terminal-body {
  padding: 16px 18px;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #E2E8F0;
  overflow-x: auto;
}

.code-box {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #E4E4E7;
  overflow-x: auto;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.copy-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: var(--color-primary);
  color: #000000;
  border-color: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary-glow);
}

/* ==========================================================================
   6. PHONE MOCKUP (EXACT 1080x2400 9:20 ASPECT RATIO)
   ========================================================================== */
.phone-mockup-wrapper {
  position: relative;
  width: 310px;
  max-width: 100%;
  aspect-ratio: 1080 / 2400;
  height: auto;
  background: transparent;
  border-radius: 12px;
  padding: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(0, 245, 212, 0.15);
  margin: 0 auto;
}

[data-theme='socks5'] .phone-mockup-wrapper {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(179, 136, 255, 0.15);
}

.phone-screen-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1080 / 2400;
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: opacity 0.2s ease;
}

@media (max-width: 600px) {
  .phone-mockup-wrapper {
    width: min(200px, 58vw);
    border-radius: 10px;
    padding: 3px;
  }
  .phone-screen-viewport,
  .phone-screen-img {
    border-radius: 6px;
  }
}

.hotspot-point {
  position: absolute;
  width: 26px;
  height: 26px;
  cursor: pointer;
  z-index: 25;
}

.hotspot-point .hotspot-core {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
}

.hotspot-point .hotspot-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  animation: hotspotWave 2s infinite var(--ease-smooth);
}

@keyframes hotspotWave {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.0); opacity: 0; }
}

.hotspot-tooltip {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #000000;
  color: #FFFFFF;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--color-primary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9), 0 0 15px var(--color-primary-glow);
  z-index: 50;
}

.hotspot-point:hover .hotspot-tooltip {
  opacity: 1;
  visibility: visible;
  bottom: 36px;
}

/* ==========================================================================
   7. TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  background: #000000;
  border: 1px solid var(--color-primary);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), 0 0 20px var(--color-primary-glow);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s var(--ease-spring) forwards;
  pointer-events: auto;
}

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

@media (max-width: 600px) {
  .toast-container {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }
  .toast-msg {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   8. MOBILE SIDEBAR DRAWER (AMOLED GLASS)
   ========================================================================== */
.mobile-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-sidebar-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sidebar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: #000000;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.95), 0 0 35px var(--color-primary-glow);
  z-index: 9995;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-sidebar-drawer.is-open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.sidebar-body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.sidebar-protocol-toggle {
  width: 100%;
  margin-bottom: 8px;
}

.sidebar-protocol-toggle .protocol-tab {
  flex: 1;
  text-align: center;
}

.sidebar-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
}

.sidebar-nav-link:hover, .sidebar-nav-link.active {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  box-shadow: 0 0 12px var(--color-primary-glow);
}

.s-nav-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
