/* OTIMIZAÇÃO MÁXIMA: não adicione comentários; minimize cpu e ram; não quebre funcionalidade ou aparência */
:root {
  --bg: #0d0e12; --s1: rgba(13,14,18,0.35); --s2: rgba(18,20,26,0.38); --s3: rgba(25,28,36,0.42);
  --bd: rgba(0,255,255,0.08); --bd2: rgba(0,255,255,0.2); --tx: #e2e8f0; --tx2: #8892a4; --tx3: #555f72;
  --p: #00FFFF; --pt: rgba(0,255,255,0.15); --dn: #e05252; --ok: #4caf7d; --th: 44px; --tk: 48px; --r: 12px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
  font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--tx);
  overflow: hidden; height: 100vh; user-select: none; color-scheme: dark;
}

.glass {
  background: var(--s1); backdrop-filter: blur(10px) saturate(150%); -webkit-backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid var(--bd); contain: content;
}
.glass-btn {
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--bd);
}
.glass-btn:hover { background: rgba(255,255,255,0.06); border-color: var(--bd2); }

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.9) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeSlideDown {
  0%   { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideUp {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeScaleIn {
  0%   { opacity: 0; transform: scale(0.7) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}



#topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--th);
  background: transparent;
  display: flex; align-items: center;
  padding: 0 16px;
  z-index: 2000;
  pointer-events: none;
  animation: fadeSlideDown .6s cubic-bezier(0.175,0.885,0.32,1.275) both;
}
#topbar-left { flex: 1; pointer-events: all; }
#os-logo {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  color: rgba(85,95,114,0.6); text-transform: uppercase;
  transition: color .3s;
}
#os-logo:hover { color: var(--tx2); }
#topbar-right { display: flex; gap: 8px; pointer-events: all; }
.tb-btn {
  width: 32px; height: 32px; border: none;
  background: rgba(255,255,255,0.02); color: var(--tx3);
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s cubic-bezier(0.175,0.885,0.32,1.275);
  backdrop-filter: blur(8px); border: 1px solid rgba(0,255,255,0.08);
  opacity: 0.5;
}
.tb-btn svg { width: 16px; height: 16px; fill: currentColor; }
.tb-btn:hover { background: rgba(255,255,255,0.08); color: var(--tx); border-color: var(--bd2); transform: translateY(-2px) scale(1.08); opacity: 1; }
.tb-btn.danger:hover { background: rgba(224,82,82,.15); color: var(--dn); border-color: rgba(224,82,82,.3); }


#desk {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; z-index: 1;
}

#wallpaper {
  position: fixed; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}


#desktop-widget {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: -60px;
  pointer-events: none;
  animation: fadeSlideUp .7s .15s cubic-bezier(0.175,0.885,0.32,1.275) both;
}
#search-form { pointer-events: all; width: 600px; max-width: 90vw; }
#search-bar {
  display: flex; align-items: center;
  background: rgba(13, 14, 18, 0.3);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px; overflow: hidden;
  transition: all .35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
#search-bar:focus-within {
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 4px var(--bd);
  transform: translateY(-2px);
}
#engine-select {
  border: none; background: transparent;
  color: var(--p); font-weight: 600;
  font-size: .9rem; font-family: inherit;
  padding: 0 12px 0 20px;
  cursor: pointer; outline: none;
  height: 52px;
  border-right: 1px solid var(--bd);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238892a4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 18px;
  padding-right: 32px;
}
#engine-select option { background: #1c1f26; color: var(--tx); }
#search-input {
  flex: 1; border: none; background: transparent;
  color: var(--tx); font-size: 1.05rem; font-family: inherit;
  padding: 0 20px; height: 52px; outline: none;
}
#search-input::placeholder { color: var(--tx3); font-weight: 400; }

