/* =========================================
   FIX80: Profile Editor (Discord-like) + modal UX polish
   - Profiles page inside Settings modal
   - Settings modal / backdrops animations
   - Global modal shield (no click-through) is driven from JS
   ========================================= */

:root{
  --nc-prof-card: rgba(25,26,30,.65);
  --nc-prof-border: rgba(255,255,255,.06);
  --nc-prof-soft: rgba(255,255,255,.08);
  --nc-prof-text-dim: rgba(255,255,255,.65);
}

/* Settings modal open animation */
@keyframes ncSettingsIn{
  from{ opacity:0; transform: translateY(10px) scale(.985); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}
@keyframes ncBackdropIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

.nc-settings-overlay:not(.is-hidden){
  animation: ncBackdropIn .16s ease-out;
}

.nc-settings-overlay:not(.is-hidden) .nc-settings-modal{
  animation: ncSettingsIn .18s cubic-bezier(.2,.9,.2,1);
  transform-origin: 50% 25%;
}

/* Backdrop fade for classic modals */
.modal-backdrop.active{
  animation: ncBackdropIn .14s ease-out;
}

/* Global click shield (created by JS) */
#nc-modal-shield{
  position: fixed;
  inset: 0;
  background: transparent;
  display: none;
  pointer-events: auto;
}
#nc-modal-shield.is-active{ display:block; }

/* ===== Profiles page ===== */

#nc-profiles-page{ padding-bottom: 8px; }

