/* ══════════════════════════════════════════════════════════════════════════
   MODALS — Offline downloader, Shortcuts, Login, Admin Config
   ══════════════════════════════════════════════════════════════════════════ */

/* Animations pulse keyframes — shared utility */
@keyframes pulse {
  0% { opacity: 0.35; }
  100% { opacity: 1; }
}

.off-mask, .sc-mask, .lm-mask {
  position: fixed;
  inset: 0;
  background: rgba(1, 3, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.off-mask.show, .sc-mask.show, .lm-mask.show {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.off-box, .sc-box, .lm-box {
  width: 100%;
  max-width: 520px;
  background: var(--glass-bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

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

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

.sc-close, .lm-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.sc-close:hover, .lm-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

/* Offline Downloader progress box features */
.off-box h3, .sc-box h3, .lm-box h3 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.off-box p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.off-info {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1rem;
  margin: 1.25rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.off-info b {
  color: var(--neon-cyan);
}

.off-prog-wrap {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.off-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  width: 0%;
  transition: width 0.2s;
  border-radius: 8px;
}

.off-prog-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
}

.off-prog-cur {
  color: var(--neon-cyan);
  font-weight: 700;
}

.off-current-file {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Fira Code', monospace;
}

.off-btn-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.off-btn {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.off-btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-cyan-dark) 100%);
  color: var(--text-dark);
}

.off-btn-primary:hover {
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.35);
  transform: translateY(-1px);
}

.off-btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.off-btn-secondary:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.off-btn-danger {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fca5a5;
}

.off-btn-danger:hover {
  background: var(--neon-rose);
  color: var(--text-dark);
}

.off-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* Keyboard Shortcut Modal Details */
.sc-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.sc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.sc-key {
  font-family: 'Fira Code', monospace;
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.sc-desc {
  color: var(--text-muted);
  font-size: 0.78rem;
  flex: 1;
  text-align: right;
  padding-right: 0.5rem;
}

/* Admin panel modal login structures */
.lm-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.lm-head .site-logo-box {
  margin: 0 auto 0.75rem;
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
}

.lm-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lm-input-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}

.lm-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.lm-input:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.lm-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.lm-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-purple-dark) 100%);
  color: var(--text-main);
  border: none;
  padding: 0.85rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
  font-family: inherit;
}

.lm-submit:hover {
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
  transform: translateY(-1px);
}

.lm-err {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fca5a5;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
}
