:root{
  --desktop-bg: #008080;
  --win-face: #c0c0c0;
  --win-shadow: #808080;
  --win-dark: #404040;
  --win-light: #ffffff;
  --titlebar: #000080;
  --titlebar-text: #ffffff;
  --font: "MS Sans Serif","Tahoma","Verdana",system-ui,sans-serif;
}

a.msn-action,
a.msn-action:link,
a.msn-action:visited,
a.msn-action:hover,
a.msn-action:active {
  color: inherit;
  text-decoration: none;
}

/* Optional: if the <a> still has slightly different spacing/line height */
a.msn-action {
  display: inline-flex;     /* or inline-block */
  align-items: center;
  justify-content: center;
  font: inherit;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; font-family: var(--font); }

body {
  background-image: url("https://b.catgirlsare.sexy/_JYec8T3xF6F.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

.bg-video{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;     /* fill screen, crop edges */
  z-index: 0;
  pointer-events: none;  /* click-through */
}

/* blur the site while overlay is visible */
body.is-locked .desktop{
  filter: blur(8px);
  transform: scale(1.01); /* hides blur edges a bit */
}

/* overlay itself */
.welcome-overlay{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.25);
}

.welcome-card{
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 2px 2px 0 0 var(--win-shadow);
  padding: 18px 22px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.welcome-title{ font-weight: 700; font-size: 16px; }
.welcome-sub{ margin-top: 6px; font-size: 12px; }


.desktop{
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 14px;
}

.tooltip-text {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);

  background: #c0c0c0;
  color: #000;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #404040;
  padding: 2px 6px;
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  font-size: 11px;

  opacity: 0;
  pointer-events: none;
}

.tooltip:hover .tooltip-text {
  opacity: 1;
}


/* optional marquee banner */
.banner{
  display:block;
  width:100%;
  height: 68px;
  background: url("https://b.catgirlsare.sexy/Ge-CoKQedJAe.jpg") repeat-x;
  opacity: 0.15;
  margin-bottom: 12px;
}

.window{
  position: absolute;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 2px 2px 0 0 var(--win-shadow);
}

.window.is-active{
  outline: 2px dotted var(--titlebar);
  outline-offset: -4px;
}

.titlebar{
  display:flex;
  align-items:center;
  gap: 8px;
  height: 28px;
  padding: 0 6px;
  background: var(--titlebar);
  color: var(--titlebar-text);
  cursor: grab;
  user-select: none;
}

.titlebar:active{ cursor: grabbing; }

.icon{
  width: 16px;
  height: 16px;
  background: var(--win-light);
  border: 1px solid rgba(0,0,0,.25);
  flex: 0 0 16px;
}

.title{
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-controls{
  margin-left:auto;
  display:flex;
  gap: 4px;
}

.win-btn{
  width: 22px;
  height: 18px;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1;
  background: var(--win-face);

  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);

  display:grid;
  place-items:center;
  cursor:pointer;
  padding: 0;
}

.win-btn:active{
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

.window-body{
  padding: 10px;
  user-select: text;
}

.embed{
  border: 0;
  background: #fff;
}

/* Taskbar */
.taskbar{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42px;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  box-shadow: 0 -2px 0 0 var(--win-shadow);
  display:flex;
  align-items:center;
  padding: 6px;
  gap: 8px;
}

.start-btn{
  font-family: var(--font);
  font-weight: 700;
  padding: 6px 10px;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  cursor:pointer;
}

.start-btn:active{
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

.taskbar-spacer{ flex: 1; }

.clock{
  padding: 6px 10px;
  background: #dcdcdc;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  font-size: 13px;
}

/* Start menu */
.start-menu{
  position: absolute;
  left: 6px;
  bottom: 46px;
  width: 220px;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 2px 2px 0 0 var(--win-shadow);
  padding: 6px;
}

.menu-item{
  width: 100%;
  display:block;
  text-align:left;
  padding: 8px 8px;
  margin: 0;
  background: transparent;
  border: 0;
  font-family: var(--font);
  font-size: 13px;
  cursor:pointer;
  color: #000;
  text-decoration: none;
}

.menu-item:hover{
  background: #000080;
  color: #fff;
}

.menu-sep{
  height: 2px;
  background: var(--win-dark);
  border-bottom: 2px solid var(--win-light);
  margin: 6px 0;
}

.button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.button-grid img {
  image-rendering: pixelated; /* crunchy retro look */
  display: block;
  background: #000;
  border: 1px solid #404040;
}

.button-grid a:hover img {
  outline: 2px dotted #000080;
  outline-offset: 1px;
}


/* Minimized/closed states */
.window.is-minimized .window-body{ display:none; }
.window.is-closed{ display:none; }

/* Critical: when dragging, disable pointer events on iframes/videos so drag doesn’t “drop” */
.dragging .window iframe,
.dragging .window video{
  pointer-events: none;
}

/* --- Music player widget --- */
.mp-title{
  font-weight: 700;
  background: #fff;
  border: 1px solid #000;
  padding: 3px 5px;
  box-shadow: inset 1px 1px 0 #808080;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-time{
  margin-top: 6px;
  font-size: 11px;
}

.mp-seek{
  width: 100%;
  margin: 6px 0 8px;
}

.mp-controls{
  display:flex;
  gap: 6px;
  align-items:center;
  flex-wrap: wrap;
}

.mp-btn{
  width: 36px;
  height: 26px;
  border: 1px solid #000;
  background: var(--win-face);
  box-shadow: 1px 1px 0 #404040, inset 1px 1px 0 #fff;
  cursor: pointer;
}

.mp-btn:active{
  box-shadow: inset 1px 1px 0 #404040;
}

.mp-vol{
  display:flex;
  align-items:center;
  gap: 6px;
  margin-left: auto;
}

.mp-vol input{
  width: 90px;
}

.mp-order{
  margin-top: 8px;
  font-size: 10px;
  display:flex;
  gap: 6px;
}

#win-music{
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

/* the real framed window lives here */
#win-music .win-shell{
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 2px 2px 0 0 var(--win-shadow);
  position: relative;
  z-index: 2; /* above the peeker */
}

/* peeker sits BEHIND the framed window */
#win-music .music-peeker{
  position: absolute;
  top: 34px;                 /* under titlebar */
  left: 0;

  height: calc(100% - 40px);
  aspect-ratio: 1 / 1;
  width: auto;

  transform: translateX(0);  /* fully hidden */
  transition: transform 220ms ease;

  pointer-events: none;
  z-index: 1;                    /* behind .win-shell, above desktop */
}

/* half peek when playing */
#win-music.is-playing .music-peeker{
  transform: translateX(-50%);
}

