:root {
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: #030014;
  background-image:
    radial-gradient(circle at 50% 0%, #4c1d9533 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, #db277722 0%, transparent 40%);
  min-height: 100vh;
  color: #e2e8f0;
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0f0c29;
}

::-webkit-scrollbar-thumb {
  background: #3b3b58;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* --- Utility Classes --- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Input & Textarea Styling */
.custom-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

.custom-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
  background: rgba(0, 0, 0, 0.5);
}

/* --- Modal Specifics --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 0, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0f0c29;
  border: 1px solid #2e2e48;
  width: 90%;
  max-width: 50rem;
  height: 85vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay:not(.hidden) .modal-content {
  transform: scale(1);
}

.modal-header {
  background: #1a1a2e;
  border-bottom: 1px solid #2e2e48;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-radius: 12px 12px 0 0;
}

.window-dots {
  display: flex;
  gap: 6px;
  margin-right: 1rem;
}

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

.dot-red {
  background: #ff5f56;
}

.dot-yellow {
  background: #ffbd2e;
}

.dot-green {
  background: #27c93f;
}

#modal-pre {
  flex: 1;
  overflow: auto;
  padding: 1.5rem;
  margin: 0;
  color: #a5b3ce;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

#modal-code {
  white-space: pre;
}

/* Copy Button in Modal */
.copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}


.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

#modal-x-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

/* --- Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-entry {
  animation: fadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Glow Button Effect */
.glow-btn {
  position: relative;
  background: var(--primary-gradient);
  z-index: 1;
  overflow: hidden;
  transition: transform 0.2s;
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  z-index: -1;
  transition: opacity 0.3s;
  opacity: 0;
}

.glow-btn:hover::before {
  opacity: 1;
}

.glow-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -5px rgba(168, 85, 247, 0.4);
}

/* Note Card Hover */
.note-card {
  transition: all 0.3s ease;
  min-height: 220px;
  padding: 1.1rem;
}

.note-card:hover {
  transform: translateY(-5px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Nav pill container */
.nav-pill {
  display: flex;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons inside nav */
#nav-upload,
#nav-view {
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
}

/* Active tab style */
#nav-upload.nav-active,
#nav-view.nav-active {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

#nav-upload:focus,
#nav-view:focus,
#nav-upload:active,
#nav-view:active,
.nav-pill:focus-within {
  outline: none !important;
  box-shadow: none !important;
}

button {
  -webkit-appearance: none;
  appearance: none;
}

.modal-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  white-space: nowrap;
}

.modal-title {
  min-width: 0;             
  font-size: 0.8rem;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;      
}

.modal-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;           
}

@media (max-width: 420px) {
  .copy-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
}

