:root {
  --accent: #00d4e8;
  --surface: #0f1419;
  --text: #e8edf2;
  --muted: #7a8fa6;
  --signal-red: #e84855;
  --signal-amber: #f5a623;
  --border: rgba(0, 212, 232, 0.14);
  --surface-2: #0f1419;
  --text-primary: #e8edf2;
  --text-secondary: #7a8fa6;
  --text-success: #00d4e8;
  --text-danger: #e84855;
  --text-warning: #f5a623;
  --text-accent: #00d4e8;
  --success-dark: #006666;
  --error-dark: #663333;
  --warning-dark: #664422;
  --info-dark: #004466;
}

.stbox-overlay {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 9999 !important;
  align-items: center !important;
  justify-content: center !important;
  animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stbox-overlay.active {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.stbox-box {
  background: linear-gradient(135deg, rgba(15, 20, 25, 0.95), rgba(20, 28, 38, 0.95)) !important;
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  padding: 2rem !important;
  max-width: 450px !important;
  width: 90% !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(0, 212, 232, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative !important;
  overflow: hidden !important;
}

.stbox-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 232, 0.3), transparent);
  pointer-events: none;
}

.stbox-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.stbox-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 212, 232, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stbox-icon i {
  font-size: 22px;
  font-weight: 600;
}

.stbox-text {
  flex: 1;
  margin-top: 2px;
}

.stbox-title {
  margin: 0 0 8px 0 !important;
  font-weight: 700 !important;
  font-size: 17px !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.015em !important;
  line-height: 1.3 !important;
}

.stbox-description {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--text-secondary) !important;
  line-height: 1.6 !important;
  opacity: 0.9 !important;
}

.stbox-close-btn {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 232, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease !important;
}

.stbox-close-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 212, 232, 0.12);
  border-color: rgba(0, 212, 232, 0.2);
  transform: rotate(90deg) scale(1.05) !important;
}

.stbox-close-btn:active {
  transform: rotate(90deg) scale(0.95) !important;
}

.stbox-close-btn i {
  font-size: 18px;
}

.stbox.success {
  background: linear-gradient(135deg, rgba(0, 102, 102, 0.15), rgba(0, 180, 180, 0.08)) !important;
  border-color: rgba(0, 212, 232, 0.3) !important;
}

.stbox.success .stbox-icon {
  background: linear-gradient(135deg, rgba(0, 212, 232, 0.15), rgba(0, 180, 180, 0.1));
  box-shadow: 0 0 16px rgba(0, 212, 232, 0.1);
}

.stbox.success .stbox-icon i {
  color: var(--text-success) !important;
}

.stbox.success .stbox-title {
  color: var(--text-success) !important;
}

.stbox.error {
  background: linear-gradient(135deg, rgba(102, 51, 51, 0.15), rgba(180, 80, 80, 0.08)) !important;
  border-color: rgba(232, 72, 85, 0.3) !important;
}

.stbox.error .stbox-icon {
  background: linear-gradient(135deg, rgba(232, 72, 85, 0.15), rgba(200, 60, 70, 0.1));
  box-shadow: 0 0 16px rgba(232, 72, 85, 0.1);
}

.stbox.error .stbox-icon i {
  color: var(--text-danger) !important;
}

.stbox.error .stbox-title {
  color: var(--text-danger) !important;
}

.stbox.warning {
  background: linear-gradient(135deg, rgba(102, 68, 34, 0.15), rgba(180, 140, 80, 0.08)) !important;
  border-color: rgba(245, 166, 35, 0.3) !important;
}

.stbox.warning .stbox-icon {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.15), rgba(220, 140, 40, 0.1));
  box-shadow: 0 0 16px rgba(245, 166, 35, 0.1);
}

.stbox.warning .stbox-icon i {
  color: var(--text-warning) !important;
}

.stbox.warning .stbox-title {
  color: var(--text-warning) !important;
}

.stbox.info {
  background: linear-gradient(135deg, rgba(0, 68, 102, 0.15), rgba(0, 150, 180, 0.08)) !important;
  border-color: rgba(0, 212, 232, 0.3) !important;
}

.stbox.info .stbox-icon {
  background: linear-gradient(135deg, rgba(0, 212, 232, 0.15), rgba(0, 180, 220, 0.1));
  box-shadow: 0 0 16px rgba(0, 212, 232, 0.1);
}

.stbox.info .stbox-icon i {
  color: var(--text-accent) !important;
}

.stbox.info .stbox-title {
  color: var(--text-accent) !important;
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

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

.stbox-overlay.closing .stbox-box {
  animation: slideOut 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stbox-overlay.closing {
  animation: fadeOut 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stbox-overlay.auto-close {
  animation: fadeIn 0.25s ease-out, fadeOut 0.25s ease-out 2.75s forwards;
}

@media (max-width: 480px) {
  .stbox-box {
    padding: 1.5rem !important;
    max-width: 95vw !important;
    border-radius: 14px !important;
  }

  .stbox-content {
    gap: 12px;
  }

  .stbox-icon {
    width: 36px;
    height: 36px;
  }

  .stbox-icon i {
    font-size: 20px;
  }

  .stbox-title {
    font-size: 15px !important;
  }

  .stbox-description {
    font-size: 12px !important;
  }

  .stbox-close-btn {
    width: 28px;
    height: 28px;
    padding: 4px;
  }
}

@media (prefers-color-scheme: dark) {
  .stbox-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
  }

  .stbox-box {
    box-shadow: 
      0 30px 60px rgba(0, 0, 0, 0.6),
      0 0 2px rgba(0, 212, 232, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stbox-box,
  .stbox-overlay,
  .stbox-icon,
  .stbox-close-btn {
    animation: none !important;
    transition: none !important;
  }
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #1fc8db;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
