/* Libry - Mobile Settings & Subpages Design System */

.settings-view-wrapper {
  min-height: calc(100vh - 140px);
  padding: 16px 16px 110px 16px;
  max-width: 640px;
  margin: 0 auto;
  color: #f8fafc;
  animation: settingsFadeIn 0.25s ease-out;
}

@keyframes settingsFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header & Navigation Bar */
.settings-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

.settings-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 33, 49, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
}

.settings-back-btn:hover, .settings-back-btn:active {
  background: rgba(28, 226, 189, 0.12);
  border-color: rgba(28, 226, 189, 0.35);
  color: #1ce2bd;
  transform: translateX(-2px);
}

.settings-nav-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Settings Hero Banner / Description */
.settings-hero-header {
  margin-bottom: 20px;
}

.settings-main-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.settings-main-subtitle {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.5;
}

/* User Card in Settings */
.settings-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(7, 30, 44, 0.85) 0%, rgba(10, 37, 55, 0.65) 100%);
  border: 1px solid rgba(28, 226, 189, 0.22);
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-user-card:hover {
  border-color: rgba(28, 226, 189, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(28, 226, 189, 0.15);
}

.settings-user-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(28, 226, 189, 0.6);
  box-shadow: 0 0 12px rgba(28, 226, 189, 0.3);
}

.settings-user-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 3px;
}

.settings-user-email {
  font-size: 12.5px;
  color: #1ce2bd;
  font-weight: 500;
}

.settings-chevron {
  color: #64748b;
  font-size: 18px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.settings-user-card:hover .settings-chevron,
.settings-card:hover .settings-chevron {
  color: #1ce2bd;
  transform: translateX(3px);
}

/* Section Header */
.settings-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1ce2bd;
  margin: 24px 0 10px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-section-title.danger {
  color: #f43f5e;
}

/* Card Stack */
.settings-group-card {
  background: rgba(7, 30, 44, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
}

/* Individual Settings Item Row */
.settings-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
  user-select: none;
}

.settings-card:last-child {
  border-bottom: none;
}

.settings-card.clickable {
  cursor: pointer;
}

.settings-card.clickable:hover {
  background: rgba(255, 255, 255, 0.04);
}

.settings-card.clickable:active {
  background: rgba(255, 255, 255, 0.07);
}

.settings-card-left {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
  min-width: 0;
}

.settings-card-icon {
  font-size: 18px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 33, 49, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  flex-shrink: 0;
}

.settings-card-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.settings-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}

.settings-card-desc {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.35;
}

.settings-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 12px;
}

.settings-card-badge {
  font-size: 13px;
  color: #1ce2bd;
  font-weight: 600;
  background: rgba(28, 226, 189, 0.1);
  border: 1px solid rgba(28, 226, 189, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
}

/* Modern Glowing Toggle Switch */
.libry-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.libry-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.libry-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.libry-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #94a3b8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.libry-toggle input:checked + .libry-toggle-slider {
  background: linear-gradient(135deg, #10b981 0%, #1ce2bd 100%);
  border-color: #1ce2bd;
  box-shadow: 0 0 14px rgba(28, 226, 189, 0.45);
}

.libry-toggle input:checked + .libry-toggle-slider:before {
  transform: translateX(20px);
  background-color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.libry-toggle.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Info / Tip Box */
.settings-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(14, 42, 61, 0.5);
  border: 1px solid rgba(28, 226, 189, 0.2);
  border-radius: 16px;
  margin: 18px 0;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
}

.settings-tip-icon {
  font-size: 16px;
  color: #1ce2bd;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Danger Zone */
.settings-danger-card {
  background: linear-gradient(180deg, rgba(35, 12, 18, 0.6) 0%, rgba(20, 8, 12, 0.8) 100%);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 20px;
  padding: 18px;
  margin-top: 10px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.08);
}

.settings-danger-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.settings-danger-title {
  font-size: 15px;
  font-weight: 700;
  color: #fda4af;
}

.settings-danger-desc {
  font-size: 12.5px;
  color: #e2e8f0;
  opacity: 0.8;
  margin-bottom: 16px;
  line-height: 1.4;
}

.settings-danger-btn {
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.settings-danger-btn:hover {
  background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.5);
}

.settings-danger-btn:active {
  transform: translateY(0);
}

/* Language Selection Rows */
.lang-radio-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-radio-card:last-child {
  border-bottom: none;
}

.lang-radio-card.active {
  background: rgba(28, 226, 189, 0.08);
}

.lang-radio-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lang-radio-card.active .lang-radio-indicator {
  border-color: #1ce2bd;
  background: #1ce2bd;
  box-shadow: 0 0 10px rgba(28, 226, 189, 0.6);
}

.lang-radio-card.active .lang-radio-indicator:after {
  content: "";
  width: 8px;
  height: 8px;
  background: #071e2c;
  border-radius: 50%;
}

/* FAQ Accordion */
.faq-accordion-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}

