:root {
  /* Default color values - can be overridden by theme CSS */
  --bg: #f6f6fb;
  --card: #ffffff;
  --text: #2c3440;
  --muted: #6b7380;
  --accent: #1f7a8c;
  --accent-dark: #176070;
  --border: #e6e8ef;
  --shadow: 0 18px 40px rgba(26, 39, 72, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% 10%, #e7f1f4 0%, transparent 60%),
    radial-gradient(1000px 500px at 20% 80%, #eef1f9 0%, transparent 60%),
    var(--bg);
}

/* Custom context menu styling */
#customMenu {
  position: absolute;
  display: none;
  background-color: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(26, 39, 72, 0.12);
  padding: 8px;
  z-index: 1000;
  border-radius: 8px;
}

#customMenu button {
  font-size: 14px;
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  border-radius: 4px;
  transition: background 0.2s ease;
}

#customMenu button:hover {
  background-color: var(--bg);
}

/* Custom context menu for archive styling */
#customMenuArchive {
  position: absolute;
  display: none;
  background-color: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(26, 39, 72, 0.12);
  padding: 8px;
  z-index: 1000;
  border-radius: 8px;
}

#customMenuArchive button {
  font-size: 14px;
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  border-radius: 4px;
  transition: background 0.2s ease;
}

#customMenuArchive button:hover {
  background-color: var(--bg);
}

/* Header Styles */
.kit-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(26, 39, 72, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.kit-header__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
}

.kit-header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kit-header__nav {
  display: flex;
  align-items: center;
}

/* User Menu Dropdown */
.user-menu {
  position: relative;
}

.user-menu__button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
}

.user-menu__button:hover {
  background: #f9fbff;
  border-color: var(--accent);
}

.user-menu__button svg {
  transition: transform 0.2s ease;
}

.user-menu.active .user-menu__button svg {
  transform: rotate(180deg);
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(26, 39, 72, 0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-menu.active .user-menu__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease;
}

.user-menu__item:first-child {
  border-radius: 12px 12px 0 0;
}

.user-menu__item:last-child {
  border-radius: 0 0 12px 12px;
}

.user-menu__item:hover {
  background: #f9fbff;
}

.user-menu__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.landing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px 80px;
}

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f6f7fb 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px;
  position: relative;
}

.scroll-indicator {
  display: none;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 8px;
}

.scroll-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}

.scroll-indicator__dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.hero__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.hero-card {
  background: #f9fbff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(26, 39, 72, 0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.hero-card__inner {
  display: flex;
  gap: 24px;
  align-items: stretch;
  width: 100%;
}

.hero-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-card__image {
  width: 240px;
  min-width: 240px;
  height: 240px;
  object-fit: contain;
  border-radius: 10px;
}

.hero-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.hero-card p {
  margin: 0;
  color: var(--muted);
}

.hero-card__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join {
  display: flex;
  gap: 10px;
  align-items: center;
}

.join input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(31, 122, 140, 0.25);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #e7eef1;
  color: var(--accent-dark);
}

.hero-card__features {
  display: grid;
  gap: 10px;
}

.hero-card__features small {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e9f3f6;
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

.more {
  margin-top: 36px;
}

.more__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
  margin: 20px 0 24px;
}

.more__divider span {
  background: #fff;
  padding: 0 16px;
}

