:root {
  --aero-blue-1: #bfe0fb;
  --aero-blue-2: #6fa8dc;
  --aero-blue-3: #2e6da4;
  --aero-blue-4: #0a3d91;
  --aero-titlebar-top: #4f9aeb;
  --aero-titlebar-mid: #1f6fd6;
  --aero-titlebar-bottom: #0a3d91;
  --aero-glass-fill: rgba(230, 244, 255, 0.55);
  --aero-glass-border: rgba(255, 255, 255, 0.85);
  --aero-glow: rgba(120, 190, 255, 0.55);
}

body {
  background-image: url("/static/img/aero/background.png");
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
  background-color: #6fa8dc;
}

.ie-window {
  max-width: 1080px;
  margin: 14px auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.5);
  background: #ece9d8;
}

.ie-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(to bottom, var(--aero-titlebar-top) 0%, var(--aero-titlebar-mid) 55%, var(--aero-titlebar-bottom) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -1px 0 rgba(0,0,0,0.2);
  position: relative;
}

.ie-titlebar::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(255,255,255,0));
  pointer-events: none;
}

.ie-titlebar-icon { width: 18px; height: 18px; position: relative; z-index: 1; }

.ie-titlebar-text {
  color: #fff;
  font-family: "Segoe UI", "PT Sans", Tahoma, sans-serif;
  font-size: 12px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.ie-titlebar-btns { display: flex; gap: 3px; position: relative; z-index: 1; }

.ie-cap-btn {
  width: 24px;
  height: 20px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

.ie-cap-btn:hover { background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(255,255,255,0.15)); }
.ie-cap-btn.close { background: linear-gradient(to bottom, #f5a5a0, #c8382c); border-color: rgba(255,200,195,0.7); }
.ie-cap-btn.close:hover { background: linear-gradient(to bottom, #ff8f88, #e0392c); }

.ie-menubar {
  display: flex;
  gap: 16px;
  padding: 3px 10px;
  background: #f5f4ea;
  border-bottom: 1px solid #c8c7ba;
  font-family: "Segoe UI", "PT Sans", Tahoma, sans-serif;
  font-size: 11px;
  color: #333;
}

.ie-menubar span { cursor: default; }
.ie-menubar span:hover { background: #e3e0c8; padding: 0 2px; margin: 0 -2px; }

.ie-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: linear-gradient(to bottom, #fdfdf8, #e9e7d8);
  border-bottom: 1px solid #c8c7ba;
}

.ie-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-family: "Segoe UI", "PT Sans", Tahoma, sans-serif;
  font-size: 11px;
  color: #24476b;
}

.ie-tool-btn img { width: 16px; height: 16px; }
.ie-icon-mirrored { transform: scaleX(-1); }
.ie-tool-btn:hover { background: linear-gradient(to bottom, #fff6d0, #ffe28a); box-shadow: 0 0 0 1px #e0b040 inset; }
.ie-tool-sep { width: 1px; align-self: stretch; background: #c8c7ba; margin: 2px 4px; }

.ie-addressbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #f5f4ea;
  border-bottom: 1px solid #c8c7ba;
}

.ie-addressbar img { width: 16px; height: 16px; flex-shrink: 0; }

.ie-addressbar input {
  flex: 1;
  height: 20px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  padding: 0 6px;
  font-size: 11px;
  font-family: "Segoe UI", "PT Sans", Tahoma, sans-serif;
  color: #333;
  background: #fff;
}

.ie-go-btn {
  height: 22px;
  padding: 0 10px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #fdfdf8, #d8d5c0);
  border: 1px solid #a9a58c;
  font-size: 11px;
  cursor: pointer;
}

.aero-page-body {
  background: #dfe5ea;
}

.panel {
  background: var(--aero-glass-fill);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--aero-glass-border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(20,60,110,0.18), inset 0 1px 0 rgba(255,255,255,0.8);
  overflow: hidden;
}

.panel-title {
  background: linear-gradient(to bottom, var(--aero-titlebar-top), var(--aero-titlebar-mid) 60%, var(--aero-titlebar-bottom));
  position: relative;
  border-radius: 7px 7px 0 0;
}

.panel-title::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), rgba(255,255,255,0));
  border-radius: 7px 7px 0 0;
}

.btn {
  font-family: "Segoe UI", "PT Sans", Tahoma, sans-serif;
  border-radius: 14px;
  background: linear-gradient(to bottom, #ffffff, #d8ecfc 45%, #a9d4f5 46%, #cfe9fb);
  border: 1px solid #7fb0dd;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(20,60,110,0.25);
  color: #1a3a5c;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: linear-gradient(to bottom, #ffffff, #eaf6ff 45%, #bfe0fa 46%, #ddf1fd);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 0 6px var(--aero-glow);
}

.btn:active {
  background: linear-gradient(to bottom, #a9d4f5, #d8ecfc);
  box-shadow: inset 0 1px 3px rgba(0,60,120,0.35);
}

.btn-primary {
  background: linear-gradient(to bottom, #8fc4f7, #2e6da4 45%, #1a4d80 46%, #2e79b5);
  border: 1px solid #14396b;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,20,50,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 1px 3px rgba(10,40,80,0.4);
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #a7d6ff, #3f83c2 45%, #235da0 46%, #3f8fcc);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 0 8px var(--aero-glow);
}

.modal-box {
  background: var(--aero-glass-fill);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,10,30,0.5), inset 0 1px 0 rgba(255,255,255,0.8);
  overflow: hidden;
}

.modal-titlebar {
  background: linear-gradient(to bottom, var(--aero-titlebar-top), var(--aero-titlebar-mid) 55%, var(--aero-titlebar-bottom));
  position: relative;
  border-radius: 9px 9px 0 0;
}

.modal-titlebar::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), rgba(255,255,255,0));
}

.modal-titlebar .close-x {
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, #f5a5a0, #c8382c);
  border: 1px solid rgba(255,200,195,0.7);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.modal-content { background: transparent; }

.ie-window .site-frame {
  max-width: none;
  margin: 0;
  box-shadow: none;
  min-height: auto;
}

.modal-overlay {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ============================================================
   7-Aero theme layer (buttons + window chrome)
   Colours/gradients ported from the 7-Aero-Stylesheet reference
   (aero.css: button / .window / .title-bar-controls rules).
   Loaded last, so it overrides the flatter rules above.
   ============================================================ */

.btn,
button,
input[type="submit"],
input[type="button"] {
  font-family: "Segoe UI", "PT Sans", Tahoma, sans-serif;
  border: none;
  outline: solid 1px #757575;
  box-shadow: inset 0 0 0 1px #fcfcfc;
  color: #000;
  border-radius: 3px;
  padding: 3px 12px;
  text-align: center;
  background: linear-gradient(0deg, #cfcfcf 0%, #dbdbdb 49%, #ebebeb 49%, #fcfcfc 100%);
  text-shadow: none;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  outline: solid 1px #3c7fb1;
  background: linear-gradient(0deg, #a7d9f5 0%, #bce5fc 49%, #d9f0fc 49%, #eaf6fd 100%);
  box-shadow: inset 0 0 0 1px #fcfcfc;
}

.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active {
  outline: solid 1px #2c628b;
  background: linear-gradient(0deg, #68b2da 0%, #98d1ef 49%, #c4e5f6 49%, #e5f4fc 100%);
  box-shadow: inset 0 0 0 2px #86c6e8;
}

.btn-primary {
  outline: solid 1px #3c7fb1;
  background: linear-gradient(0deg, #a7d9f5 0%, #bce5fc 49%, #d9f0fc 49%, #eaf6fd 100%);
  color: #06263f;
}

.btn-primary:hover {
  outline: solid 1px #2c628b;
  background: linear-gradient(0deg, #68b2da 0%, #98d1ef 49%, #c4e5f6 49%, #e5f4fc 100%);
}

.btn-primary:active {
  background: linear-gradient(0deg, #3f8fc4 0%, #68b2da 49%, #98d1ef 49%, #c4e5f6 100%);
  box-shadow: inset 0 0 0 2px #86c6e8;
}

/* "Windows" — modal popups get the genuine 7-Aero glass treatment:
   translucent blurred body + glossy diagonal sheen + hairline outline. */
.modal-box {
  background: #b6d8fb2f
    linear-gradient(0deg, rgba(231,240,255,0) 0%, rgba(253,254,255,0) 64%, rgba(255,255,255,1) 65%, rgba(255,255,255,1) 65%, rgba(231,240,255,0) 90%);
  background-color: #46a2ff5e;
  border: none;
  outline: solid 1px #000000;
  border-radius: 5px;
  padding: 5px;
  padding-top: 0;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 3px 10px #000000, inset 0 0 0 1px #fcfcfc;
}

.modal-titlebar {
  background: linear-gradient(0deg, rgba(114,138,169,1) 0%, rgba(132,132,132,0.475) 50%, rgba(174,174,174,0.494) 50%, rgba(184,197,211,1) 100%);
  color: #fff;
  padding: 5px 6px;
  margin: 0 -5px;
  font-size: 12px;
  text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff;
  border-radius: 5px 5px 0 0;
}

.modal-titlebar::after { content: none; }

.modal-titlebar .close-x {
  position: relative;
  margin-left: auto;
  width: 27px;
  height: 20px;
  border: none;
  border-radius: 3px;
  outline: solid 1px #757575;
  box-shadow: inset 0 0 0 1px #fcfcfc;
  background: linear-gradient(0deg, rgba(193,127,110,1) 0%, rgba(171,71,50,1) 49%, rgba(213,131,111,1) 49%, rgba(239,177,161,1) 100%);
  font-size: 0;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-titlebar .close-x::before {
  content: "";
  width: 11px;
  height: 8px;
  background: url("/static/img/aero7/X.svg") no-repeat center / contain;
}

.modal-titlebar .close-x:hover {
  outline: solid 1px #000000;
  background: linear-gradient(0deg, rgba(244,230,121,1) 0%, rgba(210,36,5,1) 28%, rgba(171,34,12,1) 49%, rgba(237,108,86,1) 49%, rgba(249,155,139,1) 100%);
}

/* The window frame above is the translucent/blurred part — the actual
   content area sits on a plain, readable, opaque backing, exactly like
   .window-body in the 7-Aero reference (only the chrome is glass). */
.modal-content {
  background-color: #f0eff2;
  border-radius: 0 0 3px 3px;
}

/* Panels double as the site's "windows" — give the title strip the same
   glossy metal-blue look as the 7-Aero title bar. */
.panel-title {
  background: linear-gradient(to bottom, var(--aero-titlebar-top), var(--aero-titlebar-mid) 55%, var(--aero-titlebar-bottom));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.emoji-icon { width: 20px; height: 20px; vertical-align: middle; }

.emoji-picker-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.emoji-picker-popup {
  position: absolute;
  background: #fff;
  border: 1px solid #7fb0dd;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  width: 200px;
  z-index: 100;
}

.emoji-picker-popup img {
  width: 26px;
  height: 26px;
  cursor: pointer;
  border-radius: 3px;
  padding: 2px;
}

.emoji-picker-popup img:hover { background: #dbeeff; }


/* =================== Imported: real Aero glass window system (pravki/window.css) =================== */
/* ---------------------------------------------------------------
 *  Aero Glass Window — self-contained, zero dependencies.
 *  Just copy this CSS and the matching HTML; it works on any
 *  background. Tweak the custom properties on .aero-window to taste.
 *  --------------------------------------------------------------- */

.aero-window {
    --hue: 213;
    --radius: 8px;
    --glass-opacity: 0.6;
    /* Alpha is baked into the tint so the colour stays vivid while the gloss
     *    highlights (layered on top) render at full strength. */
    --glass: hsl(var(--hue) 65% 52% / var(--glass-opacity));
    --frame: 9px;

    position: relative;
    isolation: isolate;
    width: 520px;
    border-radius: var(--radius);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, system-ui, sans-serif;
    font-size: 12px;
    color: #1b1b1b;
    box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.5),
    0 0 26px hsl(var(--hue) 90% 58% / 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.95),
    inset 0 0 30px rgba(255, 255, 255, 0.28);
}

/* Colored glass sheet — vivid tint + specular gloss + diagonal sheen */
.aero-window::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: var(--radius);
    background:
    /* diagonal reflection streak */
    linear-gradient(104deg, transparent 26%, rgba(255, 255, 255, 0.32) 42%, rgba(255, 255, 255, 0.05) 50%, transparent 64%),
    /* bright top specular highlight */
    linear-gradient(to bottom, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.2) 42%, rgba(255, 255, 255, 0) 54%),
    /* soft vertical shade for depth */
    linear-gradient(to bottom, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.12)),
    /* colored glass tint */
    var(--glass);
}

/* Frost whatever sits behind the window — the effect that makes it glass */
.aero-window::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    border-radius: var(--radius);
    -webkit-backdrop-filter: blur(18px) saturate(1.9);
    backdrop-filter: blur(18px) saturate(1.9);
}

/* ---- Title bar ---- */
.aero-window .aero-titlebar {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    padding: 0 6px;
    min-height: 30px;
    border-radius: var(--radius) var(--radius) 0 0;
    /* faint self-contained brushed sheen */
    background: repeating-linear-gradient(
        108deg,
        rgba(255, 255, 255, 0.05) 0 1px,
                                          transparent 1px 5px
    );
}

.aero-window .aero-titlebar-icon {
    width: 16px;
    height: 16px;
    margin-top: 7px;
    flex: none;
}

.aero-window .aero-titlebar-text {
    flex: 1;
    min-width: 0;
    margin-top: 7px;
    line-height: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0b0b0b;
    /* white halo keeps the caption legible over any glass color */
    text-shadow: 0 0 4px #fff, 0 0 4px #fff, 0 0 7px #fff, 0 0 10px #fff;
}

/* ---- Caption buttons (capsule hanging from the top edge) ---- */
.aero-window .aero-caption {
    display: flex;
    flex: none;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-top: 0;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    1px 0 0 rgba(255, 255, 255, 0.7),
    -1px 0 0 rgba(255, 255, 255, 0.7);
}

.aero-window .aero-caption button {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 29px;
    height: 20px;
    margin: 0;
    padding: 0;
    border: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.28);
    color: rgba(0, 0, 0, 0.68);
    cursor: pointer;
    background: linear-gradient(
        rgba(255, 255, 255, 0.55),
                                rgba(255, 255, 255, 0.28) 46%,
                                rgba(0, 0, 0, 0.08) 50%,
                                rgba(0, 0, 0, 0.08) 78%,
                                rgba(255, 255, 255, 0.4)
    );
    transition: box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.aero-window .aero-caption button:last-child {
    border-right: 0;
    min-width: 46px;
}

/* Glyphs drawn in pure CSS — no icon font, no images */
.aero-window .aero-caption .min::before {
    content: "";
    width: 10px;
    height: 2px;
    margin-top: 6px;
    background: currentColor;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.aero-window .aero-caption .max::before {
    content: "";
    width: 11px;
    height: 9px;
    border: 1px solid currentColor;
    border-top-width: 2px;
}
.aero-window .aero-caption .close::before {
    content: "\2715";
    font-size: 11px;
    line-height: 1;
}

/* Hover / active — cyan Aero glow for min & max */
.aero-window .aero-caption button:not(.close):hover {
    color: #fff;
    background:
    radial-gradient(120% 90% at 50% 130%, #3fd0e6, transparent 60%),
    linear-gradient(#c3e3f4 48%, #1f79b0 50%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 8px 2px rgba(93, 196, 240, 0.85);
}
.aero-window .aero-caption button:not(.close):active {
    background:
    radial-gradient(120% 90% at 50% 130%, #12e6e6, transparent 60%),
    linear-gradient(#8fb3c9 48%, #0d3350 50%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* Close button — red */
.aero-window .aero-caption .close {
    color: #fff;
    background:
    radial-gradient(circle at -30% 50%, rgba(0, 0, 0, 0.4) 6%, transparent 55%),
    radial-gradient(circle at 130% 50%, rgba(0, 0, 0, 0.4) 6%, transparent 55%),
    linear-gradient(#e6a99f, #d16b5b 48%, #cf4b34 50%, #d8654c);
}
.aero-window .aero-caption .close:hover {
    background:
    radial-gradient(120% 90% at 50% 130%, #ff9a86, transparent 60%),
    linear-gradient(#ffc0b5 48%, #d40a0a 50%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 8px 2px rgba(255, 80, 48, 0.85);
}
.aero-window .aero-caption .close:active {
    background:
    radial-gradient(120% 90% at 50% 130%, #ff3a1a, transparent 60%),
    linear-gradient(#c94a3a 48%, #8b0000 50%);
}

/* ---- Menu bar ---- */
.aero-window .aero-menubar {
    display: flex;
    align-items: stretch;
    margin: 0 var(--frame);
    background: linear-gradient(#ffffff 0%, #eef2f9 45%, #dbe3f1 55%, #e9eef8 100%);
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-bottom: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.aero-window .aero-menubar span {
    padding: 4px 10px;
    cursor: default;
    color: #1b1b1b;
}
.aero-window .aero-menubar span:hover {
    background: linear-gradient(#eaf4fd, #cfe8fb);
    box-shadow: inset 0 0 0 1px #b5dcfb;
    border-radius: 3px;
}

/* ---- Content area ---- */
.aero-window .aero-body {
    margin: 0 var(--frame);
    padding: 12px;
    min-height: 318px;
    background: #f0f0f0;
    color: #1b1b1b;
    border: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    white-space: pre-wrap;
    overflow: auto;
}
.aero-window .aero-body:last-child {
    margin-bottom: var(--frame);
    border-radius: 0 0 3px 3px;
}

/* ---- Status bar ---- */
.aero-window .aero-statusbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 var(--frame) var(--frame);
    padding: 3px 8px;
    min-height: 24px;
    font-size: 11px;
    color: #1b1b1b;
    background: linear-gradient(#f7f9fc, #e4e9f2);
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-top: 0;
    border-radius: 0 0 3px 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.aero-window .aero-statusbar .aero-status-grow {
    flex: 1;
}
/* Resize gripper (bottom-right dots) */
.aero-window .aero-statusbar .aero-gripper {
    width: 12px;
    height: 12px;
    background:
    radial-gradient(circle 1px at 2px 10px, rgba(0, 0, 0, 0.35) 99%, transparent),
    radial-gradient(circle 1px at 6px 10px, rgba(0, 0, 0, 0.35) 99%, transparent),
    radial-gradient(circle 1px at 10px 10px, rgba(0, 0, 0, 0.35) 99%, transparent),
    radial-gradient(circle 1px at 6px 6px, rgba(0, 0, 0, 0.35) 99%, transparent),
    radial-gradient(circle 1px at 10px 6px, rgba(0, 0, 0, 0.35) 99%, transparent),
    radial-gradient(circle 1px at 10px 2px, rgba(0, 0, 0, 0.35) 99%, transparent);
}

/* ---- Inactive (unfocused) window ---- */
.aero-window.inactive::before {
    background:
    linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08) 44%, rgba(255, 255, 255, 0) 46%),
    hsl(var(--hue) 14% 84%);
    opacity: 0.82;
}
.aero-window.inactive .aero-titlebar-text {
    color: #5a5a5a;
    text-shadow: 0 0 4px #fff, 0 0 6px #fff;
}


/* =================== Imported: Frutiger Aero button (pravki/button.css) =================== */
/* Authentic Frutiger Aero Button CSS */
.frutiger-aero-button {
  /* OKLCH Color System for accurate colors */
  --hue: 200;
  --sat: 0.2;
  --glow-intensity: 0.7;

  /* Color Variables */
  --fg: oklch(15% calc(var(--sat) * 0.5) var(--hue));
  --bg: oklch(75% var(--sat) var(--hue) / 0.8);
  --bg-dark: oklch(45% var(--sat) var(--hue) / 0.75);
  --bottom-glow: radial-gradient(
    farthest-corner at bottom center,
    rgba(255, 255, 255, var(--glow-intensity)),
    transparent
  );

  /* Base Styling */
  background-color: var(--bg);
  background:
    var(--bottom-glow),
    linear-gradient(to bottom, var(--bg-dark), var(--bg));

  border: 1px solid var(--bg);
  border-radius: 9999px;

  /* Shadows and Effects */
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.4);

  /* Typography */
  color: var(--fg);
  font-family: "Lucida Grande", "Lucida Sans Unicode", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  text-shadow: 0 2px 0.5em rgba(0, 0, 0, 0.2);

  /* Layout */
  cursor: pointer;
  position: relative;
  transition: all 300ms ease;

  /* Prevent text selection */
  user-select: none;
  -webkit-user-select: none;
}

/* Diagonal Glass Shine Sweep — the classic Web 2.0 glare streak */
.frutiger-aero-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 45%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 70%
  );
  border-radius: inherit;
  pointer-events: none;
}

/* Top Highlight Effect */
.frutiger-aero-button::after {
  content: "";
  position: absolute;
  top: 4%;
  left: 0.75em;
  width: calc(100% - 1.5em);
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.1)
  );
  border-radius: inherit;
  transition: background 400ms ease;
  pointer-events: none;
}

/* Hover State */
.frutiger-aero-button:hover,
.frutiger-aero-button:focus {
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

/* Active State */
.frutiger-aero-button:active {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transform: translateY(1px);
}

/* Size Variations */
.frutiger-aero-button.small {
  padding: 0.5em 1.5em;
  font-size: 0.875rem;
}

.frutiger-aero-button.medium {
  padding: 0.75em 2em;
  font-size: 1rem;
}

.frutiger-aero-button.large {
  padding: 1em 3em;
  font-size: 1.125rem;
}


/* ---- Adjustments so the aero-window system works for our popups (report/error windows) ---- */
.aero-error-overlay { z-index: 3000; }
.aero-window.aero-error-window { width: 420px; }
.aero-window .aero-error-body {
  min-height: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  white-space: normal;
}
.aero-error-icon { width: 32px; height: 32px; flex-shrink: 0; }
.aero-error-text { flex: 1; line-height: 1.4; }
.aero-titlebar-icon { width: 16px; height: 16px; object-fit: contain; }

/* ---- Win / prize window (Minesweeper and future games) ---- */
.aero-win-overlay { z-index: 3000; }
.aero-window.aero-win-window { width: 340px; }
.aero-window .aero-win-body {
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 16px 16px 14px;
}
.aero-win-title {
  color: #d31212;
  font-weight: bold;
  font-size: 1.15rem;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  line-height: 1.3;
}
.aero-win-subtitle {
  color: #2b3a4a;
  font-size: 0.92rem;
}
.aero-win-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Icons in front of our existing flat modal-titlebars (report modal, track picker...) */
.modal-titlebar-icon { width: 16px; height: 16px; object-fit: contain; margin-right: 6px; vertical-align: middle; }

/* ---- Sidemenu links styled as real Frutiger Aero glass buttons (overrides style.css) ---- */
.sidemenu { padding: 6px; display: flex; flex-direction: column; gap: 4px; }

.sidemenu li a {
  --hue: 205;
  --sat: 0.16;
  --bg: oklch(88% var(--sat) var(--hue) / 0.9);
  --bg-dark: oklch(66% var(--sat) var(--hue) / 0.85);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 16px;
  border: 1px solid oklch(55% var(--sat) var(--hue) / 0.6);
  background:
    radial-gradient(farthest-corner at bottom center, rgba(255,255,255,0.7), transparent),
    linear-gradient(to bottom, var(--bg-dark), var(--bg));
  box-shadow: 0 2px 3px rgba(20,50,90,0.25);
  color: #163150;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  overflow: hidden;
  transition: all 200ms ease;
  border-bottom: 1px solid oklch(55% var(--sat) var(--hue) / 0.6);
}

.sidemenu li a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 45%, rgba(255,255,255,0.05) 55%, transparent 70%);
  pointer-events: none;
}

.sidemenu li a img { width: 18px; height: 18px; position: relative; z-index: 1; }

.sidemenu li a:hover {
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(20,50,90,0.35), 0 0 10px var(--aero-glow);
  transform: translateY(-1px);
}

.sidemenu li a:active { transform: translateY(1px); box-shadow: inset 0 1px 3px rgba(0,40,90,0.3); }

.sidemenu li a.active {
  --bg: oklch(72% 0.14 210 / 0.95);
  --bg-dark: oklch(48% 0.16 215 / 0.9);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,20,50,0.6);
  border-color: oklch(35% 0.16 215 / 0.9);
}

/* ============================================================
   MSN Messenger-style chat UI (contact list + conversation window)
   Built on top of the existing .aero-window glass chrome.
   ============================================================ */

.msn-layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.aero-window.msn-contacts { width: 290px; }
.aero-window.msn-chat { flex: 1; min-width: 360px; width: auto; }

.msn-contacts .aero-body,
.msn-chat .aero-body {
  margin: 0 var(--frame) var(--frame);
  min-height: auto;
  padding: 0;
  white-space: normal;
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 540px;
  overflow: hidden;
}

/* ---- Contact list window ---- */
.msn-search-row { padding: 8px; border-bottom: 1px solid #c8d3e0; background: #f7faff; }
.msn-search-row input {
  width: 100%;
  border: 1px solid #a9b7c6;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 12px;
  box-sizing: border-box;
}

.msn-groups { flex: 1; overflow-y: auto; background: #fff; }

.msn-group-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  cursor: pointer;
  background: linear-gradient(#f5f8fc, #e6edf7);
  border-bottom: 1px solid #dbe3f1;
  font-weight: bold;
  color: #2b4b78;
  user-select: none;
}
.msn-group-header:hover { background: linear-gradient(#eaf4fd, #d9ecfc); }
.msn-group-header .arrow {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 9px;
  color: #6a86ad;
}
.msn-group.collapsed .arrow { transform: rotate(-90deg); }
.msn-group.collapsed .msn-group-body { display: none; }
.msn-group-count { margin-left: auto; font-weight: normal; color: #8296b3; font-size: 11px; }

.msn-contact-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f3f8;
}
.msn-contact-row:hover { background: #eaf4fd; }
.msn-contact-row.active { background: #d9ecfc; }
.msn-contact-row img.msn-avatar { width: 24px; height: 24px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
.msn-contact-row.offline img.msn-avatar { filter: grayscale(0.85) brightness(0.92); opacity: 0.75; }
.msn-contact-info { flex: 1; min-width: 0; }
.msn-contact-name { font-size: 12px; color: #1b1b1b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msn-contact-row.offline .msn-contact-name { color: #8b95a3; }
.msn-contact-status { font-size: 11px; color: #7a8aa0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msn-unread-badge {
  background: #d6352a;
  color: #fff;
  border-radius: 8px;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  flex-shrink: 0;
}
.msn-empty-hint { padding: 16px 10px; color: #8b95a3; text-align: center; font-size: 12px; }

/* ---- Chat window ---- */
.msn-chat-header-sub {
  display: block;
  font-size: 10.5px;
  font-weight: normal;
  color: #234;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msn-chat .aero-titlebar-text { display: flex; flex-direction: column; gap: 1px; }

.msn-lock-badge { margin-left: auto; font-size: 13px; opacity: 0.85; position: relative; z-index: 1; }

.msn-log {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.4;
}
.msn-log-empty { color: #99a5b8; text-align: center; padding: 30px 10px; }
.msn-msg { margin-bottom: 8px; }
.msn-msg-name { font-weight: bold; }
.msn-msg-name.me { color: #1b4fd6; }
.msn-msg-name.them { color: #b6231e; }
.msn-msg-text { margin-left: 12px; white-space: pre-wrap; word-break: break-word; }
.msn-msg-failed { color: #b6231e; font-style: italic; margin-left: 12px; }
.msn-msg-photo { max-width: 220px; max-height: 220px; border-radius: 3px; border: 1px solid #c8d3e0; margin-left: 12px; cursor: zoom-in; display: block; }
.msn-day-sep { text-align: center; color: #9aa6b8; font-size: 11px; margin: 10px 0 6px; }

.msn-input-area { border-top: 1px solid #c8d3e0; background: #eef2f8; }
.msn-emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 6px;
  border-bottom: 1px solid #dbe3f1;
  background: #fff;
}
.msn-emoji-row span { cursor: pointer; padding: 2px 3px; border-radius: 3px; font-size: 15px; }
.msn-emoji-row span:hover { background: #d9ecfc; }
.msn-input-row { display: flex; align-items: flex-end; gap: 6px; padding: 8px; }
.msn-input-row textarea {
  flex: 1;
  resize: none;
  border: 1px solid #a9b7c6;
  border-radius: 3px;
  padding: 6px 8px;
  font-size: 12.5px;
  font-family: inherit;
  max-height: 80px;
  box-sizing: border-box;
}
.msn-unlock-box { padding: 20px; text-align: center; }
.msn-unlock-box input { width: 100%; max-width: 240px; margin: 8px 0; box-sizing: border-box; padding: 5px 8px; border: 1px solid #a9b7c6; border-radius: 3px; }