.nc-prof-tabs{
  display:flex;
  gap: 16px;
  margin: 10px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nc-prof-tab{
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.nc-prof-tab.is-active{
  color: rgba(255,255,255,.92);
  border-bottom-color: rgba(120, 200, 255, .85);
}

.nc-prof-panel{ display:none; }
.nc-prof-panel.is-active{ display:block; }

.nc-prof-grid{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px){
  .nc-prof-grid{ grid-template-columns: 1fr; }
}

.nc-prof-form{
  border-radius: 14px;
  border: 1px solid var(--nc-prof-border);
  background: rgba(25,26,30,.55);
  padding: 14px;
}

.nc-prof-section{
  margin-bottom: 14px;
}

.nc-prof-label{
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(255,255,255,.82);
  margin-bottom: 8px;
}

.nc-prof-hint{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
}

.nc-prof-input,
.nc-prof-textarea,
.nc-prof-select{
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  outline: none;
}

.nc-prof-input:focus,
.nc-prof-textarea:focus,
.nc-prof-select:focus{
  border-color: rgba(120, 200, 255, .45);
  box-shadow: 0 0 0 3px rgba(120, 200, 255, .15);
}

.nc-prof-textarea{
  min-height: 110px;
  resize: vertical;
}

.nc-prof-counter{
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  text-align: right;
}

.nc-prof-color-row{
  display:flex;
  gap: 10px;
  align-items: center;
}

.nc-prof-color{
  width: 44px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  padding: 3px;
}

.nc-prof-pulsar{
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(135deg, rgba(90, 90, 255, .16), rgba(46, 200, 128, .12));
}
.nc-prof-pulsar-title{ font-weight: 900; font-size: 12px; letter-spacing:.02em; }
.nc-prof-pulsar-sub{ margin-top: 4px; color: rgba(255,255,255,.65); font-size: 12px; }

/* Preview */
.nc-prof-preview{ position: sticky; top: 12px; }
@media (max-width: 980px){ .nc-prof-preview{ position: static; } }

.nc-prof-preview-card{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(25,26,30,.65);
}

.nc-prof-preview-banner{
  height: 78px;
  background: linear-gradient(90deg, rgba(46,200,128,1), rgba(46,200,128,1));
}

.nc-prof-preview-body{ padding: 14px; position: relative; }

.nc-prof-preview-ava{
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  border: 5px solid rgba(42,43,49,.92);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  margin-top: -48px;
}

.nc-prof-preview-ava-img{ width:100%; height:100%; object-fit: cover; }
.nc-prof-preview-ava-fb{ font-weight: 1000; font-size: 28px; color: rgba(255,255,255,.88); }

.nc-prof-preview-name{ margin-top: 10px; font-weight: 1000; font-size: 16px; color: rgba(255,255,255,.92); }
.nc-prof-preview-pronouns{ margin-top: 4px; font-size: 12px; color: rgba(255,255,255,.65); }
.nc-prof-preview-about{ margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.85); white-space: pre-wrap; }

/* Save bar */
.nc-prof-savebar{
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(10,12,16,.70);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.nc-prof-savebar.is-hidden{ display:none !important; }

.nc-prof-savebar-text{
  color: rgba(255,255,255,.78);
  font-weight: 800;
  font-size: 12px;
}

.nc-prof-savebar-actions{ display:flex; gap: 10px; }

/* Server profiles */
.nc-prof-server-wrap{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(25,26,30,.55);
  padding: 14px;
}

.nc-prof-server-lock{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 340px;
}

.nc-prof-lock-card{
  width: min(520px, 100%);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(18,20,26,.70);
  text-align: center;
}

.nc-prof-lock-title{ font-weight: 1000; font-size: 16px; }
.nc-prof-lock-sub{ margin-top: 8px; color: rgba(255,255,255,.65); font-size: 12px; }
.nc-prof-lock-hint{ margin-top: 10px; color: rgba(255,255,255,.45); font-size: 12px; }

.nc-prof-server-editor.is-hidden{ display:none !important; }



/* =========================================
   FIX82: Profiles page layout closer to Discord
   - top shop banner
   - widgets card
   - row list (avatar, decoration, badge, effect, banner color)
   - preview titles + status pill + badge preview
   ========================================= */

#nc-profiles-page .nc-settings-page-head{ margin-bottom: 0; }

.nc-prof-tabs{
  margin-top: 6px;
  gap: 22px;
}
.nc-prof-tab{
  font-weight: 800;
  font-size: 14px;
  padding: 10px 2px;
}
.nc-prof-tab.is-active{
  border-bottom-color: rgba(88, 161, 255, .95);
}

.nc-prof-grid{
  grid-template-columns: minmax(440px, 1fr) 360px;
  gap: 22px;
}

.nc-prof-left{ min-width: 0; }

.nc-prof-block{
  border-radius: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  margin-top: 14px;
}

.nc-prof-section{ margin-bottom: 16px; }

.nc-prof-label{
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
}

.nc-prof-input,
.nc-prof-textarea,
.nc-prof-select{
  border-radius: 10px;
  background: rgba(0,0,0,.22);
}

.nc-prof-textarea{
  min-height: 140px;
}

.nc-prof-hex{
  width: 160px;
  flex: 0 0 auto;
}

/* Shop banner */
.nc-prof-shopbanner{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(1200px 260px at 20% 10%, rgba(180,120,255,.35), transparent 55%),
    radial-gradient(800px 220px at 90% 35%, rgba(100,180,255,.30), transparent 55%),
    linear-gradient(135deg, rgba(30,32,44,.85), rgba(22,24,34,.85));
  padding: 14px 14px;
  display:flex;
  gap: 14px;
  align-items:center;
  justify-content: space-between;
  overflow: hidden;
}
.nc-prof-shopcontent{ min-width: 0; }
.nc-prof-shop-title{
  font-weight: 1000;
  font-size: 18px;
  line-height: 1.15;
  color: rgba(255,255,255,.95);
}
.nc-prof-shop-sub{
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,.70);
  max-width: 560px;
}
.nc-prof-shop-btn{
  background: rgba(255,255,255,.92) !important;
  color: rgba(0,0,0,.88) !important;
  border: 0 !important;
  white-space: nowrap;
}
.nc-prof-shop-btn:hover{ filter: brightness(.98); }

/* Widgets card */
.nc-prof-widgets-card{
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(25,26,30,.55);
  padding: 14px;
}
.nc-prof-widgets-title{
  font-weight: 1000;
  font-size: 14px;
  color: rgba(255,255,255,.92);
  display:flex;
  align-items:center;
  gap: 10px;
}
.nc-prof-badge-new{
  font-size: 10px;
  font-weight: 1000;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 60, 90, .95);
  color: #fff;
}
.nc-prof-widgets-sub{
  margin-top: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,.65);
}
#nc-prof-add-widgets{ margin-top: 10px; }

/* Row list */
.nc-prof-rowlist{
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(25,26,30,.50);
  overflow: hidden;
}
.nc-prof-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.nc-prof-row:first-child{ border-top: 0; }
.nc-prof-row-left{ min-width: 0; }
.nc-prof-row-title{
  font-weight: 900;
  font-size: 13px;
  color: rgba(255,255,255,.90);
}
.nc-prof-row .nc-btn{
  border-radius: 999px;
  padding: 8px 12px;
}
.nc-prof-row-color{
  align-items: flex-start;
}
.nc-prof-row-color .nc-prof-color-row{
  margin-top: 0;
}

