:root {
  --bg: #0b0f1a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 16px;
}

.no-scroll { overflow: hidden; }

/* Overlay */
#nl-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; z-index: 9998; }

/* Modal */
#nl-modal {position: fixed;left: 50%;top: 50%;transform: translate(-50%, -50%) scale(.96);width: 92vw;max-width: 440px;background: linear-gradient(180deg, #0f172a 0%, #0b1222 100%);border: 1px solid rgba(255,255,255,.08);border-radius: var(--radius);box-shadow: 0 20px 60px rgba(0,0,0,.45);padding: 22px;display: none;z-index: 9999;opacity: 0;}

/* Fancy border glow */
#nl-modal::before { content: ""; position: absolute; inset: -1px; border-radius: calc(var(--radius) + 1px); padding: 1px; background: linear-gradient(120deg, rgba(99,102,241,.35), rgba(139,92,246,.25), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

.nl-show { display: block !important; }

.nl-animate-in { animation: nl-pop .18s ease-out forwards; }
.nl-animate-out { animation: nl-pop-out .14s ease-in forwards; }

@keyframes nl-pop { to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes nl-pop-out { to { transform: translate(-50%, -50%) scale(.92); opacity: 0; } }

.nl-header { display: flex; align-items: start; gap: 14px; margin-bottom: 14px; }
.nl-badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: radial-gradient(120% 120% at 0% 0%, rgba(99,102,241,.4), rgba(139,92,246,.25) 50%, transparent 70%); border: 1px solid rgba(255,255,255,.08); }
.nl-title { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.nl-sub { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

.nl-close { margin-left: auto; background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 6px; border-radius: 10px; }
.nl-close:hover { color: var(--text); background: rgba(255,255,255,.05); }

form#nl-form { display: grid; gap: 10px; margin-top: 8px; }

.nl-input { width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: var(--text); font-size: 15px; outline: none; }
.nl-input::placeholder { color: #6b7280; }
.nl-input:focus { border-color: rgba(99,102,241,.55); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

.nl-button { padding: 12px 14px; border: 0; border-radius: 12px; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: white; font-weight: 600; cursor: pointer; transition: transform .06s ease; }
.nl-button:active { transform: translateY(1px); }
.nl-button[disabled] { opacity: .6; cursor: not-allowed; }

.nl-helper { font-size: .85rem; color: var(--muted); }
.nl-error { font-size: .9rem; color: var(--danger); display: none; }
.nl-success { font-size: .95rem; color: var(--success); display: none; }

.nl-footer { margin-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }

@media (max-width: 420px) { .nl-sub { font-size: .9rem; } }

/* Overlay */
#nl-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Modal */
#nl-modal {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #0f172a;
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  z-index: 9999;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

/* Show overlay & modal */
.nl-show {
  display: block !important;
  opacity: 1 !important;
}

/* Close button */
.nl-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  float: right;
}

/* Input */
.nl-input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #444;
  background: #1e293b;
  color: #fff;
}

/* Button */
.nl-button {
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #6366f1;
  color: white;
  cursor: pointer;
}

/* Messages */
.nl-error {
  color: #f87171;
  display: none;
}

.nl-success {
  color: #10b981;
  display: none;
}

.nl-previous-news {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    padding-top: 10px;
}

.nl-previous-news ul {
    list-style: disc;
    padding-left: 20px;
}

.nl-previous-news a {
    text-decoration: none;
    color: #0073aa;
}

.nl-previous-news a:hover {
    text-decoration: underline;
}
