/* === roles.css — Обновленный дизайн под стиль Гостевой ===
   © Адаптировано для проекта Deadline
*/

/* 1. Общая сетка и отступы */
#roles-grid {
  display: flex;
  flex-direction: column;
  gap: 40px; 
  margin-top: 180px;
  transition: opacity .25s ease;
}

/* 2. Блок одной буквы */
.letter-block {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    border: none;
    padding: 0;
    max-height: none;
    overflow: visible;
    background: transparent;
}

/* 3. Буква-заголовок (изящная, на всю ширину) */
.letter-block h2 {
    grid-column: 1 / -1;
    width: 880px;
    display: flex;
    height: 65px;
    margin-left: -20px;
    background: var(--catbg) center center no-repeat !important;
    background-size: cover !important;
    padding: 0px 20px;
    margin-top: -40px;
    font: 400 24px var(--font2) !important;
    text-transform: capitalize;
    letter-spacing: 1px;
    color: rgb(var(--white), .6) !important;
    text-shadow: 1px 1px 2px #00000061;
    align-items: center;
    justify-content: flex-start;
}

.roles-header h2 {width:600px;}

/* 4. Карточка фандома (Эффект стекла как в Гостевой) */
.fandom {
    margin: 0 0 10px 0;
    outline: 1px solid rgb(255 255 255 / 15%);
    outline-offset: -2px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background 0.3s ease;
    border-radius: 5px;
    padding:1px;
}

.fandom:hover {
  transform: translateY(-2px);
}

/* Заголовок фандома */
.cast-title {
    background: rgb(var(--black), .05);
    text-transform: capitalize;
    letter-spacing: 1px;
    color: rgb(var(--text), 0.9);
    border-bottom: 1px dashed rgb(255 255 255 / 20%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 20px;
    border-radius: 5px 5px 0px 0px;
    margin-bottom: 10px;
    font: 400 16px var(--font4) !important;
    height: 40px;
}

.cast-name {
  flex-grow: 1;
}

/* Иконки админки (шестеренки) в заголовке */
.cast-title .edit-cast,
.cast-title .cast-star {
  color: rgb(var(--white), 0.4);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
  text-decoration: none;
  font-size: 14px;
}
.cast-title:hover .edit-cast,
.cast-title .cast-star:hover {
  color: rgb(var(--white), 1);
  transform: scale(1.1);
}

/* 5. Список персонажей */
.names {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0px 20px 10px 20px;
}

.role-item {
    display: flex;
    flex-direction: row;
    /* gap: 4px; */
    /* padding: 0px 20px 10px 20px; */
    flex-wrap: nowrap;
}

.role-item a {
    color: rgb(var(--acc1), 0.9) !important;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: flex;
    align-items: center;
    font: 400 10px var(--font);
}

.role-item a:hover {
  color: #000 !important;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

/* Маркер перед именем персонажа */
.role-item a:before {
    content: "\f105";
    font-family: var(--fa);
    font-weight: 900;
    color: rgb(var(--acc3), 0.3);
    margin-right: 8px;
    font-size: 11px;
    transition: color 0.3s;
}

.role-item:hover a:before {
  color: rgba(var(--white), 0.8);
}

.edit-btn {
  margin-left: 8px;
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(var(--white), 0.4);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity .25s, transform .25s;
}

.role-item:hover .edit-btn {
  opacity: 1;
  transform: scale(1);
}

/* 6. Кнопки панели управления (в стиле гостевой) */
.roles-actions {
  display: flex;
  gap: 15px;
  margin: 20px 0 30px 0;
}

.nc-btn {
  background: rgb(var(--acc1), 0.5);
  backdrop-filter: blur(6px);
  color: rgb(var(--white), 0.9) !important;
  font-family: var(--font4) !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 18px;
  border-radius: var(--glass-radius-sm, 8px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.nc-btn:hover {
  background: rgb(var(--acc1), 0.8);
}

.nc-btn.warn {
  background: rgba(180, 50, 50, 0.5);
}
.nc-btn.warn:hover {
  background: rgba(180, 50, 50, 0.8);
}

/* === 7. Модальные окна === */
.nc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity .25s ease;
}

.nc-modal-backdrop.visible {
  display: flex;
  opacity: 1;
}

.nc-modal {
    background: var(--bg-wrap);
    border-radius: 16px;
    padding: 20px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 0 18px rgba(0, 0, 0, .4);
    transform: translateY(10px);
    transition: transform .25s ease, opacity .25s ease;
}

.nc-modal-backdrop.visible .nc-modal {
  transform: translateY(0);
}

.nc-field {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nc-field label {
  font-family: var(--font4);
  font-size: 12px;
  color: rgb(var(--white), 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nc-field input,
.nc-field select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: var(--font4);
  outline: none;
  transition: border-color 0.3s;
}

.nc-field input:focus,
.nc-field select:focus {
  border-color: rgb(var(--acc1), 0.8);
}

.nc-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 25px;
}


#roleslist {
    width: 880px;
    background: url(https://notahub.ru/media/projects/deadline/tharoth/img/h-roles.jpg) top center no-repeat, #ffffff0d;
    margin: 20px auto;
    padding: 40px 20px;
    position: relative;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 20px;
    box-shadow: 0px 0px 25px #00000026;
    overflow: visible;
    outline: 1px solid rgb(255 255 255 / 25%);
    outline-offset: -1px;
    font: 400 10px var(--font5);
}


#roles {
    position: relative;
    top: 100px;
        padding-bottom: 100px;
}

.roles-header {
    position: absolute;
    top: 180px;
    width: 600px;
        z-index: 10;
}

#pun-pages h1 span {
    display:none!important;
    
}

#r-desc {
    position: absolute;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 30px;
    text-shadow: 1px 1px #edf7ff75;
}

button.edit-cast {
    margin-right: -10px;
}


/* Перекрашиваем выпадающий список (насколько позволяет браузер) */
.nc-field select option {
  background-color: #1e1e1e; /* Темный фон под стать модалке */
  color: #d0d0d0; /* Светлый текст */
  font-family: var(--font4); /* Ваш красивый шрифт */
  padding: 8px;
}

/* Немного подправим сам скроллбар внутри выпадающего списка (работает в Chrome/Edge) */
.nc-field select::-webkit-scrollbar {
  width: 8px;
}
.nc-field select::-webkit-scrollbar-track {
  background: #1e1e1e;
}
.nc-field select::-webkit-scrollbar-thumb {
  background: var(--color-accent1, #a79a5e);
  border-radius: 4px;
}