#tool-icons {
  pointer-events: all;
  display: flex; gap: 14px; align-items: center;
}
.tool-icon-btn {
  width: 76px; height: 76px;
  background: rgba(13, 14, 18, 0.25);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  transition: all .35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  opacity: 0;
  animation: fadeScaleIn .5s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
}
.tool-icon-btn:nth-child(1) { animation-delay: .3s; }
.tool-icon-btn:nth-child(2) { animation-delay: .42s; }
.tool-icon-btn:nth-child(3) { animation-delay: .54s; }
.tool-icon-btn:nth-child(4) { animation-delay: .66s; }
.tool-icon-btn:nth-child(5) { animation-delay: .78s; }
.tool-icon-btn:nth-child(6) { animation-delay: .90s; }
.tool-icon-btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--icon-color, var(--p));
  opacity: 0; transition: opacity .3s; border-radius: inherit;
}
.tool-icon-btn:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 16px 32px rgba(0,0,0,.4), 0 0 0 1px var(--bd2);
  background: rgba(13,14,18,0.45);
}
.tool-icon-btn:active { transform: translateY(-2px) scale(0.97); }
.tool-icon-btn:hover::before { opacity: .1; }
.tool-icon-btn svg { width: 30px; height: 30px; fill: var(--icon-color, var(--tx2)); position: relative; z-index: 1; transition: transform .3s; }
.tool-icon-btn:hover svg { transform: scale(1.15) rotate(-5deg); }
.tool-icon-label { font-size: .68rem; color: var(--tx3); font-weight: 500; letter-spacing: .03em; position: relative; z-index: 1; transition: color .3s; }
.tool-icon-btn:hover .tool-icon-label { color: var(--tx); }
.tool-icon-placeholder {
  display: inline-block; width: 76px; height: 76px;
  border: 1px dashed rgba(255,255,255,0.05);
  border-radius: 20px; opacity: .2;
}
#popups {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  contain: layout;
}
.popup {
  position: fixed;
  background: var(--s2); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--bd); border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column; min-width: 340px; min-height: 260px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3); contain: size layout;
  transition: opacity .2s, transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  pointer-events: all; will-change: transform;
}
.popup.minimized { transform: scale(0.9) translateY(40px); opacity: 0; pointer-events: none; }
.popup.focused { border-color: rgba(0,255,255,0.2); box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 20px rgba(0,255,255,0.04); }
.popup.dragging { box-shadow: 0 30px 80px rgba(0,0,0,0.7); opacity: .95; transform: scale(1.01); }
.ph {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  height: 38px; padding: 0 0 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: grab; border-bottom: 1px solid rgba(255,255,255,0.06);
  user-select: none; flex-shrink: 0;
}
.ph:active { cursor: grabbing; }
.ptitle { flex: 1; font-size: .88rem; font-weight: 600; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 12px; }
.pbtns.win-style { display: flex; height: 100%; }
.pbtns.win-style .pbtn {
  width: 44px; height: 100%; border: none; border-radius: 0;
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.pbtns.win-style .pbtn svg { width: 10px; height: 10px; fill: var(--tx); transition: fill .15s; }
.pbtns.win-style .pbtn:hover { background: rgba(255,255,255,0.1); }
.pbtns.win-style .pc:hover { background: #e81123; }
.pbtns.win-style .pc:hover svg { fill: #fff; }
.pop-content { flex: 1; overflow-y: auto; background: transparent; }
.popup iframe { flex: 1; width: 100%; border: none; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%23222"><circle cx="50" cy="50" r="10"/></svg>') center/40px no-repeat; background-color: #fff; }
.rh {
  position: absolute; right: 0; bottom: 0;
  width: 20px; height: 20px; cursor: se-resize; z-index: 5;
}
.rh::after {
  content: ''; position: absolute; right: 4px; bottom: 4px;
  width: 8px; height: 8px;
  border-right: 2px solid var(--tx2); border-bottom: 2px solid var(--tx2);
  border-radius: 1px; opacity: .4; transition: all .2s;
}
.rh:hover::after { border-color: var(--p); opacity: 1; transform: scale(1.1); }


#taskbar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--tk);
  background: rgba(13, 14, 18, 0.3);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-right: 1px solid rgba(0,255,255,0.08);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 10px;
  z-index: 2000;
  box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  transform: translateX(-101%);
  transition: transform .35s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}
#taskbar.tb-visible { transform: translateX(0); }
#taskbar-trigger {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 12px; z-index: 2001;
  pointer-events: auto;
}
#start-btn {
  background: rgba(255,255,255,0.06); color: var(--tx);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  width: 36px; height: 36px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 4px;
}
#start-btn svg { width: 18px; height: 18px; fill: currentColor; }
#start-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); transform: translateX(2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
#win-list { flex: 1; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; scrollbar-width: none; width: 100%; padding: 0 4px; }
#win-list::-webkit-scrollbar { width: 0; }
.win-btn {
  background: transparent; color: var(--tx2);
  border: 1px solid transparent; border-radius: 8px;
  padding: 0 8px; width: 100%; height: 38px; cursor: pointer;
  font-size: .85rem; font-weight: 500; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-overflow: ellipsis;
  transition: all .2s; position: relative;
}
.win-btn:hover { background: rgba(255,255,255,0.05); color: var(--tx); border-color: rgba(255,255,255,0.1); }
.win-btn.active { background: rgba(255,255,255,0.1); color: var(--tx); border-color: rgba(255,255,255,0.2); }
.win-btn.active::after { content: ''; position: absolute; left: -1px; top: 20%; bottom: 20%; width: 2px; background: var(--p); border-radius: 2px; }
#tray { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
#clock {
  color: var(--tx2); font-size: .82rem; text-align: center;
  padding: 6px 4px; border-radius: 8px;
  cursor: default; user-select: none; line-height: 1.3;
  transition: all .2s; width: 100%;
}
#clock:hover { background: rgba(255,255,255,0.06); color: var(--tx); }
#ct { font-weight: 600; display: block; } #cd { font-size: .75em; opacity: .8; display: block; }
#smenu {
  position: fixed; left: calc(var(--tk) + 8px); bottom: 10px;
  width: 280px; max-height: calc(100vh - 40px);
  background: rgba(13, 14, 18, 0.35); border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.2);
  z-index: 1999; display: none; flex-direction: column;
  overflow-y: auto; opacity: 0; transform: translateY(20px) scale(0.95);
  transform-origin: bottom left; transition: all .35s cubic-bezier(0.175, 0.885, 0.32, 1.25);
  margin-bottom: 8px; padding: 4px;
}
#smenu.open { display: flex; opacity: 1; transform: translateY(0) scale(1); }
.sm-sec { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sm-sec:last-child { border: none; }
.sm-sec h4 {
  color: var(--tx3); margin: 6px 14px 8px;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
}
.sm-item {
  width: 100%; text-align: left; padding: 10px 14px;
  background: transparent; border: none; color: var(--tx2); border-radius: 8px;
  font-size: .92rem; font-family: inherit; font-weight: 500; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; gap: 12px;
}
.sm-item svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; opacity: .7; transition: transform .2s; }
.sm-item:hover { background: rgba(255,255,255,0.06); color: var(--tx); transform: translateX(2px); }
.sm-item:hover svg { opacity: 1; transform: scale(1.1); color: var(--p); }


