
/* =========================================================
   TALKATIVE — THEME SYSTEM
   File: styles-2.css
   Version: 1.0

   Includes:
   - Theme popup
   - Theme selection cards
   - ELITE locked themes
   - Theme preview carousel
   - Four interface previews
   - Responsive layouts

   IMPORTANT:
   Preview themes never modify the actual website.
========================================================= */


/* =========================================================
   01. THEME PALETTES
========================================================= */

:root {
  --theme-lavender-bg: #f7f5ff;
  --theme-lavender-surface: #ffffff;
  --theme-lavender-primary: #9275e8;
  --theme-lavender-text: #29243b;

  --theme-verdant-bg: #101a16;
  --theme-verdant-surface: #192720;
  --theme-verdant-primary: #39c98a;
  --theme-verdant-text: #e9f5ee;

  --theme-classic-bg: #f5f5f5;
  --theme-classic-surface: #ffffff;
  --theme-classic-primary: #555b68;
  --theme-classic-text: #252525;

  --theme-ocean-bg: #101b2d;
  --theme-ocean-surface: #192943;
  --theme-ocean-primary: #3999ed;
  --theme-ocean-text: #edf5ff;
}


/* =========================================================
   02. THEME POPUP OVERLAY
========================================================= */

.theme-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 16, 35, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}

.theme-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


/* =========================================================
   03. MAIN THEME WINDOW
========================================================= */

.theme-window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1080px, 100%);
  max-height: min(850px, 92dvh);
  overflow: hidden;
  border: 1px solid var(--glass);
  border-radius: 26px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 25px 90px rgba(20, 15, 45, 0.24);
  transform: translateY(22px) scale(0.97);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
}

.theme-overlay.active .theme-window {
  transform: translateY(0) scale(1);
}

.theme-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.theme-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
}

.theme-heading p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.theme-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.theme-close:hover {
  background: var(--border);
  transform: rotate(90deg);
}


/* =========================================================
   04. THEME WINDOW CONTENT
========================================================= */

.theme-content {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  flex: 1;
}

.theme-sidebar {
  padding: 22px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.theme-section-title {
  margin: 0 0 13px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.theme-card-list {
  display: grid;
  gap: 10px;
}

.theme-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.theme-card:hover:not(.locked) {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--surface));
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(70, 50, 120, 0.07);
}

.theme-card.selected {
  border: 2px solid var(--primary);
  background: var(--surface-soft);
  box-shadow: 0 4px 16px var(--tint);
}

.theme-card.locked {
  opacity: 0.72;
  cursor: not-allowed;
}

.theme-card-info {
  min-width: 0;
  flex: 1;
}

.theme-card-info strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.theme-card-info span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
}

.theme-card-check {
  color: var(--primary);
  font-size: 17px;
  font-weight: 900;
}


/* =========================================================
   05. THEME COLOUR SWATCHES
========================================================= */

.theme-swatch {
  display: flex;
  width: 43px;
  height: 43px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 12px;
}

.theme-swatch span {
  flex: 1;
}





.theme-swatch.elite span:nth-child(1) {
  background: #252238;
}
.theme-swatch.elite span:nth-child(2) {
  background: #a88aff;
}
.theme-swatch.elite span:nth-child(3) {
  background: #11111b;
}


/* =========================================================
   06. ELITE LOCKED INDICATOR
========================================================= */

.theme-elite-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

.theme-lock {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: #f1edf7;
  color: #948ba5;
  font-size: 13px;
}


/* =========================================================
   07. CLASSIC APPEARANCE SELECTOR
========================================================= */

.theme-appearance-switch {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  padding: 5px;
  border-radius: 12px;
  background: var(--border);
}

.theme-appearance-switch button {
  flex: 1;
  padding: 9px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.theme-appearance-switch button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 7px rgba(30,20,50,0.08);
}


/* =========================================================
   08. PREVIEW AREA
========================================================= */

.theme-preview-area {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
}

.theme-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.theme-preview-top strong {
  font-size: 14px;
  font-weight: 800;
}

.theme-preview-top span {
  color: var(--text-soft);
  font-size: 11px;
}

.theme-carousel {
  position: relative;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--surface-soft);
}

.theme-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}

.theme-slide {
  min-width: 100%;
  height: 100%;
  padding: 15px;
  overflow-y: auto;
}

.theme-slide-inner {
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 5px 20px rgba(35,25,60,0.06);
}

.theme-slide-label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}


/* =========================================================
   09. PREVIEW NAVIGATION
========================================================= */

.theme-preview-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
}