/* Upsell bar (Discord-like) */
.nc-prof-upsellbar{
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(18,20,26,.70);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.nc-prof-upsell-title{
  font-weight: 900;
  color: rgba(255,255,255,.88);
  font-size: 13px;
}
.nc-prof-upsell-btn{
  border-radius: 999px !important;
  padding: 9px 14px !important;
}

/* Preview */
.nc-prof-preview-title{
  font-weight: 1000;
  font-size: 12px;
  color: rgba(255,255,255,.78);
  margin: 2px 0 10px;
}

.nc-prof-preview-card{
  border-radius: 12px;
}
.nc-prof-preview-banner{
  height: 110px;
}
.nc-prof-preview-body{
  padding: 14px;
}

.nc-prof-preview-toprow{
  display:flex;
  align-items:center;
  gap: 10px;
  justify-content: flex-start;
}

.nc-prof-preview-ava{
  width: 82px;
  height: 82px;
  margin-top: -52px;
}

.nc-prof-preview-statuspill{
  margin-top: -30px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(36,38,48,.90);
  color: rgba(255,255,255,.82);
  font-weight: 800;
  font-size: 12px;
  padding: 0 12px;
  display:flex;
  align-items:center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.nc-prof-preview-statuspill:hover{ background: rgba(42,44,56,.95); }
.nc-prof-preview-plus{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  font-weight: 1000;
}

.nc-prof-preview-name{
  margin-top: 10px;
  font-size: 16px;
}

.nc-prof-preview-subline{
  margin-top: 2px;
  display:flex;
  align-items:center;
  gap: 8px;
  min-height: 18px;
}
.nc-prof-preview-subline .nc-prof-preview-pronouns{
  font-size: 12px;
  color: rgba(255,255,255,.70);
}
.nc-prof-preview-tag{
  font-size: 12px;
  color: rgba(120, 200, 255, .85);
  opacity: .9;
}

.nc-prof-preview-btn{
  margin-top: 10px;
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: rgba(88, 101, 242, .95);
  color: rgba(255,255,255,.95);
  font-weight: 900;
  cursor:pointer;
}
.nc-prof-preview-btn:hover{ filter: brightness(1.03); }
.nc-prof-preview-btn:active{ transform: translateY(1px); }

.nc-prof-preview-about{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Badge preview */
.nc-prof-badge-title{
  font-weight: 1000;
  font-size: 12px;
  color: rgba(255,255,255,.78);
  margin: 14px 0 10px;
}
.nc-prof-badge-row{
  border-radius: 10px;
  padding: 10px 12px;
  display:flex;
  align-items:center;
  gap: 10px;
  background: rgba(25,26,30,.55);
}
.nc-prof-badge-ava{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow:hidden;
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
}
.nc-prof-badge-img{ width:100%; height:100%; object-fit: cover; }
.nc-prof-badge-fb{ font-weight: 1000; font-size: 12px; color: rgba(255,255,255,.9); }
.nc-prof-badge-name{
  font-weight: 900;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

/* Server tab head */
.nc-prof-server-head{
  margin-bottom: 12px;
}

/* =========================================
   FIX81: Settings modal polish (Discord-like header edit link)
   - clickable "Редактировать профиль…" with pencil in nav header
   - slightly cleaner nav items
   ========================================= */

.nc-settings-me{
  background: transparent !important;
  border: 0 !important;
  padding: 8px 8px !important;
  border-radius: 10px !important;
}
.nc-settings-me:hover{
  background: rgba(255,255,255,.04) !important;
}
.nc-settings-me-meta{ flex: 1 1 auto; min-width: 0; }
.nc-settings-me-name{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nc-settings-me-edit{
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  display:flex;
  align-items:center;
  gap: 6px;
  cursor: pointer;
  max-width: 100%;
}
.nc-settings-me-edit-text{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nc-settings-me-edit-ico{
  flex: 0 0 auto;
  opacity: .85;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.nc-settings-me-edit-ico svg{ width: 14px; height: 14px; display:block; }
.nc-settings-me-edit:hover{
  color: rgba(255,255,255,.78);
  text-decoration: underline;
}
.nc-settings-me-edit:active{ transform: translateY(1px); }

/* Nav item refinement */
.nc-settings-item{
  border-radius: 8px !important;
  padding: 8px 10px !important;
}
.nc-settings-item.is-active{
  background: rgba(255,255,255,.10) !important;
}
.nc-settings-item:hover{
  background: rgba(255,255,255,.07) !important;
}

/* Account page edit button (more like Discord, neutral) */
.nc-edit-profile-user{
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: rgba(255,255,255,.88) !important;
}
.nc-edit-profile-user:hover{
  background: rgba(255,255,255,.12) !important;
}

/* Make settings modal feel more solid */
.nc-settings-modal{
  background: rgba(35,36,41,.96) !important;
}