.ctx {
  position: fixed; background: rgba(13, 14, 18, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0,255,255,0.1); border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 9999; display: none; flex-direction: column;
  padding: 6px; min-width: 180px;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.citem {
  padding: 8px 12px; color: var(--tx3); border-radius: 6px;
  font-size: .88rem; font-weight: 500; cursor: pointer; transition: all .2s;
}
.citem:hover { background: rgba(255,255,255,0.06); color: var(--tx); }


.mbg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: none; align-items: center; justify-content: center;
  z-index: 9998; opacity: 0; transition: opacity .3s;
}
.mbg.open { display: flex; opacity: 1; }
.mbox {
  background: rgba(13, 14, 18, 0.45); border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: 16px; padding: 28px;
  width: 90%; max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  transform: scale(0.92) translateY(24px); opacity: 0; transition: all .45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mbg.open .mbox { transform: scale(1) translateY(0); opacity: 1; }
.mbox h3 { color: var(--tx); margin-bottom: 24px; font-size: 1.2rem; font-weight: 600; text-align: center; }
.mbox label { display: block; font-size: .82rem; color: var(--tx3); margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.mbox input {
  width: 100%; padding: 12px 14px; margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  background: rgba(0,0,0,0.2); color: var(--tx);
  font-size: .95rem; font-family: inherit; transition: all .2s;
}
.mbox input:focus { border-color: rgba(91,141,239,0.5); background: rgba(0,0,0,0.4); outline: none; box-shadow: 0 0 0 3px rgba(91,141,239,0.2); }
.macts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.bcnl, .bok { padding: 10px 18px; border-radius: 8px; font-weight: 600; transition: all .2s; cursor: pointer; }
.bcnl { color: var(--tx3); } .bcnl:hover { color: var(--tx); background: rgba(255,255,255,0.1); }
.bok { background: var(--p); color: #fff; border-color: var(--p); box-shadow: 0 4px 12px rgba(91,141,239,0.3); }
.bok:hover { background: #4a7be0; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(91,141,239,0.5); }


#notifs {
  position: fixed; top: 60px; right: 20px;
  z-index: 99999; display: flex; flex-direction: column;
  gap: 12px; max-width: 280px;
}
.notif {
  background: rgba(13, 14, 18, 0.4); backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 12px 16px; font-size: .88rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  animation: fadeSlideDown .35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.notif.ok { border-left: 4px solid var(--ok); border-color: rgba(76,175,125,0.3); }
.notif.err { border-left: 4px solid var(--dn); border-color: rgba(224,82,82,0.3); }
.notif.inf { border-left: 4px solid var(--p); border-color: rgba(91,141,239,0.3); }


.links-popup-inner { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.tool-link-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 10px;
  text-decoration: none; color: var(--tx2);
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
  transition: all .2s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer;
}
.tool-link-item:hover {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); color: var(--tx);
  transform: translateX(4px) scale(1.02); box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.tli-fav { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; border-radius: 4px; opacity: .9; transition: transform .2s; }
.tli-info { flex: 1; min-width: 0; }
.tli-name { font-weight: 600; font-size: .92rem; color: var(--tx); transition: color .2s; }
.tli-desc { font-size: .78rem; color: var(--tx3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.tli-arrow { color: var(--tx3); font-size: 1rem; transition: all .3s cubic-bezier(0.175, 0.885, 0.32, 1.275); opacity: 0; transform: translateX(-10px); }
.tool-link-item:hover .tli-arrow { color: var(--p); opacity: 1; transform: translateX(2px); }
.tool-link-item:hover .tli-name { color: var(--p); }
.tool-link-item:hover .tli-fav { transform: scale(1.1) rotate(5deg); }
.svg-frame {
  position: fixed;
  bottom: 80px; right: 20px;
  width: 300px; height: 300px;
  transform-style: preserve-3d;
  display: flex; justify-content: center; align-items: center;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  transition: transform .5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity .5s;
}

.svg-frame.cal-active {
  transform: scale(0.6) rotate(180deg);
  opacity: 0;
  pointer-events: none;
}

#clock-disp {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  color: var(--p);
  font-family: inherit;
  pointer-events: none;
  font-weight: 700;
  text-shadow: 0 0 10px var(--pt), 0 0 2px var(--p);
  opacity: 0;
  z-index: 10;
  will-change: opacity;
  transition: opacity .4s ease;
}

.svg-frame:hover #clock-disp {
  opacity: 1;
}

#ct-big { 
  position: absolute;
  top: 8px; left: 8px;
  font-size: 1.5rem; 
  letter-spacing: 2px; 
  font-variant-numeric: tabular-nums; 
  text-align: left;
  white-space: nowrap;
  animation: hologramFlicker 10s infinite;
  transform: translate(115px, 115px) scale(0.1);
  opacity: 0;
  transition: transform .6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity .4s ease;
}

.svg-frame:hover #ct-big {
  transform: translate(0, 0) scale(1);
  opacity: 1;
}

#cd-big { 
  position: absolute;
  top: 44px; left: 28px;
  font-size: 0.85rem; 
  letter-spacing: 1.5px; 
  color: var(--p); 
  opacity: 0;
  text-align: left;
  white-space: nowrap;
  animation: hologramFlicker 12s infinite reverse;
  transform: translate(95px, 70px) scale(0.1);
  transition: transform .7s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity .5s ease .1s;
}

.svg-frame:hover #cd-big {
  transform: translate(0, 0) scale(1);
  opacity: 0.8;
}