.theme-preview-arrow {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.theme-preview-arrow:hover {
  background: var(--surface-soft);
  transform: scale(1.06);
}

.theme-preview-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.theme-preview-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--border);
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}

.theme-preview-dot.active {
  width: 20px;
  background: var(--primary);
}


/* =========================================================
   10. PREVIEW — MAIN CHAT
========================================================= */

.preview-chat {
  padding: 15px;
}

.preview-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--preview-border, var(--border));
}

.preview-chat-header strong {
  font-size: 14px;
}

.preview-chat-header span {
  color: var(--preview-muted, var(--text-soft));
  font-size: 10px;
}

.preview-chat-messages {
  display: grid;
  gap: 12px;
  padding: 18px 0;
}

.preview-message {
  width: fit-content;
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 14px;
  background: var(--preview-message, var(--surface-soft));
  color: var(--preview-text, var(--text));
  font-size: 11px;
  line-height: 1.5;
}

.preview-message.own {
  margin-left: auto;
  background: var(--preview-primary, var(--primary));
  color: var(--on-primary);
}

.preview-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--preview-border, var(--border));
  border-radius: 12px;
  color: var(--preview-muted, var(--text-soft));
  font-size: 10px;
}


/* =========================================================
   11. PREVIEW — HOT STUFF
========================================================= */

.preview-hotstuff {
  padding: 15px;
}