/* image fills the peeker */
#win-music .music-peeker img{
  height: 100%;
  width: auto;
  display: block;
  transform-origin: 50% 50%;
}

/* spin animation */
@keyframes vinylSpin{
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* spin only while playing */
#win-music.is-playing .music-peeker img{
  animation: vinylSpin 1.2s linear infinite;
}

#win-music:not(.is-playing) .music-peeker img{
  animation: none;
}

@keyframes peekerBump{
  0%   { transform: translateX(-50%); }
  50%  { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* trigger class */
#win-music.is-playing .music-peeker.is-bumping{
  animation: peekerBump 150ms ease;
}

/* smol birb */
#win-music .mp-sticker{
  position: absolute;
  top: -75%;      /* below titlebar; tweak */
  right: 10px;
  width: 150px;
  height: auto;
  z-index: 1;
  pointer-events: none;
  image-rendering: auto; /* use 'pixelated' if it's pixel art */
  opacity: 1;
}


/* Suspicious desktop icon */

.desktop-icon{
  position: absolute;
  top: 92px;
  left: 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  user-select: none;
}

.desktop-icon:focus{
  outline: 2px dotted var(--titlebar);
  outline-offset: 2px;
}

.desktop-icon-img{
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  border: 1px solid rgba(0,0,0,.35);
  background: var(--win-face);
}

