body {
  font-family: "Courier New", monospace;
  color: #c8b8e8;
  background: #08000f;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(80, 0, 130, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(50, 0, 100, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(30, 0, 70, 0.10) 0%, transparent 50%);
  background-attachment: fixed;
  animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% {
    background-image:
      radial-gradient(ellipse at 20% 50%, rgba(80, 0, 130, 0.12) 0%, transparent 60%),
      radial-gradient(ellipse at 80% 20%, rgba(50, 0, 100, 0.08) 0%, transparent 50%),
      radial-gradient(ellipse at 50% 90%, rgba(30, 0, 70, 0.10) 0%, transparent 50%);
  }
  100% {
    background-image:
      radial-gradient(ellipse at 70% 40%, rgba(80, 0, 130, 0.14) 0%, transparent 60%),
      radial-gradient(ellipse at 30% 80%, rgba(50, 0, 100, 0.06) 0%, transparent 50%),
      radial-gradient(ellipse at 50% 10%, rgba(40, 0, 80, 0.10) 0%, transparent 50%);
  }
}

.glassmorphism {
  background: rgba(20, 10, 35, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Slide-in sidebar (right side) */
.glassmorphism-sidebar {
  background: rgba(8, 2, 18, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* Password modal */
.glassmorphism-modal {
  background: rgba(12, 4, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.font-mono {
  font-family: "Courier New", monospace;
}

/* CodeMirror overrides */
.CodeMirror {
  height: 100% !important;
  background: #07000d !important;
  font-family: "Courier New", monospace !important;
  font-size: 14px;
  line-height: 1.5;
}

.CodeMirror-gutters {
  background: #0a0014 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.CodeMirror-linenumber {
  color: #665588 !important;
}

.CodeMirror-cursor {
  border-left: 2px solid #fff !important;
}

.CodeMirror-selected {
  background: rgba(255, 255, 255, 0.15) !important;
}

.CodeMirror-focused .CodeMirror-selected {
  background: rgba(100, 150, 255, 0.3) !important;
}

.CodeMirror-scrollbar-filler {
  background: #07000d !important;
}

#editorContainer {
  display: flex;
  height: 100%;
  width: 100%;
}

#editorContainer .CodeMirror {
  flex-grow: 1;
}

#pasteArea {
  font-family: "Courier New", monospace;
  line-height: 1.5;
  padding: 8px;
  min-width: 0;
}

#lineNumbers {
  font-family: "Courier New", monospace;
  line-height: 1.5;
  text-align: right;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: hidden;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: auto;
  min-width: 2.5rem;
  padding-right: 0;
}

footer {
  background: rgba(20, 10, 35, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* highlight.js overrides for paste view */
#pasteContent {
  font-family: "Courier New", monospace;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 8px;
  overflow-x: auto;
  background: #07000d;
}

#lineNumbers {
  background: #0a0014;
}

#pasteContent code.hljs {
  background: transparent;
  padding: 0;
}

.hljs {
  background: #07000d !important;
  color: #ddd;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
  color: #f92672;
}

.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
  color: #a6e22e;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
  color: #75715e;
}

.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-built_in {
  color: #ae81ff;
}

.hljs-function .hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__ {
  color: #a6e22e;
}

.hljs-attr,
.hljs-params {
  color: #fd971f;
}

#langBadge {
  display: inline;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Sidebar scrollbar styling */
#sidePanel::-webkit-scrollbar {
  width: 4px;
}
#sidePanel::-webkit-scrollbar-track {
  background: transparent;
}
#sidePanel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

/* Paste not found animation */
.animate-fadeIn {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Main content transitions */
#mainContent {
  transition: margin-right 0.3s ease-in-out;
}

/* Better responsive typography */
@media (max-width: 640px) {
  #pasteArea,
  #pasteContent {
    padding: 6px !important;
    font-size: 12px;
  }

  .CodeMirror {
    font-size: 12px !important;
  }

  #lineNumbers {
    min-width: 1.75rem;
    font-size: 11px;
  }

  body {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  #lineNumbers {
    width: 2.25rem;
  }
}

/* Ensure no overflow issues */
main {
  display: flex;
  flex-direction: column;
}

main:not(.not-found-main) > div {
  display: flex;
  height: 100%;
  overflow: hidden;
  width: 100%;
}

/* Line numbers alignment */
#lineNumbers {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
