:root {
  --bg-primary: #101626;
  --bg-secondary: #131f35;
  --grid-gap: 1rem;
  --card-bg: rgba(23, 32, 51, 0.88);
  --accent: #3dd6c7;
  --accent-strong: #23b8ab;
  --text-main: #e8efff;
  --text-muted: #aab9dd;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', 'Segoe UI', Tahoma, sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #1c2f52, var(--bg-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

body.spotlight-mode,
html.spotlight-mode {
  display: block;
  align-items: initial;
  justify-content: initial;
  padding: 0;
  background: #000;
}

body.update-available::before {
  content: '';
  position: fixed;
  inset: 0;
  border: 6px solid #ff7a93;
  box-shadow: inset 0 0 30px rgba(255, 122, 147, 0.4);
  pointer-events: none;
  z-index: 90;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
  width: min(1200px, 100%);
  align-items: start;
}

.layout.spotlight-immersive {
  grid-template-columns: 1fr;
}

main {
  width: 100%;
  max-width: none;
}

main.spotlight-immersive {
  width: 100%;
  max-width: none;
  height: 100vh;
  padding: 0;
  margin: 0;
  display: block;
}

.card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card.spotlight-immersive {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 100%;
  height: 100%;
}

.room-body {
  display: block;
  height: 100%;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  background: rgba(12, 19, 33, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  height: calc(100vh - 4rem);
  max-height: calc(100vh - 4rem);
  min-height: 0;
  overflow: hidden;
}

.chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.chat-panel__header h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.chat-panel__sound-toggle {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 14, 26, 0.9);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.chat-panel__sound-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.chat-panel__sound-toggle[data-enabled='false'] {
  background: rgba(92, 22, 36, 0.85);
  border-color: rgba(255, 122, 147, 0.35);
  color: #ffe1ea;
}

.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  min-height: 0;
}
.chat-panel__messages:empty::before {
  content: 'Сообщений пока нет';
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
}

.chat-panel__messages::-webkit-scrollbar {
  width: 6px;
}

.chat-panel__messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.chat-message {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.chat-message__time {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.chat-message__author {
  font-weight: 600;
}

.chat-message__content {
  flex: 1;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-message--system {
  color: rgba(255, 237, 243, 0.85);
  font-style: italic;
}

.chat-panel__form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chat-panel__form textarea {
  resize: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(9, 14, 24, 0.65);
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: border-color 0.2s ease;
}

.chat-panel__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61, 214, 199, 0.25);
}

.chat-panel__form button {
  margin-top: 0;
  font-size: 0.9rem;
}

.chat-panel__controls button[type="submit"] {
  align-self: center;
  padding: 0.65rem 1.6rem;
  margin-left: auto;
}

.chat-panel__attach {
  align-self: center;
}

.chat-panel__controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.chat-panel__attach {
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(9, 15, 26, 0.85);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.chat-panel__attach:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.chat-panel__record {
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 122, 147, 0.35);
  background: rgba(92, 22, 36, 0.85);
  color: #ffe1ea;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.chat-panel__record:hover {
  border-color: rgba(255, 180, 195, 0.6);
  transform: translateY(-1px);
}

.chat-panel__record[data-recording='true'] {
  background: rgba(175, 39, 62, 0.92);
  border-color: rgba(255, 148, 170, 0.65);
  color: #fff4f6;
  box-shadow: 0 12px 26px rgba(175, 39, 62, 0.4);
}

.chat-panel__attachment {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 24, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 0.45rem 0.75rem 0.45rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.chat-panel__attachment-remove {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}

.chat-panel__attachment-remove:hover {
  color: #fff;
}

.chat-panel__attachment-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.chat-panel__attachment-body > span {
  white-space: nowrap;
}

.chat-panel__attachment-audio {
  width: 220px;
  max-width: 100%;
  background: rgba(8, 16, 31, 0.65);
  border-radius: 12px;
}

.chat-message__image {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 0.4rem;
  cursor: pointer;
}

.chat-message__video {
  width: 180px;
  height: 120px;
  max-width: 100%;
  border-radius: 12px;
  margin-top: 0.4rem;
  cursor: pointer;
  background: #000;
  object-fit: cover;
}

.chat-message--with-media {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.chat-message__audio-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.chat-message__audio-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 24, 40, 0.85);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.chat-message__audio-preview::before {
  content: '▶';
  font-size: 0.85rem;
}

.chat-message__audio-preview:hover {
  border-color: var(--accent);
}

.chat-message__audio-player {
  width: 240px;
  max-width: 100%;
  margin-top: 0.2rem;
}

.chat-message__content {
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-panel__form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chat-panel__form textarea {
  resize: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(9, 14, 24, 0.65);
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: border-color 0.2s ease;
}

.chat-panel__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61, 214, 199, 0.25);
}

.chat-panel__form button {
  margin-top: 0;
  padding: 0.65rem 1.6rem;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    margin-top: 1rem;
    height: auto;
    max-height: none;
    overflow: visible;
  }
}

h1,
h2,
h3 {
  font-weight: 700;
  margin: 0 0 1rem 0;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 18, 32, 0.8);
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 214, 199, 0.25);
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.4rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #05131e;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 1.3rem;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(61, 214, 199, 0.35);
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
  box-shadow: none;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.intro p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.form-group {
  width: 100%;
  margin-top: 1.5rem;
}