.more__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.more-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 22px rgba(26, 39, 72, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.more-card h3 {
  margin: 0;
  font-size: 16px;
}

.badges {
  display: flex;
  gap: 10px;
}

.badge {
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  background: #f5f7fb;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

/* App Layout with Sidebar */
.app-layout {
  display: flex;
  min-height: calc(100vh - 60px);
  max-width: 1400px;
  margin: 0 auto;
}

.sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.sidebar__item:hover {
  background: #f9fbff;
  color: var(--accent);
}

.sidebar__item.active {
  background: #e9f3f6;
  color: var(--accent-dark);
  font-weight: 600;
}

.sidebar__divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.sidebar__section-title {
  padding: 12px 16px 8px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.sidebar__languages {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__language-item {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.sidebar__language-item:hover {
  background: #f9fbff;
  color: var(--accent);
}

.sidebar__language-item.active {
  background: #e9f3f6;
  color: var(--accent-dark);
  font-weight: 600;
}

.sidebar__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.main-content {
  flex: 1;
  padding: 32px;
  background: var(--bg);
  overflow-y: auto;
}

.content-wrapper {
  max-width: 900px;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.session-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
}

.session-header #online_div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #dc2626;
}

.live-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #dc2626;
  border-radius: 50%;
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.live-count {
  font-size: 14px;
}

.settings-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(26, 39, 72, 0.08);
}

/* Session window styles */
.windows-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
  gap: 20px;
}

.window {
  width: 600px;
  height: 400px;
  border-radius: 16px;
  background-color: var(--card);
  box-shadow: 0 4px 20px rgba(26, 39, 72, 0.12), 0 1px 4px rgba(0, 0, 0, 0.04);
  position: relative;
  resize: both;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.window:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 39, 72, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.window-header {
  min-height: 56px;
  background: var(--card);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  border-bottom: 2px solid var(--border);
}

.window-content {
  padding: 24px;
  height: calc(100% - 56px);
  overflow-y: auto;
  background: var(--card);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

.window-content::-webkit-scrollbar {
  width: 8px;
}

.window-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
}

.window-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.window-content::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.window-content h2 {
  display: block;
  border-bottom: 2px solid var(--accent);
  padding: 8px 0 12px 0;
  width: 100%;
  margin-bottom: 16px;
  margin-top: 24px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.window-content h2:first-child {
  margin-top: 0;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: var(--bg);
  color: var(--text);
  transform: scale(1.05);
}

.close-button:active {
  transform: scale(0.95);
}

/* Audio recording panel styles */
.audio-container {
  margin-top: 20px;
  margin-bottom: 20px;
}

.audio-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(26, 39, 72, 0.08);
  overflow: hidden;
}

.audio-header {
  background: var(--accent-dark);
  color: white;
  padding: 16px 20px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.audio-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.audio-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.audio-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.audio-icon {
  width: 64px;
  height: 64px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.audio-icon:hover {
  opacity: 1;
}

.level-display {
  width: 100%;
  max-width: 300px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.level-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
  width: 0%;
  transition: width 0.1s ease;
}

.upload-warning {
  display: none;
  color: #dc2626;
  font-size: 14px;
  padding: 12px 16px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  text-align: center;
}

.upload-warning.show {
  display: block;
}

/* Audio overlay modal */
.audio-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.audio-overlay[style*="display: block"],
.audio-overlay.show {
  display: flex;
}

.audio-alert {
  background: var(--card);
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(26, 39, 72, 0.2);
  max-width: 400px;
  text-align: center;
}

.audio-alert h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.audio-alert p {
  margin: 0 0 24px 0;
  color: var(--muted);
  font-size: 16px;
}

.audio-alert-button {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.audio-alert-button:hover {
  background: var(--accent-dark);
}

/* Tablet and below */
@media (max-width: 900px) {
  .hero__cards {
    grid-template-columns: 1fr;
  }

  .hero-card__image {
    width: 200px;
    min-width: 200px;
    height: 200px;
  }

  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px 0 6px;
    position: relative;
  }

  .sidebar::before,
  .sidebar::after {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 32px;
    width: 40px;
    pointer-events: none;
    z-index: 10;
  }

  .sidebar::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent);
  }

  .sidebar::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
  }

  .sidebar__nav {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 8px;
    padding: 0 16px 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar__nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar__item {
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: center;
  }

  .sidebar__languages {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 0 4px 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar__language-item {
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: center;
  }

  .sidebar-indicator {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 4px;
  }

  .sidebar-indicator__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
  }

  .sidebar-indicator__dot.active {
    background: var(--accent);
    width: 18px;
    border-radius: 3px;
  }
}

/* Sidebar audio widget - for all screen sizes */
.sidebar-audio-widget {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-audio-header {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.sidebar-audio-content {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sidebar-audio-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.sidebar-audio-icon {
  width: 40px;
  height: 40px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.sidebar-audio-icon:hover {
  opacity: 1;
}

.sidebar-audio-icon-large {
  width: 28px;
  height: 28px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.sidebar-audio-icon-large:hover {
  opacity: 1;
}

.sidebar-audio-level {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.sidebar-level-text {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.sidebar-level-display {
  width: 80%;
  height: 32px;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #ddd;
  display: block;
}

.sidebar-level-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
  width: 0%;
  transition: width 0.1s ease;
  display: block;
}

.sidebar-upload-warning {
  display: none !important;
  color: #dc2626;
  font-size: 12px;
  padding: 8px 12px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  text-align: center;
  width: 100%;
}

.sidebar-upload-warning.show {
  display: block !important;
}

/* Tablet and below */
@media (max-width: 900px) {
  .hero__cards {
    grid-template-columns: 1fr;
  }

  .hero-card__image {
    width: 200px;
    min-width: 200px;
    height: 200px;
  }

  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px 0 6px;
    position: relative;
  }

  .sidebar::before,
  .sidebar::after {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 32px;
    width: 40px;
    pointer-events: none;
    z-index: 10;
  }

  .sidebar::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent);
  }

  .sidebar::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
  }

  .sidebar__nav {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 8px;
    padding: 0 16px 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar__nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar__item {
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: center;
  }

  .sidebar-indicator {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 4px;
  }

  .sidebar-indicator__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
  }

  .sidebar-indicator__dot.active {
    background: var(--accent);
    width: 18px;
    border-radius: 3px;
  }

  .main-content {
    padding: 24px 16px;
  }

  .sidebar-upload-warning {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    text-align: center;
    width: 100%;
  }

  .sidebar-upload-warning.show {
    display: block !important;
  }

  .sidebar-upload-warning {
    display: none;
    color: #dc2626;
    font-size: 12px;
    padding: 8px 12px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    text-align: center;
    width: 100%;
  }

  .sidebar-upload-warning.show {
    display: block;
  }

  .main-content {
    padding: 24px 16px;
  }

  .settings-panel {
    padding: 24px;
  }
}

/* Archive page */
.archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.archive-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  border-bottom: none;
  padding-bottom: 0;
}

.archive-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.archive-search__input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  min-width: 240px;
  font-size: 14px;
}

.archive-actions-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.archive-actions-toolbar__button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.archive-actions-toolbar__button:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(31, 122, 140, 0.2);
}

.archive-actions-toolbar__button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%);
}