.preview-hotstuff-banner {
  padding: 17px;
  border-radius: 13px;
  background: var(--preview-primary, #9275e8);
  color: #ffffff;
}

.preview-hotstuff-banner strong {
  display: block;
  font-size: 15px;
}

.preview-hotstuff-banner span {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  opacity: 0.85;
}

.preview-hotstuff-post {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid var(--preview-border, #eeeaf5);
  border-radius: 13px;
}

.preview-hotstuff-post strong {
  font-size: 12px;
}

.preview-hotstuff-post p {
  color: var(--preview-muted, #9992a5);
  font-size: 10px;
  line-height: 1.6;
}


/* =========================================================
   12. PREVIEW — DIRECT MESSAGES
========================================================= */

.preview-dm {
  display: grid;
  grid-template-columns: 38% minmax(0, 1fr);
  min-height: 350px;
}

.preview-dm-inbox {
  padding: 13px;
  border-right: 1px solid var(--preview-border, #eeeaf5);
}

.preview-dm-inbox strong {
  font-size: 12px;
}

.preview-dm-person {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  font-size: 10px;
}

.preview-dm-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--preview-avatar, #e9e1ff);
  color: var(--preview-primary, #9275e8);
  font-size: 10px;
  font-weight: 800;
}

.preview-dm-chat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 13px;
}

.preview-dm-bubbles {
  display: grid;
  align-content: center;
  gap: 12px;
  flex: 1;
}

.preview-dm-bubble {
  width: fit-content;
  max-width: 85%;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--preview-message, #f1eef9);
  font-size: 10px;
}

.preview-dm-bubble.own {
  margin-left: auto;
  background: var(--preview-primary, #9275e8);
  color: #ffffff;
}


/* =========================================================
   13. PREVIEW — PROFILE AND SETTINGS
========================================================= */

.preview-profile {
  padding: 15px;
}

.preview-profile-banner {
  height: 90px;
  border-radius: 13px;
  background:
    linear-gradient(120deg,
      var(--preview-primary, #9275e8),
      var(--preview-secondary, #c4b3f6));
}

.preview-profile-info {
  position: relative;
  padding: 0 13px 14px;
}

.preview-profile-avatar {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  margin-top: -27px;
  border: 4px solid var(--preview-surface, #ffffff);
  border-radius: 50%;
  background: var(--preview-avatar, #e9e1ff);
  color: var(--preview-primary, #9275e8);
  font-weight: 900;
}

.preview-profile-info strong {
  display: block;
  margin-top: 7px;
  font-size: 12px;
}

.preview-profile-info span {
  color: var(--preview-muted, #9992a5);
  font-size: 10px;
}

.preview-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid var(--preview-border, #eeeaf5);
  border-radius: 10px;
  font-size: 10px;
}


/* =========================================================
   14. THEME PREVIEW COLOUR APPLICATION
========================================================= */

/* =========================================================
   15. ELITE PREVIEW PALETTES
========================================================= */

.theme-preview[data-preview-theme="midnight"] {
  --preview-bg: #10101b;
  --preview-surface: #1c1b2d;
  --preview-primary: #a88aff;
  --preview-secondary: #504079;
  --preview-text: #f0edff;
  --preview-muted: #a7a0c1;
  --preview-border: #39354e;
  --preview-message: #29263d;
  --preview-avatar: #453c68;
}

.theme-preview[data-preview-theme="sunset"] {
  --preview-bg: #25151a;
  --preview-surface: #382128;
  --preview-primary: #ff936f;
  --preview-secondary: #b64c66;
  --preview-text: #fff0e9;
  --preview-muted: #d0a6a0;
  --preview-border: #57343d;
  --preview-message: #4a2c35;
  --preview-avatar: #693a48;
}

.theme-preview[data-preview-theme="aurora"] {
  --preview-bg: #101c27;
  --preview-surface: #192c36;
  --preview-primary: #63d6c2;
  --preview-secondary: #477eac;
  --preview-text: #e8fffb;
  --preview-muted: #9cc5c1;
  --preview-border: #31505a;
  --preview-message: #25434a;
  --preview-avatar: #28635f;
}

.theme-preview[data-preview-theme="royal"] {
  --preview-bg: #191326;
  --preview-surface: #282039;
  --preview-primary: #c39aff;
  --preview-secondary: #7953bd;
  --preview-text: #f5edff;
  --preview-muted: #b5a4ca;
  --preview-border: #443654;
  --preview-message: #372a49;
  --preview-avatar: #51406e;
}

.theme-preview[data-preview-theme="obsidian"] {
  --preview-bg: #101010;
  --preview-surface: #1c1c1c;
  --preview-primary: #d5d5d5;
  --preview-secondary: #777777;
  --preview-text: #f5f5f5;
  --preview-muted: #a0a0a0;
  --preview-border: #393939;
  --preview-message: #292929;
  --preview-avatar: #444444;
}

.theme-preview[data-preview-theme="pearl"] {
  --preview-bg: #f4f2ed;
  --preview-surface: #fffefa;
  --preview-primary: #b69b78;
  --preview-secondary: #e1d0b8;
  --preview-text: #38332c;
  --preview-muted: #958b7e;
  --preview-border: #e9e1d5;
  --preview-message: #f1ece3;
  --preview-avatar: #e8ddcd;
}


/* =========================================================
   16. PREVIEW THEME SURFACES
========================================================= */

.theme-preview {
  min-height: 100%;
  padding: 10px;
  background: var(--preview-bg);
  color: var(--preview-text);
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

.theme-preview .theme-slide-inner {
  background: var(--preview-surface);
  color: var(--preview-text);
  border-color: var(--preview-border);
}

.theme-preview .preview-message,
.theme-preview .preview-dm-bubble {
  background: var(--preview-message);
  color: var(--preview-text);
}

.theme-preview .preview-message.own,
.theme-preview .preview-dm-bubble.own {
  background: var(--preview-primary);
  color: #ffffff;
}

.theme-preview .preview-chat-header,
.theme-preview .preview-dm-inbox {
  border-color: var(--preview-border);
}

.theme-preview .preview-chat-header span,
.theme-preview .preview-hotstuff-post p,
.theme-preview .preview-profile-info span {
  color: var(--preview-muted);
}


/* =========================================================
   17. THEME FOOTER AND ACTIONS
========================================================= */

.theme-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.theme-footer-note {
  color: var(--text-soft);
  font-size: 11px;
}

.theme-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.theme-button {
  min-height: 41px;
  padding: 0 19px;
  border: 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}

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

.theme-button.cancel {
  background: var(--surface-soft);
  color: var(--text-soft);
}

.theme-button.apply {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 5px 15px color-mix(in srgb, var(--primary) 20%, transparent);
}

.theme-button.apply:hover {
  background: var(--primary-dark);
  box-shadow: 0 7px 20px color-mix(in srgb, var(--primary) 30%, transparent);
}

.theme-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}


/* =========================================================
   18. THEME POPUP SCROLLBARS
========================================================= */

.theme-sidebar,
.theme-slide {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.theme-sidebar::-webkit-scrollbar,
.theme-slide::-webkit-scrollbar {
  width: 5px;
}

.theme-sidebar::-webkit-scrollbar-thumb,
.theme-slide::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: var(--border);
}


/* =========================================================
   19. TABLET RESPONSIVENESS
========================================================= */

@media (max-width: 900px) {
  .theme-window {
    width: min(760px, 100%);
  }

  .theme-content {
    grid-template-columns: 245px minmax(0, 1fr);
  }

  .theme-sidebar {
    padding: 17px;
  }

  .theme-preview-area {
    padding: 17px;
  }
}


/* =========================================================
   20. MOBILE RESPONSIVENESS
========================================================= */

@media (max-width: 650px) {
  .theme-overlay {
    padding: 12px;
  }

  .theme-window {
    width: 100%;
    max-height: 94dvh;
    border-radius: 20px;
  }

  .theme-header {
    padding: 16px;
  }

  .theme-heading h2 {
    font-size: 18px;
  }

  .theme-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .theme-sidebar {
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow: visible;
  }

  .theme-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-card {
    min-height: 60px;
    gap: 8px;
    padding: 8px;
  }

  .theme-swatch {
    width: 34px;
    height: 34px;
  }

  .theme-card-info strong {
    font-size: 11px;
  }

  .theme-card-info span {
    font-size: 9px;
  }

  .theme-preview-area {
    min-height: 390px;
    padding: 14px;
    overflow: visible;
  }

  .theme-carousel {
    min-height: 300px;
  }

  .theme-footer {
    padding: 13px;
  }

  .theme-footer-note {
    display: none;
  }

  .theme-actions {
    width: 100%;
  }

  .theme-button {
    flex: 1;
  }
}


/* =========================================================
   21. SMALL MOBILE DEVICES
========================================================= */

@media (max-width: 380px) {
  .theme-card-list {
    grid-template-columns: 1fr;
  }

  .theme-header {
    padding: 13px;
  }

  .theme-preview-area {
    padding: 10px;
  }

  .theme-slide {
    padding: 9px;
  }

  .preview-dm {
    grid-template-columns: 34% minmax(0, 1fr);
  }
}


/* =========================================================
   22. ACCESSIBILITY AND MOTION
========================================================= */

.theme-card:focus-visible,
.theme-button:focus-visible,
.theme-close:focus-visible,
.theme-preview-arrow:focus-visible,
.theme-preview-dot:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .theme-overlay,
  .theme-window,
  .theme-card,
  .theme-carousel-track,
  .theme-preview-dot,
  .theme-button,
  .theme-close {
    transition: none !important;
  }
}


/* =========================================================
   FREE THEMES — swatches and preview palettes
========================================================= */

.theme-swatch.emerald span:nth-child(1) { background: #070b09; }
.theme-swatch.emerald span:nth-child(2) { background: #22c77e; }
.theme-swatch.emerald span:nth-child(3) { background: #0f1612; }
.theme-swatch.crimson span:nth-child(1) { background: #fbf6f5; }
.theme-swatch.crimson span:nth-child(2) { background: #9b1c2e; }
.theme-swatch.crimson span:nth-child(3) { background: #ffffff; }
.theme-swatch.lavender span:nth-child(1) { background: #f7f5ff; }
.theme-swatch.lavender span:nth-child(2) { background: #8b72df; }
.theme-swatch.lavender span:nth-child(3) { background: #ffffff; }
.theme-swatch.ocean span:nth-child(1) { background: #f1f8ff; }
.theme-swatch.ocean span:nth-child(2) { background: #69a9e8; }
.theme-swatch.ocean span:nth-child(3) { background: #ffffff; }

.theme-preview[data-preview-theme="emerald"] {
  --preview-bg: #070b09; --preview-surface: #0f1612; --preview-primary: #22c77e;
  --preview-secondary: #12301f; --preview-text: #e7f5ed; --preview-muted: #8fb0a0;
  --preview-border: #1d2b23; --preview-message: #16201a; --preview-avatar: #12301f;
}
.theme-preview[data-preview-theme="crimson"] {
  --preview-bg: #fbf6f5; --preview-surface: #ffffff; --preview-primary: #9b1c2e;
  --preview-secondary: #d99aa3; --preview-text: #2b1618; --preview-muted: #7f6064;
  --preview-border: #eedddd; --preview-message: #f8ecec; --preview-avatar: #f6dcdf;
}
.theme-preview[data-preview-theme="lavender"] {
  --preview-bg: #f7f5ff; --preview-surface: #ffffff; --preview-primary: #8b72df;
  --preview-secondary: #c4b3f6; --preview-text: #30294b; --preview-muted: #77718c;
  --preview-border: #ece8f6; --preview-message: #f2efff; --preview-avatar: #e9e1ff;
}
.theme-preview[data-preview-theme="ocean"] {
  --preview-bg: #f1f8ff; --preview-surface: #ffffff; --preview-primary: #69a9e8;
  --preview-secondary: #9cc7f2; --preview-text: #23384e; --preview-muted: #687f98;
  --preview-border: #dceaf7; --preview-message: #e8f3ff; --preview-avatar: #cce6ff;
}


/* =========================================================
   THEME DESIGNS — emoji patterns and signature details
========================================================= */

html[data-theme="emerald"],
.theme-preview[data-preview-theme="emerald"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg font-size='26' opacity='.16'%3E%3Ctext x='16' y='44' transform='rotate%28-12 16 44%29'%3E%F0%9F%8C%BF%3C/text%3E%3Ctext x='104' y='66' transform='rotate%2810 104 66%29'%3E%F0%9F%8D%80%3C/text%3E%3Ctext x='48' y='146' transform='rotate%2814 48 146%29'%3E%F0%9F%8C%B1%3C/text%3E%3Ctext x='140' y='158' transform='rotate%28-8 140 158%29'%3E%E2%9C%A8%3C/text%3E%3C/g%3E%3C/svg%3E");
  --theme-emoji: "";
}

html[data-theme="crimson"],
.theme-preview[data-preview-theme="crimson"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg font-size='26' opacity='.13'%3E%3Ctext x='16' y='44' transform='rotate%28-12 16 44%29'%3E%F0%9F%8D%92%3C/text%3E%3Ctext x='104' y='66' transform='rotate%2810 104 66%29'%3E%F0%9F%8C%B9%3C/text%3E%3Ctext x='48' y='146' transform='rotate%2814 48 146%29'%3E%E2%9D%A4%EF%B8%8F%3C/text%3E%3Ctext x='140' y='158' transform='rotate%28-8 140 158%29'%3E%F0%9F%8D%92%3C/text%3E%3C/g%3E%3C/svg%3E");
  --theme-emoji: "";
}

html[data-theme="lavender"],
.theme-preview[data-preview-theme="lavender"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg font-size='26' opacity='.13'%3E%3Ctext x='16' y='44' transform='rotate%28-12 16 44%29'%3E%F0%9F%92%9C%3C/text%3E%3Ctext x='104' y='66' transform='rotate%2810 104 66%29'%3E%E2%9C%A8%3C/text%3E%3Ctext x='48' y='146' transform='rotate%2814 48 146%29'%3E%F0%9F%A6%8B%3C/text%3E%3Ctext x='140' y='158' transform='rotate%28-8 140 158%29'%3E%F0%9F%92%AB%3C/text%3E%3C/g%3E%3C/svg%3E");
  --theme-emoji: "";
}

html[data-theme="ocean"],
.theme-preview[data-preview-theme="ocean"] {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg font-size='26' opacity='.15'%3E%3Ctext x='16' y='44' transform='rotate%28-12 16 44%29'%3E%F0%9F%8C%8A%3C/text%3E%3Ctext x='104' y='66' transform='rotate%2810 104 66%29'%3E%F0%9F%90%9A%3C/text%3E%3Ctext x='48' y='146' transform='rotate%2814 48 146%29'%3E%F0%9F%90%A0%3C/text%3E%3Ctext x='140' y='158' transform='rotate%28-8 140 158%29'%3E%F0%9F%AB%A7%3C/text%3E%3C/g%3E%3C/svg%3E");
  --theme-emoji: "";
}

.theme-preview[data-preview-theme] {
  background-image: var(--pattern);
  background-size: 120px 120px;
}

html[data-theme="emerald"] { color-scheme: dark; }

/* EMERALD — neon glow on a black base */
html[data-theme="emerald"] .room-item,
html[data-theme="emerald"] .modal-panel {
  border: 1px solid #1d2b23;
}
html[data-theme="emerald"] .room-item:hover,
html[data-theme="emerald"] .room-item:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary),
    0 0 26px color-mix(in srgb, var(--primary) 28%, transparent);
}
html[data-theme="emerald"] .eyebrow { text-shadow: 0 0 14px color-mix(in srgb, var(--primary) 55%, transparent); }
html[data-theme="emerald"] .brand-icon {
  box-shadow: 0 0 22px color-mix(in srgb, var(--primary) 50%, transparent);
}

/* CRIMSON — crisp white with a deep red banner line */
html[data-theme="crimson"] .topbar {
  border-bottom: 3px solid var(--primary);
}
html[data-theme="crimson"] .welcome-section h1 {
  letter-spacing: -0.02em;
}
html[data-theme="crimson"] .room-item {
  border-left: 4px solid var(--primary);
}

/* LAVENDER — soft and sparkly */
html[data-theme="lavender"] .room-item:hover {
  box-shadow: 0 13px 32px color-mix(in srgb, var(--primary) 22%, transparent);
}

/* OCEAN — breezy, layered like waves */
html[data-theme="ocean"] body {
  background-image:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 40%),
    linear-gradient(180deg, transparent 70%, color-mix(in srgb, var(--primary) 14%, transparent));
  background-color: var(--bg);
  background-attachment: fixed;
}
html[data-theme="ocean"] .room-item {
  border-radius: 28px;
}


/* Only the selected theme shows the check mark */
.theme-card:not(.selected) .theme-card-check {
  display: none;
}