.error {
  margin-top: 0.75rem;
  color: #ff7a93;
  font-weight: 600;
}

.video-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--grid-gap);
  width: 100%;
}

.video-card {
  position: relative;
  background: rgba(8, 15, 27, 0.8);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-avatar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 0;
  transform: scale(0.9);
}

.video-avatar::before {
  content: '';
  position: absolute;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background:
    linear-gradient(150deg, rgba(255, 122, 147, 0.4), rgba(61, 214, 199, 0.25)),
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.55), rgba(23, 36, 62, 0.7));
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
}

.video-avatar::after {
  content: '';
  position: absolute;
  width: 92px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 122, 147, 0.92);
  box-shadow: 0 0 24px rgba(255, 122, 147, 0.45);
  transform: rotate(-45deg);
}

.video-avatar > span {
  position: relative;
  width: 46px;
  height: 34px;
  border-radius: 10px;
  background: rgba(12, 19, 33, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.video-avatar > span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 46%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: radial-gradient(circle, rgba(61, 214, 199, 0.55), rgba(9, 15, 27, 0.9));
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.45);
}

.video-avatar > span::after {
  content: '';
  position: absolute;
  top: -6px;
  right: -14px;
  width: 16px;
  height: 18px;
  border-radius: 6px;
  background: rgba(12, 19, 33, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.video-card.no-camera {
  background: rgba(8, 15, 27, 0.92);
}

.video-card.no-camera video {
  opacity: 0;
  filter: saturate(0.35) brightness(0.45);
}

.video-card.no-camera .video-avatar {
  opacity: 1;
  transform: scale(1);
}

.video-card.no-camera::after {
  content: attr(data-status);
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  background: rgba(12, 19, 33, 0.78);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fdfdff;
  text-transform: uppercase;
  text-align: center;
}

.mic-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(18, 32, 44, 0.75);
  color: var(--text-main);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.mic-indicator::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #3dd6c7;
  box-shadow: 0 0 0 2px rgba(61, 214, 199, 0.3);
}

.mic-indicator[data-state='muted'] {
  background: rgba(92, 22, 36, 0.85);
  color: #ffe1ea;
  box-shadow: 0 12px 24px rgba(92, 22, 36, 0.45);
}

.mic-indicator[data-state='muted']::before {
  background: #ff7a93;
  box-shadow: 0 0 0 2px rgba(255, 122, 147, 0.3);
}

.mic-indicator[data-state='absent'] {
  background: rgba(64, 78, 102, 0.82);
  color: rgba(231, 236, 255, 0.88);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.mic-indicator[data-state='absent']::before {
  background: rgba(231, 236, 255, 0.78);
  box-shadow: 0 0 0 2px rgba(231, 236, 255, 0.32);
}

.video-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pill strong {
  color: var(--text-main);
}

.tooltip {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 24, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  backdrop-filter: blur(6px);
}

.modal.hidden {
  display: none;
}

.modal .card {
  width: min(420px, 100%);
}

.notification {
  margin-top: 0.5rem;
  color: #9dd7ff;
  font-size: 0.9rem;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.control-button {
  padding: 0.6rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 16, 31, 0.8);
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s ease, border-color 0.2s;
}

.control-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.control-button[data-active="false"] {
  background: rgba(111, 29, 50, 0.8);
  border-color: rgba(255, 122, 147, 0.35);
  color: #ffe1ea;
}

.control-button[data-mode="screen"][data-active="true"] {
  background: rgba(29, 111, 59, 0.85);
  border-color: rgba(61, 214, 199, 0.45);
  color: #e4fff6;
}

.control-button[data-active="false"]:hover {
  border-color: rgba(255, 180, 195, 0.6);
}

.copy-link {
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 26, 0.9);
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
}

.copy-link:hover {
  border-color: var(--accent);
}

.video-card.muted::after {
  content: attr(data-status);
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 21, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.video-card.sharing {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(61, 214, 199, 0.3);
  border-color: rgba(61, 214, 199, 0.5);
}

.video-layout.spotlight-active {
  grid-template-columns: 1fr;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  padding: 0;
  margin: 0;
  overflow: hidden;
  align-items: center;
  justify-items: center;
}

.video-card.spotlight-primary {
  grid-column: 1 / -1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-width: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  z-index: 60;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card.spotlight-suppressed {
  display: none !important;
}

.video-card.spotlight-primary video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.header.spotlight-hidden,
.control-group.spotlight-hidden,
.copy-link.spotlight-hidden,
.tooltip.spotlight-hidden,
.card.spotlight-hidden,
main.spotlight-hidden,
.chat-panel.spotlight-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  body {
    padding: 1.5rem 1rem;
  }

  .card {
    padding: 1.8rem;
  }

  button {
    width: 100%;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .control-group {
    width: 100%;
  }

  .room-body {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .chat-panel {
    order: 2;
    width: 100%;
    margin-top: 0.5rem;
  }

  .video-layout {
    order: 1;
  }
}
.spotlight-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.spotlight-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

body.spotlight-mode,
html.spotlight-mode {
  overflow: hidden;
  margin: 0;
}

.update-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 21, 0.85);
  backdrop-filter: blur(6px);
  padding: 2rem 1.5rem;
}

.update-modal.hidden {
  display: none;
}

.update-modal__panel {
  background: rgba(4, 10, 21, 0.95);
  border: 1px solid rgba(255, 122, 147, 0.5);
  border-radius: 16px;
  max-width: 420px;
  width: min(420px, 100%);
  padding: 2rem;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.update-modal__title {
  margin: 0 0 0.75rem 0;
  font-size: 1.4rem;
  color: #ffe6ec;
}

.update-modal__body {
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
  color: rgba(255, 237, 243, 0.85);
}

.update-modal__actions {
  display: flex;
  justify-content: flex-end;
}

.update-modal__action {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ff7a93, #ff4d73);
  color: #0b1019;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.update-modal__action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 77, 115, 0.35);
}

.update-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: rgba(255, 237, 243, 0.8);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.update-modal__close:hover {
  color: #ffffff;
}
.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-viewer.hidden {
  display: none;
}

.media-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(4px);
}

.media-viewer__panel {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 960px);
  max-height: min(90vh, 720px);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.media-viewer__body {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-viewer__body img,
.media-viewer__body video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  background: #000;
}

.media-viewer__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
}

.media-viewer__close:hover {
  background: rgba(0, 0, 0, 0.8);
}

body.media-viewer-open {
  overflow: hidden;
}

html.media-viewer-open {
  overflow: hidden;
}

body.rename-modal-open,
html.rename-modal-open {
  overflow: hidden;
}

.rename-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 21, 0.8);
  backdrop-filter: blur(4px);
  padding: 2rem 1.5rem;
}

.rename-modal.hidden {
  display: none;
}

.rename-modal__panel {
  background: rgba(4, 10, 21, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  max-width: 360px;
  width: min(360px, 100%);
  padding: 1.75rem;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.rename-modal__title {
  margin: 0 0 1rem 0;
  font-size: 1.35rem;
}

.rename-modal__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rename-modal__form input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(9, 14, 24, 0.75);
  color: var(--text-main);
  font-size: 1rem;
}

.rename-modal__form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61, 214, 199, 0.25);
}

.rename-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.rename-modal__cancel,
.rename-modal__confirm {
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.rename-modal__cancel {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-main);
}

.rename-modal__cancel:hover {
  border-color: var(--accent);
}

.rename-modal__confirm {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #05131e;
}

.rename-modal__confirm:hover {
  box-shadow: 0 12px 24px rgba(61, 214, 199, 0.35);
}