.archive-actions-toolbar__button:hover img {
  filter: brightness(100%) saturate(100%);
}

.archive-actions-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.archive-actions-container__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.archive-actions-container__header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.archive-actions-container__close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.archive-actions-container__close:hover {
  background: var(--border);
  color: var(--text);
}

/* Archive Configure Styles */
.archive-configure-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.configure-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.configure-section__title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.configure-section__button {
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.configure-section__button:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(31, 122, 140, 0.2);
}

/* Access Rights Styles */
.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.access-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.access-card__title {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.access-card__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.access-search__input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.access-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.access-list__label {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.access-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.access-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.access-list__item:last-child {
  border-bottom: none;
}

.access-list__remove-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 6px;
  transition: color 0.2s ease;
}

.access-list__remove-btn:hover {
  color: #d32f2f;
}

.access-add {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.access-add__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.access-add__input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.access-suggestions {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  max-height: 150px;
  overflow-y: auto;
  display: none;
}

.access-suggestions:not(:empty) {
  display: block;
}

.access-suggestions__item {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.access-suggestions__item:last-child {
  border-bottom: none;
}

.access-suggestions__item:hover {
  background: var(--bg);
}

.access-add__button {
  padding: 8px 12px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.access-add__button:hover {
  background: var(--accent-dark);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.archive-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.archive-card:hover {
  box-shadow: 0 8px 16px rgba(26, 39, 72, 0.12);
  transform: translateY(-2px);
}

.archive-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 16px 0;
}

.archive-card__title {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  flex: 1;
  word-break: break-word;
}

.archive-card__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.archive-card__icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.archive-card__thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border: none;
}

.archive-card__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  width: 100%;
  height: 160px;
  background: var(--bg);
}

.archive-card__link:hover {
  background: #f0f0f0;
}

.archive-card__action {
  background: var(--bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  flex-direction: column;
  padding: 20px 16px;
  width: 100%;
  height: 160px;
}

.archive-card__action:hover {
  background: #f0f0f0;
}

.archive-card__meta {
  font-size: 12px;
  color: var(--muted);
  padding: 0 16px;
  word-break: break-word;
}

.archive-card__meta:last-child {
  padding-bottom: 16px;
}

.archive-actions {
  position: relative;
}

.archive-actions__toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
}

.archive-actions__menu {
  position: absolute;
  right: 0;
  top: 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(26, 39, 72, 0.12);
  display: none;
  flex-direction: column;
  min-width: 160px;
  z-index: 20;
}

.archive-actions__menu.active {
  display: flex;
}

.archive-actions__menu button {
  background: none;
  border: none;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.archive-actions__menu button:hover {
  background: var(--surface);
}

@media (max-width: 720px) {
  .archive-header {
    align-items: flex-start;
  }

  .archive-search__input {
    width: 100%;
  }

  .archive-actions-toolbar__button {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .archive-actions-toolbar__button span {
    display: none;
  }

  .archive-actions-toolbar__button img {
    width: 20px;
    height: 20px;
  }

  .archive-actions-container {
    padding: 16px;
  }

  .archive-actions-container__header {
    padding-bottom: 12px;
  }

  .archive-actions-container__header h3 {
    font-size: 14px;
  }

  .archive-card__thumb {
    height: 140px;
  }

  .archive-card__link {
    height: 140px;
  }

  .archive-card__action {
    height: 140px;
    padding: 16px;
  }

  .configure-section {
    padding: 16px;
  }

  .configure-section__title {
    font-size: 14px;
  }

  .form-row {
    flex-direction: column;
  }

  .form-column {
    width: 100% !important;
    margin-bottom: 12px;
  }
}

/* Mobile phones */
@media (max-width: 720px) {
  body {
    background: var(--bg);
  }

  .kit-header__container {
    padding: 12px 16px;
  }

  .kit-header__content {
    gap: 12px;
  }

  .user-menu__button {
    padding: 6px 10px;
    font-size: 13px;
    gap: 6px;
  }

  .user-menu__button span {
    display: none;
  }

  .landing {
    padding: 16px 12px 40px;
  }

  .hero {
    padding: 20px 0;
    border-radius: 16px;
    position: relative;
  }

  .hero::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20px;
    bottom: 60px;
    width: 40px;
    background: linear-gradient(to left, rgba(246, 246, 251, 0.8), transparent);
    pointer-events: none;
    z-index: 1;
  }

  .hero__cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 12px;
  }

  .hero__cards::-webkit-scrollbar {
    display: none;
  }

  .hero-card {
    flex: 0 0 calc(100% - 24px);
    scroll-snap-align: center;
    margin: 0 12px;
    padding: 20px;
    border-radius: 14px;
  }

  .scroll-indicator {
    display: flex;
  }

  .hero-card__inner {
    flex-direction: column;
    gap: 16px;
  }

  .hero-card__content {
    gap: 14px;
  }

  .hero-card h2 {
    font-size: 20px;
  }

  .hero-card p {
    font-size: 14px;
  }

  .hero-card__image {
    width: 100%;
    min-width: unset;
    height: 180px;
    order: -1;
  }

  .hero-card__actions {
    gap: 10px;
  }

  .btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
  }

  .join {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .join input {
    padding: 12px;
    font-size: 15px;
  }

  .hero-card__features {
    gap: 12px;
  }

  .pill {
    font-size: 11px;
    padding: 5px 10px;
  }

  .more {
    position: relative;
  }

  .more::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 60px;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to left, rgba(246, 246, 251, 0.8), transparent);
    pointer-events: none;
    z-index: 1;
  }

  .more__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 12px 8px;
  }

  .more__grid::-webkit-scrollbar {
    display: none;
  }

  .more-card {
    flex: 0 0 calc(85% - 8px);
    scroll-snap-align: start;
    min-height: 200px;
  }

  .user-menu__dropdown {
    right: 0;
    left: auto;
    min-width: 180px;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .kit-header__container {
    padding: 10px 12px;
  }

  .landing {
    padding: 12px 8px 32px;
  }

  .hero {
    padding: 16px 12px;
  }

  .hero-card {
    padding: 16px;
  }

  .hero-card h2 {
    font-size: 18px;
  }

  .hero-card p {
    font-size: 13px;
  }

  .btn {
    font-size: 14px;
    padding: 11px 14px;
  }

  .main-content {
    padding: 16px 12px;
  }

  .settings-panel {
    padding: 20px 16px;
  }

  .sidebar__item {
    font-size: 14px;
    padding: 10px 12px;
  }

  .sidebar__icon {
    width: 20px;
    height: 20px;
  }
}

/* Archive Session Layout */
.archive-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

/* Archive Configure Panels */
.archive-configure-panels {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.archive-configure-panels .settings-panel {
  padding-top: 20px;
}

.archive-media {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.archive-media video,
.archive-media audio {
  width: 100%;
  border-radius: 8px;
  background: #000;
}

 .archive-layout .resizable-video {
  display: flex;
  justify-content: center;
  width: 100%;
}

.archive-layout .resizable-video video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.
.archive-layout .windows-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}
@media (max-width: 767px) {
  .archive-layout {
    gap: 16px;
    margin-top: 16px;
  }
  
  .archive-media {
    padding: 12px;
  }

  .archive-layout .windows-container {
    flex-direction: column;
    gap: 12px;
  }
}
