* { box-sizing: border-box; }

body {
  background: #0b223d url('https://windowswallpaper.miraheze.org/wiki/Special:Redirect/file/Img0_(Windows_7).jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 13px;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  color: #0b1a2d;
}

/* Frutiger Aero Scrollbars */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.4); border-left: 1px solid rgba(255, 255, 255, 0.6); box-shadow: inset 1px 0 3px rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: linear-gradient(to right, #e6f5ff, #a9d4f5); border: 1px solid #71a9d1; border-radius: 8px; box-shadow: inset 1px 0 0 rgba(255,255,255,1), inset -1px 0 0 rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(to right, #ffffff, #8cc5ed); }
::-webkit-scrollbar-thumb:active { background: linear-gradient(to right, #8cc5ed, #5caae0); }

/* Frutiger Aero Main Window */
#winWindow {
  position: absolute;
  top: 5vh;
  left: calc(50% - 525px);
  width: 1050px;
  height: 85vh;
  min-width: 800px;
  min-height: 500px;
  max-width: 100vw;
  max-height: 100vh;
  background: rgba(180, 220, 255, 0.3);
  backdrop-filter: blur(15px) saturate(160%);
  -webkit-backdrop-filter: blur(15px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6),
              inset 0 1px 1px rgba(255, 255, 255, 1),
              inset 0 0 30px rgba(255, 255, 255, 0.5);
  padding: 4px;
  display: flex;
  flex-direction: column;
  resize: none;
  overflow: hidden;
}

/* Glossy Top Highlight */
#winWindow::before {
  content: "";
  position: absolute;
  top: 1px; left: 1px; right: 1px; height: 40px;
  border-radius: 11px 11px 0 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.3) 48%, rgba(255,255,255,0.0) 50%);
  pointer-events: none;
  z-index: 1;
}

#winTitlebar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  color: #0b2f56;
  font-weight: bold;
  font-size: 14px;
  text-shadow: 0 0 10px rgba(255,255,255,1), 0 1px 1px #fff;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
  z-index: 2;
}
.win7-title-left { display: flex; align-items: center; gap: 8px; }
.win7-app-icon { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }

/* Window Controls */
.win-controls { display: flex; gap: 6px; z-index: 10; }
.win-btn { 
  width: 32px; height: 20px; 
  border: 1px solid rgba(60, 105, 150, 0.7); 
  border-radius: 4px; 
  background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(200,230,255,0.6) 48%, rgba(150,210,250,0.7) 52%, rgba(220,245,255,0.9) 100%);
  font-size: 11px; display: flex; align-items: center; justify-content: center; 
  cursor: pointer; color: #0a223d; 
  box-shadow: inset 0 1px 1px rgba(255,255,255,1), 0 1px 3px rgba(0,0,0,0.2);
}
.win-btn:hover { background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(220,245,255,0.9) 48%, rgba(170,225,255,0.9) 52%, rgba(230,255,255,1) 100%); box-shadow: 0 0 8px rgba(100,200,255,0.8); }