.desktop-icon-label{
  font-family: var(--font);
  font-size: 12px;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,.8);
  padding: 1px 4px;
  background: rgba(0,0,0,.15);
}


/* System whisper popup */

.whisper-popup{
  position: fixed;
  left: 50%;
  top: 40%; /* above 42px taskbar */
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 36px));
  z-index: 9999;

  opacity: 0;
  pointer-events: none;
  transition: opacity .12s linear;
}

body.whisper-on .whisper-popup{
  opacity: 1;
}

.whisper-titlebar{
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 8px;

  background: var(--titlebar);
  color: var(--titlebar-text);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 0;
}

.whisper-title{
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.whisper-body{
  background: rgba(0,0,0,.42);
  color: #eee;

  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  border-top: 0;

  box-shadow: 2px 2px 0 rgba(0,0,0,.55);
  padding: 10px 12px;
}

/* Glitch text: runs whenever popup is visible */
.ra-glitch{
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.25;
  margin: 0;
}

.ra-glitch::before,
.ra-glitch::after{
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

body.whisper-on .ra-glitch::before,
body.whisper-on .ra-glitch::after{
  opacity: 1;
}

body.whisper-on .ra-glitch::before{
  transform: translate(1px, 0);
  text-shadow: -2px 0 0 rgba(255, 0, 80, .9);
  animation: ra-slice 700ms infinite steps(2, end),
             ra-jitter 140ms infinite steps(2, end);
}

body.whisper-on .ra-glitch::after{
  transform: translate(-1px, 0);
  text-shadow: 2px 0 0 rgba(0, 255, 220, .8);
  animation: ra-slice 560ms infinite steps(2, end),
             ra-jitter 110ms infinite steps(2, end) reverse;
}

body.whisper-on .ra-glitch{
  filter: blur(.2px) contrast(1.15);
  text-shadow: 0 0 .6em rgba(255, 160, 0, .25);
}

@keyframes ra-slice{
  0%   { clip-path: inset(0   0 85% 0); }
  10%  { clip-path: inset(10% 0 65% 0); }
  20%  { clip-path: inset(35% 0 40% 0); }
  30%  { clip-path: inset(60% 0 25% 0); }
  40%  { clip-path: inset(75% 0 10% 0); }
  50%  { clip-path: inset(50% 0 35% 0); }
  60%  { clip-path: inset(20% 0 60% 0); }
  70%  { clip-path: inset(5%  0 80% 0); }
  80%  { clip-path: inset(40% 0 45% 0); }
  90%  { clip-path: inset(65% 0 20% 0); }
  100% { clip-path: inset(0   0 85% 0); }
}

@keyframes ra-jitter{
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(1px, -1px); }
  50%  { transform: translate(-2px, 1px); }
  75%  { transform: translate(2px, 2px); }
  100% { transform: translate(-1px, 0); }
}



/* --- Video chaos mode (images spawn on top of everything while video plays) --- */
.video-chaos-layer{
  position: fixed;
  inset: 0;
  z-index: 200000;      /* above windows/taskbar/overlays */
  pointer-events: none; /* click-through */
  overflow: hidden;
}

.video-chaos-img{
  position: absolute;
  opacity: 0;
  animation-name: chaosOpacity;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
  will-change: opacity, transform;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35));
}

@keyframes chaosOpacity{
  0%   { opacity: 0; }
  18%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { opacity: 0; }
}


