/* 芥子须弥 Styles */

:root {
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --border-color: #334155;
  --accent-color: #6366f1;
}

body {
  margin: 0;
  padding: 0;
  background-color: #020617;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  user-select: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 0px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Hide Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.chat-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.chat-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.chat-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

/* Code Editor Lines */
.line-numbers {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  line-height: 20px;
}

.code-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 20px;
  tab-size: 2;
  white-space: pre;
  user-select: text;
}

/* Device Viewports */
.device-desktop {
  width: 100%;
  height: 100%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.device-tablet {
  width: 768px;
  max-width: 100%;
  height: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border-left: 1px solid #334155;
  border-right: 1px solid #334155;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.device-mobile {
  width: 375px;
  max-width: 100%;
  height: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border-left: 1px solid #334155;
  border-right: 1px solid #334155;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  animation: toast-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.25s ease;
}
@keyframes toast-in {
  from {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Glowing Aura */
.glow-pulse {
  animation: glow-pulse-anim 4s infinite ease-in-out;
}
@keyframes glow-pulse-anim {
  0%, 100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* Lightbox Modal */
.lightbox-backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

/* Tech Grid Background */
.tech-grid-pattern {
  background-image: radial-gradient(rgba(99, 102, 241, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Code Typing Cursor */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 13px;
  background-color: #818cf8;
  vertical-align: middle;
  animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