.faq-accordion-item:last-child {
  border-bottom: none;
}

.faq-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-accordion-trigger:hover {
  color: #1ce2bd;
}

.faq-accordion-chevron {
  font-size: 14px;
  color: #64748b;
  transition: transform 0.25s ease, color 0.25s ease;
}

.faq-accordion-item.open .faq-accordion-chevron {
  transform: rotate(180deg);
  color: #1ce2bd;
}

.faq-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding: 0 16px;
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.6;
}

.faq-accordion-item.open .faq-accordion-content {
  max-height: 250px;
  padding-bottom: 16px;
}

/* About Screen Brand Showcase */
.about-brand-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px 20px 20px;
}

.about-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  box-shadow: 0 0 24px rgba(28, 226, 189, 0.35);
  margin-bottom: 14px;
}

.about-brand-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.about-brand-version {
  font-size: 12.5px;
  color: #1ce2bd;
  font-weight: 600;
  margin-top: 2px;
  margin-bottom: 12px;
}

.about-brand-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.55;
  max-width: 380px;
}

.about-footer-copyright {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 30px;
}

/* Mini Modern Snackbar */
.libry-mini-snackbar {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(7, 30, 44, 0.92);
  border: 1px solid rgba(28, 226, 189, 0.45);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(28, 226, 189, 0.25);
  backdrop-filter: blur(20px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.libry-mini-snackbar.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.libry-mini-snackbar.error {
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(244, 63, 94, 0.25);
}

/* Delete Confirmation Modal */
.settings-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 3500000 !important;
  animation: modalFadeIn 0.2s ease-out;
}

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

.settings-modal-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, #0a2537 0%, #061926 100%);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 24px;
  padding: 24px;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(244, 63, 94, 0.15);
  animation: modalSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
  from {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.settings-modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.settings-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.settings-modal-icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}

.settings-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.settings-modal-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 22px;
}

.settings-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-modal-confirm-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  border: none;
  border-radius: 14px;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4);
  transition: all 0.2s ease;
}

.settings-modal-confirm-btn:hover {
  background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  transform: translateY(-1px);
}

.settings-modal-cancel-btn {
  width: 100%;
  padding: 13px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-modal-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ================= FAQ ACCORDION ================= */
.faq-accordion-item {
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.faq-accordion-item.open {
  border-color: rgba(28, 226, 189, 0.35);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.faq-accordion-trigger {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.faq-accordion-chevron {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.25s ease, color 0.25s ease;
  display: inline-block;
}

.faq-accordion-item.open .faq-accordion-chevron {
  transform: rotate(180deg);
  color: #1ce2bd;
}

.faq-accordion-content {
  padding: 0 16px 14px 16px;
  color: #94a3b8;
  font-size: 13.5px;
  line-height: 1.6;
}

.faq-accordion-item:not(.open) .faq-accordion-content {
  display: none !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.faq-accordion-item.open .faq-accordion-content {
  display: block !important;
}

/* ================= NARROW VIEWPORT OPTIMIZATIONS (<360px) ================= */
@media (max-width: 360px) {
  .settings-container {
    padding: 12px 10px 40px 10px !important;
  }
  .settings-nav-header {
    gap: 6px;
    margin-bottom: 14px;
  }
  .settings-back-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 10px;
    gap: 4px;
  }
  .settings-back-btn svg {
    width: 14px;
    height: 14px;
  }
  .settings-nav-title {
    font-size: 15px;
    gap: 4px;
  }
  .settings-main-title {
    font-size: 20px;
  }
  .settings-main-subtitle {
    font-size: 12px;
  }
  .settings-user-card {
    padding: 10px 12px;
    border-radius: 14px;
  }
  .settings-row {
    padding: 11px 12px;
  }
  .settings-row-title {
    font-size: 13px;
  }
  .settings-row-subtitle {
    font-size: 11px;
  }
  .settings-pill-select {
    gap: 4px;
  }
  .settings-pill-btn {
    padding: 6px 8px;
    font-size: 11px;
  }
}