/* Pure Frutiger Aero Glossy Buttons */
button, .win7-btn {
  background: linear-gradient(to bottom, #f2f9ff 0%, #c4e4fa 48%, #9fd1f5 50%, #e0f2ff 100%);
  border: 1px solid #71a6d2;
  border-radius: 20px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  color: #0b2f56;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255,255,255,1), 0 2px 4px rgba(0,0,0,0.15);
  text-shadow: 0 1px 1px rgba(255,255,255,0.8);
  transition: all 0.15s;
}
button:hover, .win7-btn:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #d8efff 48%, #b3defa 50%, #f0f8ff 100%);
  border-color: #4da6ff;
  box-shadow: inset 0 1px 2px rgba(255,255,255,1), 0 0 8px rgba(100, 200, 255, 0.7);
}
button:active, .win7-btn:active {
  background: linear-gradient(to bottom, #9fd1f5 0%, #7dbdec 50%, #5ba7df 51%, #aed8f5 100%);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.4);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

input, select, textarea {
  border: 1px solid #8baac4;
  border-radius: 15px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  box-shadow: inset 1px 2px 4px rgba(0,0,0,0.1);
  transition: all 0.2s;
}
input:focus, select:focus, textarea:focus {
  background: #ffffff;
  border-color: #4da6ff;
  outline: none;
  box-shadow: 0 0 8px rgba(77, 166, 255, 0.8), inset 1px 2px 4px rgba(0,0,0,0.05);
}

/* Live Search Bar */
.aero-search {
  border-radius: 20px;
  padding: 4px 12px 4px 28px;
  border: 1px solid #71a6d2;
  background: rgba(255,255,255,0.9) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%233b6e99" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 8px center;
  width: 160px;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.aero-search:focus { width: 220px; }

/* Main Container with Glass Blur */
.win7-inner-content {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.7), 0 2px 10px rgba(0,0,0,0.1);
  z-index: 2;
}

.win7-toolbar {
  background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(220,240,255,0.7) 100%);
  border-bottom: 1px solid rgba(170, 195, 220, 0.9);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.win7-main { display: flex; flex-direction: column; flex: 1; overflow: hidden; background: rgba(240, 248, 255, 0.4); }

@media (min-width: 768px) {
  .win7-main { flex-direction: row; }
  .win7-sidebar { width: 260px; border-right: 1px solid rgba(170, 195, 220, 0.8); flex-shrink: 0; background: linear-gradient(to right, rgba(255,255,255,0.5), rgba(235,245,255,0.3)); overflow-x: hidden; }
  .win7-right-panel { width: 240px; border-left: 1px solid rgba(170, 195, 220, 0.8); background: linear-gradient(to left, rgba(255,255,255,0.5), rgba(235,245,255,0.3)); padding: 8px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; flex-shrink: 0; }
  .win7-chat-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: rgba(255,255,255,0.85); }
}

.win7-sidebar { padding: 10px; overflow-y: auto; }

.pane-header {
  font-size: 11px;
  font-weight: bold;
  color: #0b2f56;
  margin: 10px 0 5px 0;
  border-bottom: 1px solid rgba(160, 190, 220, 0.8);
  padding-bottom: 4px;
  text-shadow: 0 1px 1px rgba(255,255,255,1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-btn {
  display: block; width: 100%; text-align: left; padding: 6px 10px; margin-bottom: 4px;
  background: transparent; border: 1px solid transparent; border-radius: 15px; color: #0b1a2d; font-size: 13px; font-weight: 500; transition: all 0.1s;
}
.nav-btn:hover { background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(220,245,255,0.7) 100%); border-color: rgba(170, 200, 230, 0.6); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.nav-btn.active { background: linear-gradient(to bottom, rgba(230,250,255,1) 0%, rgba(190,230,255,1) 100%); border-color: #5ba7df; font-weight: bold; box-shadow: inset 0 1px 2px rgba(255,255,255,1), 0 2px 4px rgba(0,0,0,0.1); color: #003366;}

/* Chat Area */
#msgs {
  flex: 1; overflow-y: auto; padding: 16px;
  font-size: 14px; line-height: 1.6; border-bottom: 1px solid rgba(170, 195, 220, 0.8);
}
.msg-item { 
  margin-bottom: 10px; padding: 8px 12px; border-bottom: 1px solid rgba(170, 195, 220, 0.4);
  border-radius: 8px; word-break: break-word; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; transition: background 0.15s ease;
}
.msg-item:hover { background: rgba(235, 245, 255, 0.8); box-shadow: 0 2px 5px rgba(0,0,0,0.02); }

.msg-avatar { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; border: 1px solid #789; box-shadow: 0 2px 4px rgba(0,0,0,0.2); flex-shrink: 0;}
.msg-content { flex: 1; min-width: 0;}

.msg-time { color: #64748b; font-size: 0.85em; margin-right: 6px; cursor: default; }
.msg-author { font-weight: bold; color: #0b2f56; font-size: 14px; }
.edited-badge { color: #789; font-size: 10px; font-style: italic; margin-left: 5px; }

.msg-img-preview { max-width: 300px; max-height: 250px; display: block; margin-top: 6px; border-radius: 6px; border: 1px solid #89a; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }

.reply-quote { border-left: 3px solid #4da6ff; background: rgba(220, 240, 255, 0.5); padding: 4px 10px; margin-bottom: 6px; font-size: 0.9em; color: #345; border-radius: 0 6px 6px 0; }
.user-ping { background: rgba(254, 240, 138, 0.8); border: 1px solid rgba(234, 179, 8, 0.8); padding: 1px 5px; border-radius: 4px; font-weight: bold; color: #854d0e; box-shadow: 0 1px 2px rgba(0,0,0,0.1);}

.emoji-bar { background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(235,245,255,0.8) 100%); padding: 6px 12px; border-bottom: 1px solid rgba(170, 195, 220, 0.8); display: flex; gap: 8px; align-items: center; font-size: 16px; flex-shrink: 0; box-shadow: inset 0 1px 0 #fff; }
.emoji-bar span { cursor: pointer; padding: 2px; transition: transform 0.1s; }
.emoji-bar span:hover { transform: scale(1.2); }

.reactions-container { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.reaction-pill { background: linear-gradient(to bottom, #ffffff 0%, #e6f2ff 100%); border: 1px solid #99c2ff; border-radius: 12px; padding: 2px 8px; font-size: 11px; font-weight:bold; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); color: #0b2f56; }
.reaction-pill:hover { background: linear-gradient(to bottom, #ffffff 0%, #cce5ff 100%); border-color: #66a3ff; }

/* Badges */
.tag-super { background: linear-gradient(to bottom, #ffea75, #f5c400); border: 1px solid #d4a517; color: #523900; padding: 2px 5px; border-radius: 4px; font-size: 9px; font-weight: bold; margin-left:6px; box-shadow: inset 0 1px 1px rgba(255,255,255,0.8);}
.tag-owner { background: linear-gradient(to bottom, #d7effe, #7dd3ff); border: 1px solid #38bdf8; color: #0369a1; padding: 2px 5px; border-radius: 4px; font-size: 9px; font-weight: bold; margin-left:6px; box-shadow: inset 0 1px 1px rgba(255,255,255,0.8);}
.tag-peak { background: linear-gradient(to bottom, #ffe44d, #ff9900); border: 1px solid #b8860b; color: #fff; padding: 2px 5px; border-radius: 4px; font-size: 9px; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,0.6); margin-left:6px; box-shadow: inset 0 1px 1px rgba(255,255,255,0.8);}

.win7-statusbar {
  background: linear-gradient(to bottom, rgba(240,248,255,0.8) 0%, rgba(210,230,245,0.9) 100%);
  border-top: 1px solid rgba(170, 195, 220, 0.9);
  padding: 4px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: bold;
  color: #1a385c;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,1);
}

.del-btn, .edit-btn, .reply-btn { font-size: 11px; border: none; background: none; cursor: pointer; padding: 0 6px; text-decoration: underline; font-weight: bold; opacity: 0.7; }
.del-btn { color: #c02b2b; }
.edit-btn { color: #2b74af; }
.reply-btn { color: #1d4ed8; }
.del-btn:hover, .edit-btn:hover, .reply-btn:hover { opacity: 1; }

.req-box { border: 1px solid rgba(150, 185, 215, 0.8); background: rgba(255,255,255,0.8); padding: 6px; margin-bottom: 5px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.admin-panel { border: 1px solid #f87171; background: rgba(254, 242, 242, 0.8); padding: 8px; margin-top: 10px; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

.badge-88x31 {
  width: 88px; height: 31px; border: 1px solid #789; background: linear-gradient(to bottom, #1a385c 0%, #2b74af 100%);
  color: #fff; font-size: 9px; font-family: "Lucida Console", Monaco, monospace; display: inline-flex; align-items: center; justify-content: center; text-align: center; cursor: help; box-shadow: inset 0 1px 1px rgba(255,255,255,0.5), 0 2px 4px rgba(0,0,0,0.3); user-select: all; text-shadow: 0 1px 1px rgba(0,0,0,0.8); border-radius:3px;
}