#clock-disp::before {
  content: "";
  position: absolute;
  inset: 20px;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 255, 0.03) 0px,
    rgba(0, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  opacity: 0.5;
}

@keyframes hologramFlicker {
  0%, 100% { opacity: 0.8; }
  92% { opacity: 0.8; }
  93% { opacity: 0.5; }
  94% { opacity: 0.9; }
  95% { opacity: 0.4; }
  96% { opacity: 0.8; }
}


#cal-popup {
  position: fixed; 
  bottom: 65px; right: 20px;
  background: rgba(13, 14, 18, 0.45); 
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--bd2); 
  border-radius: 12px;
  padding: 16px; width: 280px;
  box-shadow: 0 20px 60px rgba(0, 255, 255, 0.15), 0 0 0 1px var(--bd);
  z-index: 2000;
  display: none; flex-direction: column; gap: 8px;
  opacity: 0;
  transform: translate(0, 50px) scale(0.2);
  transform-origin: bottom right;
  transition: opacity .5s ease, transform .6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform, opacity;
}



#cal-popup.open { 
  display: flex; 
  opacity: 1; 
  transform: translate(0, 0) scale(1); 
}

.cal-ctrls { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-btn { 
  background: transparent; color: var(--tx2); border: 1px solid transparent; 
  border-radius: 5px; width: 28px; height: 28px; cursor: pointer; 
  transition: all .2s; font-family: inherit; font-weight: bold;
}
.cal-btn:hover { background: var(--pt); color: var(--p); border-color: var(--bd2); }
#cal-popup .cal-header { color: var(--p); font-size: 1.1rem; font-weight: 700; text-align: center; }
#cal-popup .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: .8rem; color: var(--tx); }
#cal-popup .cal-grid .wday { color: var(--tx3); font-weight: 600; font-size: .75rem; }
#cal-popup .cal-day { padding: 4px; border-radius: 4px; cursor: default; }
#cal-popup .cal-day:hover { background: var(--pt); }
#cal-popup .cal-day.today { background: var(--p); color: #000; font-weight: bold; }

.svg-frame svg {
  position: absolute; transition: .5s;
  z-index: calc(1 - (0.2 * var(--j)));
  transform-origin: center;
  width: 344px; height: 344px; fill: none;
}
.svg-frame:hover svg { transform: rotate(-80deg) skew(30deg) translateX(calc(45px * var(--i))) translateY(calc(-35px * var(--i))); }
.svg-frame svg #center { transition: .5s; transform-origin: center; }
.svg-frame:hover svg #center { transform: rotate(-30deg) translateX(45px) translateY(-3px); }
#out2 { animation: rotate16 7s ease-in-out infinite alternate; transform-origin: center; }
#out3 { animation: rotate16 3s ease-in-out infinite alternate; transform-origin: center; stroke: transparent; }
#inner3, #inner1 { animation: rotate16 4s ease-in-out infinite alternate; transform-origin: center; }
#center1 { fill: transparent; animation: rotate16 2s ease-in-out infinite alternate; transform-origin: center; }
@keyframes rotate16 { to { transform: rotate(360deg); } }