/* --- MSN socials window --- */
.msn{
  padding: 10px;
  background:
    linear-gradient(#eaf3ff, #ffffff 45%, #f0f0f0);
}

.msn-header{
  display:grid;
  grid-template-columns: 52px 1fr;
  column-gap: 10px;
  row-gap: 6px;
  padding: 8px;
  background: linear-gradient(#d7ecff, #ffffff);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff;
  margin-bottom: 10px;
}

.msn-header .msn-avatar-shell{
  grid-column: 1;
  grid-row: 1;
}

.msn-header .msn-who{
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.msn-header .msn-nowplaying{
  grid-column: 1 / -1;
  grid-row: 2;
}

.msn-avatar{
  width: 52px;
  height: 52px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #404040;
}

.msn-name{
  font-weight: 700;
  font-size: 14px;
}

.msn-status{
  font-size: 12px;
  margin-top: 2px;
}

.msn-msg{
  font-size: 11px;
  margin-top: 4px;
  color: #1a1a1a;
  opacity: .9;
}

.msn-dot{
  display:inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(0,0,0,.45);
}
.msn-dot.online{ background: #17d016; }

.msn-actions{
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.msn-action{
  flex: 1 1 110px;
  padding: 6px 8px;
  font-family: var(--font);
  font-size: 12px;
  background: #f8f8f8;

  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);

  cursor: pointer;
}
.msn-action:active{
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

.msn-primary{ font-weight: 700; }

.msn-panel{
  border: 1px solid #000;
  background: #fff;
  box-shadow: inset 1px 1px 0 #fff;
  padding: 8px;
  margin-bottom: 10px;
}

.msn-panel-title{
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
}

.msn-link{
  display:block;
  padding: 4px 6px;
  color: #000;
  text-decoration: none;
  border: 1px solid transparent;
}
.msn-link:hover{
  border-color: #000080;
  background: #dbe9ff;
}
.msn-ico{
  display:inline-block;
  width: 16px;
  text-align:center;
  margin-right: 6px;
}
.msn-handle{ opacity: .75; }

.msn-mini{
  font-size: 11px;
  opacity: .85;
  margin-bottom: 6px;
  line-height: 1.25;
}

.msn-text{
  width: 100%;
  resize: vertical;
  font-family: var(--font);
  font-size: 12px;
  padding: 6px;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #808080;
}

.msn-sendrow{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-top: 6px;
}

.msn-send{
  padding: 6px 10px;
  font-family: var(--font);
  font-size: 12px;
  background: var(--win-face);

  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);

  cursor: pointer;
}
.msn-send:active{
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

.msn-hint{
  font-size: 11px;
  opacity: .75;
}

/* guestbook shake */
@keyframes winShake{
  0%   { transform: translate(0,0); }
  15%  { transform: translate(-2px, 1px); }
  30%  { transform: translate(3px, -1px); }
  45%  { transform: translate(-3px, -1px); }
  60%  { transform: translate(2px, 2px); }
  75%  { transform: translate(-2px, -1px); }
  100% { transform: translate(0,0); }
}

.window.is-shaking{
  animation: winShake 260ms ease-in-out;
}


/* flight trail (Friends smash easter egg) */
.fly-trail{
  position: fixed;
  width: 18px;
  height: 18px;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 1; /* above bg-video (0), below desktop/windows (2+) */
  background: rgba(255,255,255,.95);
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #404040;
  image-rendering: pixelated;
  transform: translate(-50%,-50%) rotate(var(--rot, 0deg)) scale(1.65);
  transform-origin: 50% 50%;
  animation: flyTrailShrink 360ms ease-out forwards;
}

@keyframes flyTrailShrink{
  0%{
    opacity: .75;
    transform: translate(-50%,-50%) rotate(var(--rot, 0deg)) scale(1.65);
  }
  65%{
    opacity: .35;
    transform: translate(-50%,-50%) rotate(var(--rot, 0deg)) scale(.85);
  }
  100%{
    opacity: 0;
    transform: translate(-50%,-50%) rotate(var(--rot, 0deg)) scale(.20);
  }
}
/* --- MSN: Discord / Lanyard presence --- */
/*
  We want the avatar clipped to the square, but Discord avatar decorations should
  be able to extend beyond the square (so they can't be clipped by overflow).
*/
.msn-avatar-shell{
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: block;
  overflow: visible; /* allow decoration to overflow */
}

.msn-avatar-clip{
  position: relative;
  width: 52px;
  height: 52px;
  overflow: hidden; /* clip ONLY the avatar */
  background: #fff;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #404040;
}

.msn-avatar-clip .msn-avatar{
  position: absolute;
  inset: 0;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 0;
  box-shadow: none;
}

.msn-avatar-shell .msn-deco{
  position: absolute;
  inset: 0;
  width: 52px;
  height: 52px;
  pointer-events: none;
  border: none;
  transform: scale(1.35);
  transform-origin: center;
  z-index: 2;
}

/* Hard guarantee that hidden truly hides, even if other CSS touches display */
.msn-nowplaying[hidden]{ display: none !important; }
.msn-nowplaying .np-art[hidden]{ display: none !important; }
.msn-nowplaying .np-bar[hidden]{ display: none !important; }

.msn-sep{ opacity:.7; padding:0 4px; }

.msn-dot.idle{ background:#ffd000; }
.msn-dot.dnd{ background:#ff4b4b; }
.msn-dot.offline{ background:#9a9a9a; }

.msn-nowplaying{
  margin-top: 0;
  font-size: 11px;
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 10px;
  align-items: stretch;
}

.msn-nowplaying .np-art{
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 1px 1px 0 #404040;
}

.msn-nowplaying .np-meta{
  flex: 1 1 auto;
  min-width: 0; /* allows ellipsis */
}

.msn-nowplaying .np-line{
  font-weight:700;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.msn-nowplaying .np-sub{
  opacity:.8;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.msn-nowplaying .np-bar{
  margin-top:4px;
  height:6px;
  border:1px solid #000;
  background:#fff;
  box-shadow: inset 1px 1px 0 #808080;
}

.msn-nowplaying .np-fill{
  height:100%;
  width:0%;
  background:#000080;
}


/* --- MSN: Random Links slide-out drawer --- */
#win-socials{
  overflow: visible;
  position: absolute; /* already, but keep explicit */
}

#win-socials .titlebar,
#win-socials .window-body{
  position: relative;
  z-index: 3; /* above drawer */
}

.msn-drawer{
  position: absolute;
  top: 28px;              /* below titlebar */
  left: 100%;
  width: 260px;
  height: calc(100% - 28px);
  z-index: 2;             /* behind the main window content */
  transform: translateX(-100%); /* fully hidden behind the window */
  transition: transform 260ms ease;
  pointer-events: none;   /* disabled while hidden */
}

#win-socials.drawer-open .msn-drawer{
  transform: translateX(0);   /* slide out to the right */
  pointer-events: auto;
}

/* hide drawer entirely when minimized/closed */
.window.is-minimized .msn-drawer,
.window.is-closed .msn-drawer{
  display: none;
}

.msn-drawer-inner{
  height: 100%;
  background: linear-gradient(#ffe6f5, #fff 35%, #ffd6ee);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 2px 2px 0 0 var(--win-shadow);
  padding: 22px 12px 18px;
  position: relative;
  overflow: hidden;
  font-family: "Comic Sans MS","Trebuchet MS",var(--font);
}

.msn-drawer-title{
  font-size: 18px;
  font-weight: 900;
  color: #b4006a;
  text-shadow: 1px 1px 0 rgba(255,255,255,.75);
  margin-bottom: 4px;
}

.msn-drawer-sub{
  font-size: 11px;
  color: #6e2a52;
  opacity: .9;
  margin-bottom: 10px;
}

.msn-drawer-list{
  height: calc(100% - 54px);
  overflow: auto;
  padding-right: 6px; /* breathing room for scrollbar */
  border: 1px solid rgba(0,0,0,.35);
  background: rgba(255,255,255,.85);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.9);
}

.msn-drawer-item{
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: #000;
  border-bottom: 1px dashed rgba(0,0,0,.15);
  font-size: 13px;
}

.msn-drawer-item:hover{
  background: rgba(255, 182, 223, .45);
  outline: 1px dotted rgba(180,0,106,.55);
  outline-offset: -2px;
}

.msn-drawer-item .tag{
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(180,0,106,.12);
  color: #7a0046;
}

/* overlay images (spill over the sides a lil) */
.msn-drawer-overlay{
  position: absolute;
  left: -18px;
  width: calc(100% + 36px);
  height: auto;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.25));
}

.msn-drawer-overlay-top{ top: -20px; }
.msn-drawer-overlay-bot{ bottom: -24px; }

/* --- Arcana Blackjack (fake 3D) --- */
.bjx-wrap{
  --bjx-purple: #1a0626;
  --bjx-purple2:#2b0b3f;
  --bjx-black: #07050a;
  --bjx-gold: #d6b45a;
  --bjx-gold2:#ffdf87;
  --bjx-ink: rgba(0,0,0,.55);
  color: #f6e9c9;
}

#win-blackjack .window-body{ padding: 10px; }

.bjx-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.bjx-money{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.18));
  border: 1px solid rgba(214,180,90,.45);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}

.bjx-money-gif{
  width: 28px;
  height: 28px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid rgba(0,0,0,.45);
}

.bjx-money-readout{
  min-width: 110px;
  text-align:center;
  font-weight: 800;
  letter-spacing: .4px;
  color: var(--bjx-gold2);
  text-shadow: 0 1px 0 rgba(0,0,0,.6);
}

.bjx-bet{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.18));
  border: 1px solid rgba(214,180,90,.45);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}

.bjx-bet-label{ font-weight: 700; color: #f2dcaa; opacity: .95; }

.bjx-bet-readout{ min-width: 70px; text-align:center; color: #fff; }

.bjx-bet-btn{
  width: 26px;
  height: 22px;
  font-family: var(--font);
  font-weight: 800;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  cursor:pointer;
  display:grid;
  place-items:center;
  padding: 0;
}

.bjx-bet-btn:active{
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

.bjx-board{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(214,180,90,.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 2px 2px 0 rgba(0,0,0,.35);
  background: radial-gradient(120% 120% at 50% 20%, rgba(214,180,90,.08), rgba(0,0,0,.0) 55%),
              linear-gradient(135deg, var(--bjx-purple), var(--bjx-black));
  border-radius: 6px;
  transform: perspective(920px) rotateX(5deg);
  transform-origin: 50% 40%;
  min-height: 340px;
}

.bjx-stars{
  position:absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  opacity: .85;
  pointer-events: none; /* background only */
}

.bjx-vignette{
  position:absolute;
  inset: 0;
  background:
    radial-gradient(85% 80% at 50% 20%, rgba(0,0,0,0) 0%, rgba(0,0,0,.35) 70%, rgba(0,0,0,.6) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0px, rgba(255,255,255,.03) 1px, rgba(0,0,0,0) 3px, rgba(0,0,0,0) 6px);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.bjx-overlay{
  position: relative;
  padding: 14px 12px 12px;
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.bjx-row{ display:flex; flex-direction: column; gap: 8px; }

.bjx-label{
  font-weight: 800;
  letter-spacing: .9px;
  color: var(--bjx-gold2);
  text-shadow: 0 1px 0 rgba(0,0,0,.7);
  user-select: none;
}

.bjx-mid{
  display:flex;
  flex-direction: column;
  gap: 10px;
  align-items:center;
}

.bjx-status{
  width: 100%;
  text-align:center;
  padding: 6px 8px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(214,180,90,.35);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55);
  font-size: 12px;
  color: #f6e9c9;
}

.bjx-controls{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content:center;
}

@keyframes bjx-bob{
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-4px); }
  100% { transform: translateY(0px); }
}

/* Float the buttons like they're in water */
.bjx-controls .bjx-btn{
  animation: bjx-bob 2.8s ease-in-out infinite;
  will-change: transform;
}

/* Gentle stagger so they don't bob in sync */
.bjx-controls .bjx-btn:nth-child(1){ animation-delay: 0s; }
.bjx-controls .bjx-btn:nth-child(2){ animation-delay: .15s; }
.bjx-controls .bjx-btn:nth-child(3){ animation-delay: .3s; }
.bjx-controls .bjx-btn:nth-child(4){ animation-delay: .45s; }
.bjx-controls .bjx-btn:nth-child(5){ animation-delay: .6s; }

.bjx-btn{
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: .6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.18));
  color: #fff;
  border-top: 2px solid rgba(255,255,255,.35);
  border-left: 2px solid rgba(255,255,255,.25);
  border-right: 2px solid rgba(0,0,0,.6);
  border-bottom: 2px solid rgba(0,0,0,.65);
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(0,0,0,.7);
}

.bjx-btn:active{
  border-top: 2px solid rgba(0,0,0,.65);
  border-left: 2px solid rgba(0,0,0,.65);
  border-right: 2px solid rgba(255,255,255,.25);
  border-bottom: 2px solid rgba(255,255,255,.25);
}

.bjx-btn:disabled{
  opacity: .45;
  cursor: not-allowed;
}

.bjx-btn-ghost{
  background: transparent;
  border: 1px solid rgba(214,180,90,.35);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.45);
  font-weight: 700;
}

.bjx-hand{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.bjx-card{
  --rx: 0deg;
  --ry: 0deg;
  --rz: 0deg;
  --lift: 0px;
  width: 76px;
  height: 108px;
  border-radius: 8px;
  position: relative;
  transform-style: preserve-3d;
  transform: translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
  transition: transform 120ms ease;
  box-shadow:
    0 10px 18px rgba(0,0,0,.35),
    0 0 0 1px rgba(214,180,90,.30),
    inset 0 0 0 1px rgba(0,0,0,.55);
  user-select: none;
}

.bjx-card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 8px;
  background:
    radial-gradient(80% 80% at 20% 15%, rgba(255,223,135,.22), rgba(0,0,0,0) 55%),
    linear-gradient(145deg, rgba(255,255,255,.08), rgba(0,0,0,.25)),
    linear-gradient(135deg, var(--bjx-purple2), var(--bjx-black));
}

.bjx-card::after{
  content:"";
  position:absolute;
  inset: 6px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(255,223,135,.13) 0px, rgba(255,223,135,.13) 1px, rgba(0,0,0,0) 5px, rgba(0,0,0,0) 10px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0px, rgba(255,255,255,.04) 1px, rgba(0,0,0,0) 3px, rgba(0,0,0,0) 6px);
  mix-blend-mode: screen;
  opacity: .7;
  pointer-events:none;
}

