:root{
  --bg: #0b0d12;
  --panel: #11151c;
  --card: #151a22;
  --text: #e8ecf1;
  --muted: #9aa6b2;
  --accent: #7c5cff;
  --primary: #2dd4bf;
  --danger: #ef4444;
  --ring: #2a303b;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
}



* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% -10%, #141927, transparent 60%), var(--bg);
  color: var(--text); image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: -moz-crisp-edges;
}

/* Header */
.vm-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:18px 20px; position:sticky; top:0; z-index:5;
  background: linear-gradient(0deg, rgba(11,13,18,.75), rgba(11,13,18,.75));
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--ring);
}
.brand{ display:flex; gap:12px; align-items:center; }
.logo{
  width:40px; height:40px; border-radius:12px; display:grid; place-items:center;
  background: radial-gradient(120% 120% at 10% 20%, #2dd4bf, #7c5cff);
  color:white; font-size:20px; box-shadow: var(--shadow);
}
.brand h1{ margin:0; font-size:20px; letter-spacing:.2px; }
.tag{ margin:0; color:var(--muted); font-size:12px; }

.wallet{ display:flex; gap:10px; align-items:center; }
.coins{
  display:flex; gap:8px; align-items:center;
  background: var(--card); border:1px solid var(--ring);
  padding:8px 12px; border-radius:999px; box-shadow: var(--shadow);
}

/* Tabs */
.vm-tabs{
  display:flex; gap:8px; padding:12px 20px; border-bottom:1px solid var(--ring);
  background: linear-gradient(180deg, rgba(21,26,34,.5), rgba(21,26,34,0));
}
.vm-tabs .tab{
  padding:10px 14px; border-radius:999px; border:1px solid var(--ring);
  background: var(--panel); color:var(--text); cursor:pointer;
}
.vm-tabs .tab.active{ outline:2px solid var(--accent); }

/* Main layout */
main{ max-width:1100px; margin:20px auto; padding:0 20px; }
.tabpanel{ display:none; }
.tabpanel.active{ display:block; }

/* Cards */
.cards{ display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card{
  background: var(--card); border:1px solid var(--ring); border-radius: var(--radius);
  overflow:hidden; box-shadow: var(--shadow);
}
.card-media{ height:140px; background-size: cover; background-position:center; }
.boxskin{ position:relative; }
.card-body{ padding:16px; }
.card-body h2{ margin:0 0 6px; }
.card-body p{ margin:0 0 10px; color:var(--muted); }
.meta{ list-style:none; padding:0; margin:0; color:var(--muted); display:grid; gap:6px; }
.card-actions{ padding:12px 16px; border-top:1px solid var(--ring); display:flex; justify-content:flex-end; }

/* Buttons */
.btn{
  border:1px solid var(--ring); background: var(--panel); color: var(--text);
  padding:10px 14px; border-radius:12px; cursor:pointer; transition: transform .05s ease;
}
.btn:active{ transform: translateY(1px); }
.btn.primary{ background: linear-gradient(90deg, #0ea5e9, #2dd4bf); border-color: transparent; color:white; }
.btn.accent{ background: linear-gradient(90deg, #8b5cf6, #ec4899); border-color: transparent; color:white; }
.btn.ghost{ background: transparent; }
.btn.danger{ background: linear-gradient(90deg, #ef4444, #f97316); border-color: transparent; color:white; }

/* Opening overlay (animation) */
.opening{
  position: fixed;
  inset:0;
  display:grid;
  place-items:center;
  background: rgba(0,0,0,0.6);
  padding:20px;
  z-index: 50; 
}

.opening.hidden{ display:none; }
.opening-box{ position:relative; display:grid; place-items:center; gap:10px; }
.opening-box img{
  width:220px; height:220px; object-fit:contain; filter: drop-shadow(0 12px 30px rgba(0,0,0,.5));
  animation: wobble 1.1s infinite ease-in-out;
}
.opening-text{ color: var(--muted); font-weight:600; letter-spacing:.5px; }
.opening-pulse{
  position:absolute; width:240px; height:240px; border-radius:50%;
  background: radial-gradient(closest-side, rgba(124,92,255,.25), transparent 70%);
  filter: blur(10px); animation: pulse 1.4s infinite ease-in-out;
}

/* Reveal Modal (result) */
.reveal{
  position: fixed;
  inset:0;
  display:grid;
  place-items:center;
  background: rgba(0,0,0,0.6); 
  padding:20px;
  z-index: 60;
}
.reveal.hidden{ display:none; }
.reveal img{
  width:260px; height:260px; object-fit:cover; border-radius:14px; border:2px solid var(--ring);
  box-shadow: var(--shadow);
  animation: pop .35s ease;
}
.reveal-info{ text-align:center; margin-top:12px; display:grid; gap:10px; }
.pill{
  display:inline-block; padding:6px 10px; border-radius:999px; font-size:12px; letter-spacing:.4px;
  background:#22283a; border:1px solid var(--ring);
}
.pill[data-rarity="COMMON"]{ background: #858f9e; }
.pill[data-rarity="RARE"]{ background: #0037ff; }
.pill[data-rarity="EPIC"]{ background: #6d28d9; }
.pill[data-rarity="LEGENDARY"]{ background: #b45309; }
.pill[data-rarity="MYTHIC"]{ background: #126000; }

/* Sparkles */
.sparkle{
  position:absolute; width:220px; height:220px; border-radius:50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.2), transparent 70%);
  filter: blur(12px); animation: pulse 1.4s infinite ease-in-out;
}

/* Inventory */
.inv-toolbar{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.filter select{
  background: var(--panel); border:1px solid var(--ring); color: var(--text);
  padding:8px 10px; border-radius:10px;
}
.search input{
  background: var(--panel);
  border:1px solid var(--ring);
  color: var(--text);
  padding:8px 10px;
  border-radius:20px;
  min-width: 180px;
  margin: 2px;
}

.grid{
  display:grid; gap:14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.item{
  background: var(--card); border:1px solid var(--ring); border-radius:14px; overflow:hidden;
  position:relative; cursor:pointer;
}
.item img{ width:100%; height:120px; object-fit:cover; display:block; transition: transform .2s ease; }
.item:hover img{ transform: scale(1.02); }
.item .cap{ padding:10px; display:flex; justify-content:space-between; align-items:center; }
.item .cap .name{ font-size:14px; }
.badge{
  position:absolute; top:8px; left:8px; padding:4px 8px; font-size:12px; border-radius:999px;
  background:#22283a; border:1px solid var(--ring);
}
.count{
  background:#11151c; border:1px solid var(--ring); padding:2px 8px; border-radius:999px; font-size:12px;
}
.muted{ color: var(--muted); }

/* Item Modal */
.modal{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  background: rgba(0,0,0,.55);
  padding:18px;

  z-index: 2000;
}

.modal.hidden{ display:none; }
.modal-card{
  width:min(860px, 96vw); position: relative; background: var(--card); border:1px solid var(--ring);
  border-radius:18px; box-shadow: var(--shadow); overflow:hidden;
}
.modal-close{
  position:absolute; right:14px; top:10px; border:none; background:transparent; color:var(--text);
  font-size:18px; cursor:pointer;
}
.modal-body{
  display:grid;
  grid-template-columns: minmax(320px, 1fr) 1.2fr; /* left column has a real min width */
  gap:18px;
  padding:18px;
  align-items:center;
}

/* Visuell container for inspect-view */
.modal-visual{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:8px;

  /* default-verdier til lys (oppdatert av JS) */
  --inspect-light-x: 50%;
  --inspect-light-strength: 0.7;
}

/* “depth light”-glow over bildet */
.modal-visual::before{
  content:"";
  position:absolute;
  inset:-10%;
  pointer-events:none;

  background:
    radial-gradient(
      circle at var(--inspect-light-x) 0%,
      rgba(248,250,252,var(--inspect-light-strength)),
      rgba(15,23,42,0.0) 65%
    );
  mix-blend-mode:screen;
  opacity:0.9;
  transition:
    background-position 0.12s ease-out,
    opacity 0.12s ease-out;
}


.modal-actions .btn + .btn { margin-left: 8px; }

.modal-img{
  display:block;
  width:100% !important;
  height:auto !important;
  max-height:min(60vh, 520px);
  object-fit:contain;
  align-self:center;

  border-radius:12px;
  border:1px solid var(--ring);

  /* crisp pixel art */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;

  /* depth/3D-illusjon */
  transform-origin:center center;
  transition:
    transform 0.12s ease-out,
    filter 0.12s ease-out,
    box-shadow 0.12s ease-out;

  box-shadow:0 18px 32px rgba(15,23,42,0.9);
  background:radial-gradient(circle at 50% 10%, rgba(148,163,184,0.2), transparent 65%);
}


/* Container for bilde + inspect-slider */
.modal-visual{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* Gi bildet smooth 3D-følelse når vi roterer */
.modal-visual .modal-img{
  transform-origin:center center;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

/* Selve slideren */
.inspect-slider{
  width:100%;
  -webkit-appearance:none;
  appearance:none;
  height:4px;
  border-radius:999px;
  background:linear-gradient(
    90deg,
    rgba(148,163,184,0.8),
    rgba(148,163,184,0.15)
  );
  outline:none;
}

/* WebKit thumb */
.inspect-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#e5ecff;
  border:1px solid #4b5563;
  box-shadow:0 0 0 1px #020617;
  cursor:pointer;
}

/* Firefox thumb */
.inspect-slider::-moz-range-thumb{
  width:14px;
  height:14px;
  border-radius:50%;
  background:#e5ecff;
  border:1px solid #4b5563;
  box-shadow:0 0 0 1px #020617;
  cursor:pointer;
}

/* Firefox track */
.inspect-slider::-moz-range-track{
  height:4px;
  border-radius:999px;
  background:linear-gradient(
    90deg,
    rgba(148,163,184,0.8),
    rgba(148,163,184,0.15)
  );
}


.modal-info h3{ margin:.2rem 0 .4rem; }
.modal-meta{ display:flex; gap:8px; align-items:center; margin-bottom:.4rem; }
.value-row{ display:flex; gap:8px; align-items:center; margin:8px 0 14px; }

/* Toast */
/* Toast */
.toast{
  position: fixed;
  bottom:20px;
  left:50%;
  transform: translateX(-50%);

  background: #1f2937;
  color: var(--text);
  border:1px solid var(--ring);
  border-radius:12px;
  padding:10px 14px;

  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;

  /*sørg for at den ligger over alt annet */
  z-index: 9999;
}

.toast.show{ opacity:1; transform: translateX(-50%) translateY(-6px); }

/* Achievements */
.ach-wrap { display: grid; gap: 10px; }
.ach-list { display: grid; gap: 12px; }

.ach-counter {
  font-size: 0.9em;
  font-weight: normal;
  color: var(--muted);
  margin-left: 8px;
}

.ach-item{
  display:flex; gap:12px; align-items:center;
  background: var(--card); border:1px solid var(--ring);
  border-radius:14px; padding:12px;
}
.ach-item.locked{ opacity:.55; filter: grayscale(.6); }
.ach-item.unlocked{ opacity:1; }

/* Progress: Achievements + Titles */

.ach-header-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
}

.ach-view-toggle{
  display:flex;
  gap:6px;
}

.ach-view-toggle .ach-view-btn{
  border-radius:999px;
  border:1px solid var(--ring);
  background:var(--panel);
  color:var(--muted);
  font-size:12px;
  padding:4px 10px;
  cursor:pointer;
}

.ach-view-toggle .ach-view-btn.active{
  color:var(--text);
  background:var(--card);
}

/* Titles list */

.title-list{
  display:grid;
  gap:12px;
}

.title-item{
  display:flex;
  flex-direction:column;
  gap:4px;
  background:var(--card);
  border:1px solid var(--ring);
  border-radius:14px;
  padding:10px 12px;
}

.title-item.locked{
  opacity:.55;
  filter:grayscale(.6);
}

.title-item .title-main h4{
  margin:0 0 2px;
}

.title-item .title-main p{
  margin:0;
  color:var(--muted);
}

.title-item .title-meta{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
}

/* Simple rarity accents */
.title-item.title-common{border-color: #858f9e; }
.title-item.title-rare{ border-color:#0037ff; }
.title-item.title-epic{ border-color:#6d28d9; }
.title-item.title-legendary{ border-color:#b45309; }
.title-item.title-mythic{ border-color:#126000; }

/* Profile: title card */

.profile-card.profile-titles .title-current{
  margin-bottom:6px;
}

.profile-card.profile-titles select{
  width:100%;
  margin:4px 0 6px;
  background:var(--panel);
  border:1px solid var(--ring);
  color:var(--text);
  padding:6px 8px;
  border-radius:8px;
}

.profile-card.profile-titles .tiny{
  font-size:11px;
  color:var(--muted);
}

/* Header title chip */

.profile-name-wrap{
  display:flex;
  flex-direction:column;
  gap:2px;
  align-items:flex-start;
}

.profile-title-chip{
  font-size:11px;
  padding:2px 6px;
  border-radius:999px;
  border:1px solid var(--ring);
  background:var(--panel);
  color:var(--muted);
}


.ach-icon{
  width:44px; height:44px; display:grid; place-items:center;
  border-radius:12px; background:#1f2937; border:1px solid var(--ring);
  font-size:22px;
}

.ach-icon img.ach-img{
  width:100%;
  height:100%;
  object-fit:contain;
  image-rendering:pixelated; /* keeps pixel-art sharp if needed */
}

.ach-body h4{ margin:0 0 4px; }
.ach-body p{ margin:0; color:var(--muted); }
.ach-meta{ margin-top:6px; font-size:12px; color:var(--muted); }

/* Profile badge */
.profile{ position: relative; }
.profile-btn{
  display:flex; gap:8px; align-items:center;
  padding:8px 12px; border-radius:999px; border:1px solid var(--ring);
  background: var(--panel); color:var(--text); cursor:pointer;
}
.profile-btn .avatar{ width:20px; height:20px; display:grid; place-items:center; }
.profile-menu{
  position:absolute; right:0; top: 110%;
  background: var(--card); border:1px solid var(--ring); border-radius:12px;
  padding:8px; box-shadow: var(--shadow); min-width: 180px; z-index: 10;
}
.profile-menu.hidden{ display:none; }
.pm-row{ padding:6px 8px; color: var(--muted); }
.menu-item{
  width:100%; text-align:left; padding:8px 10px; border-radius:10px; border:1px solid var(--ring);
  background: var(--panel); color: var(--text); cursor:pointer;
}
.menu-item:hover{ background:#1f2430; }

.menu-item.danger { border-color: transparent; background: #3a1f22; color: #fecaca; }
.menu-item.danger:hover { background: #4a2327; color: #fee2e2; }

/* Discord tab button */
.discord-tab {
  background: linear-gradient(90deg, #5865f2, #7289da);
  color: white !important;
  font-weight: 600;
  border: none;
  transition: filter 0.2s ease;
  border-radius: 3pc;
}
.discord-tab:hover {
  filter: brightness(1.5);
}

/* Profile page */
.profile-page{
  display:grid;
  gap:16px;
}

.profile-grid{
  display:grid;
  gap:16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: flex-start; 
}

.profile-card{
  background: var(--card);
  border:1px solid var(--ring);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
}

.profile-card h3{
  margin:0 0 8px;
}

.profile-card p{
  margin:4px 0;
  font-size:14px;
}

.profile-actions{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.profile-danger{
  border-color: rgba(239,68,68,.6);
}

/* Featured item slots */
.profile-feature-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
  margin-top:8px;
}

.profile-feature-slot{
  min-height:110px;
  border-radius:12px;
  border:1px dashed var(--ring);
  background: var(--panel);
  padding:8px;
  display:grid;
  place-items:center;
  text-align:center;
}

.profile-feature-slot-inner{
  display:grid;
  gap:6px;
  justify-items:center;
}

.profile-feature-slot img{
  width:64px;
  height:64px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid var(--ring);
  image-rendering:pixelated;
}

.profile-feature-name{
  font-size:13px;
}

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

/* Modal profile slot buttons */
.modal-profile-actions{
  margin:8px 18px 14px 18px;
  display:grid;
  gap:6px;
}

.modal-profile-actions .small{
  font-size:12px;
}

.profile-slot-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

/* Social / friends */
.social-add{
  display:flex;
  gap:8px;
  margin:8px 0 4px;
}

.social-add input{
  flex:1;
  background: var(--panel);
  border:1px solid var(--ring);
  border-radius:10px;
  padding:8px 10px;
  color: var(--text);
}

.btn.small{
  padding:6px 10px;
  font-size:13px;
  border-radius:10px;
}

.social-subheading{
  margin:10px 0 6px;
  font-size:13px;
  font-weight:600;
  color: var(--muted);
}

.friends-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:6px;
  max-height:180px;
  overflow:auto;
}

.friends-list li{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
  padding:6px 8px;
  border-radius:10px;
  background: var(--panel);
  border:1px solid var(--ring);
}

.friends-list .friend-name{
  font-weight:500;
}

.friends-list .friend-meta{
  font-size:11px;
  color: var(--muted);
}

.muted.small{
  font-size:12px;
}

/* Social / friends --END-- */

/* Trade modal */

.modal-card.modal-wide{
  max-width: 640px;
}

.trade-modal-body{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.trade-offer-list{
  margin-top:10px;
  border-radius:16px;
  border:1px solid var(--ring);
  background:var(--panel);
  max-height:260px;
  overflow:auto;
  padding:6px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.trade-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 8px;
  border-radius:12px;
  background:rgba(255,255,255,0.02);
}

.trade-row-main{
  display:flex;
  flex-direction:column;
}

.trade-row-name{
  font-size:13px;
  font-weight:500;
}

.trade-row-meta{
  font-size:11px;
  color:var(--muted);
}

.trade-row-controls{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:13px;
}

.trade-count-badge{
  min-width:32px;
  text-align:center;
}

.btn.tiny{
  padding:3px 8px;
  font-size:11px;
  border-radius:999px;
}

.trade-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:10px;
}

.trades-list{
  list-style:none;
  padding:0;
  margin:4px 0 0;
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height:200px;
  overflow:auto;
}

/* Gjenbruker .trade-row / .trade-row-main / .trade-row-controls fra modal */
.trades-list .trade-row{
  cursor:default;
}


/* Trade modal END */

/* Public profile modal layout */
.modal-profile-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: flex-start;
}

.modal-profile-main h3 {
  margin: 0 0 6px;
}

.modal-profile-main p {
  margin: 2px 0;
}

.modal-profile-featured h4 {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* På små skjermer: stack over hverandre */
@media (max-width: 720px) {
  .modal-profile-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Trading page */
.trading-page{
  max-width:960px;
  margin:0 auto;
  padding:16px 0;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.trading-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);
  gap:16px;
}

.trading-card{
  background:var(--panel);
  border-radius:20px;
  padding:16px;
  border:1px solid var(--ring);
}

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

/* Trading page END */

/* Player Shop / Player Auction */

.player-shop{
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--ring);
}

.player-shop-header{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:8px;
}

.player-shop-header h3{
  margin:0;
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:0.16em;
}

.player-shop-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:6px;
}

/* GRID: 1–2 cards per rad avhengig av bredde */
.player-shop-list{
  margin-top:10px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:6px;
}

.player-shop-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 10px;
  border-radius:12px;
  background:var(--panel);
  border:1px solid var(--ring);
  font-size:12px;
}

/* Venstre side i et kort */
.player-shop-main{
  display:flex;
  align-items:center;
  gap:8px;
}

.player-shop-main img{
  width:32px;
  height:32px;
  object-fit:contain;
  border-radius:6px;
}

.player-shop-meta{
  display:flex;
  flex-direction:column;
}

.player-shop-name{
  font-weight:600;
}

.player-shop-seller{
  font-size:11px;
  color:var(--muted);
}

/* Høyre side: pris + knapp */
.player-shop-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
}

.player-shop-price{
  font-weight:600;
}

.player-shop-subheader{
  margin-top:14px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.16em;
  color:var(--muted);
}



/* Global CHAT */

.global-chat{
  position:fixed;
  left:12px;
  bottom:12px;
  width:340px;        /* bredere */
  height:220px;       /* fast høyde */
  display:flex;
  flex-direction:column;
  backdrop-filter:blur(10px);
  background:rgba(0,0,0,0.35);
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.06);
  font-size:12px;
  z-index:50;
}

.global-chat-header{
  padding:4px 8px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--muted);
  border-bottom:1px solid rgba(255,255,255,0.06);
}

.global-chat-list{
  list-style:none;
  margin:0;
  padding:6px 8px 8px;
  display:flex;
  flex-direction:column;
  gap:4px;
  overflow-y:auto;        /* scroll når det blir fullt */
}

.global-chat-message{
  display:flex;
  gap:4px;
  align-items:flex-start;
  white-space:normal;     /* tillat flere linjer */
  overflow:visible;
  text-overflow:clip;
}

.global-chat-time{
  opacity:0.6;
  min-width:40px;
  font-feature-settings:"tnum";
}

.global-chat .pill{
  display:inline-block;
  padding:1px 6px;
  border-radius:100px;
  font-size:11px;
  color:white;
  text-transform:capitalize;
}

/* Global CHAT END */

/* Animations */
@keyframes pop{ from{ transform: scale(.95); opacity: .6 } to{ transform: scale(1); opacity:1 } }
@keyframes pulse{ 0%{ transform: scale(.9); opacity:.6 } 50%{ transform: scale(1); opacity:1 } 100%{ transform: scale(.9); opacity:.6 } }
@keyframes wobble{
  0%{ transform: rotate(0deg) translateY(0) }
  25%{ transform: rotate(-3deg) translateY(-2px) }
  50%{ transform: rotate(0deg) translateY(0) }
  75%{ transform: rotate(3deg) translateY(-2px) }
  100%{ transform: rotate(0deg) translateY(0) }
}

/* Footer */
.vm-footer{ text-align:center; padding:30px 20px; color:var(--muted); }

/* Small screens */
@media (max-width: 820px){
  .modal-body{ grid-template-columns: 1fr; }
  .modal-img{ max-height:min(55vh, 420px); }
}