.bjx-card .bjx-face{
  position:absolute;
  inset: 0;
  padding: 8px 8px 10px;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateZ(24px);
}

.bjx-corner{
  font-weight: 900;
  color: var(--bjx-gold2);
  text-shadow: 0 1px 0 rgba(0,0,0,.7);
  line-height: 1.05;
}

.bjx-suit{ font-size: 14px; }
.bjx-rank{ font-size: 16px; }

.bjx-center{
  display:grid;
  place-items: center;
  font-size: 26px;
  color: rgba(255,223,135,.92);
  text-shadow: 0 2px 0 rgba(0,0,0,.6);
}

.bjx-arcana{
  font-size: 10px;
  color: rgba(255,223,135,.85);
  letter-spacing: .6px;
  text-align: right;
  text-shadow: 0 1px 0 rgba(0,0,0,.75);
  opacity: .95;
}

.bjx-card.is-facedown::before{
  background:
    radial-gradient(80% 80% at 20% 15%, rgba(255,223,135,.10), rgba(0,0,0,0) 55%),
    repeating-linear-gradient(45deg, rgba(255,223,135,.18) 0px, rgba(255,223,135,.18) 2px, rgba(0,0,0,0) 2px, rgba(0,0,0,0) 6px),
    linear-gradient(135deg, #210b33, #06040a);
}

.bjx-card.is-facedown .bjx-face{ opacity: 0; }

.bjx-hint{
  text-align:center;
  font-size: 11px;
  color: rgba(255,223,135,.9);
  text-shadow: 0 1px 0 rgba(0,0,0,.8);
  opacity: .9;
  user-select:none;
}
