/* ==========================================================================
   나만의 데스크톱 대시보드 - style.css
   디자인 레퍼런스: mintcuki.kr 스타일 다크 글래스모피즘 & 데스크톱 OS 인터페이스
   ========================================================================== */

:root {
  --bg-dark: #0a0f1d;
  --glass-panel: rgba(15, 23, 42, 0.72);
  --glass-panel-hover: rgba(15, 23, 42, 0.82);
  --glass-card: rgba(255, 255, 255, 0.08);
  --glass-card-hover: rgba(255, 255, 255, 0.16);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-glow: rgba(56, 189, 248, 0.4);
  --taskbar-bg: rgba(10, 15, 29, 0.82);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-mint: #10b981;
  --accent-mint-light: #34d399;
  --accent-sky: #38bdf8;
  --accent-blue: #2563eb;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-dark);
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================================================
   바탕화면 및 배경 (Desktop Area)
   ========================================================================== */
.desktop-screen {
  position: relative;
  width: 100vw;
  height: calc(100vh - 48px);
  background-image: url('wallpaper.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: background-image 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.wallpaper-dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(10, 15, 29, 0.25) 0%, rgba(10, 15, 29, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   바탕화면 앱 아이콘 (Desktop Icons - Left)
   ========================================================================== */
.desktop-icons {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 5;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px;
  padding: 8px 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.desktop-icon:focus-visible {
  border-color: var(--accent-sky);
  background: rgba(56, 189, 248, 0.15);
}

.desktop-icon:active {
  transform: scale(0.95);
}

.icon-box {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.desktop-icon:hover .icon-box {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* 개별 아이콘 특화 그라데이션 */
.icon-calendar-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(37, 99, 235, 0.2));
  border-color: rgba(56, 189, 248, 0.4);
}

.icon-today-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  background: #ffffff;
  color: #0f172a;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
}

.icon-weather-box {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(249, 115, 22, 0.2));
  border-color: rgba(251, 191, 36, 0.4);
}

.icon-cpu-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(6, 95, 70, 0.25));
  border-color: rgba(16, 185, 129, 0.4);
}

.pulse-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-mint-light);
  box-shadow: 0 0 8px var(--accent-mint-light);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
}

.icon-notes-box {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.35), rgba(136, 19, 55, 0.25));
  border-color: rgba(244, 63, 94, 0.4);
}

.icon-settings-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(76, 29, 149, 0.25));
  border-color: rgba(139, 92, 246, 0.4);
}

.icon-label {
  margin-top: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  text-align: center;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   중앙 패널 (Search + Favorites)
   ========================================================================== */
.desktop-center-panel {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  z-index: 4;
}

/* 통합 검색 바 */
.search-container {
  width: 100%;
  height: 56px;
  background: var(--glass-panel);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  padding: 0 16px 0 12px;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container:focus-within {
  border-color: var(--accent-sky);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 20px 50px rgba(56, 189, 248, 0.25), 0 0 0 2px rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.search-engine-select-wrapper {
  position: relative;
}

.search-engine-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--accent-sky);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.search-engine-select:hover {
  background: rgba(255, 255, 255, 0.18);
}

.search-icon-symbol {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.search-submit-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-sky);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-submit-btn:hover {
  background: var(--accent-sky);
  color: #0f172a;
  transform: scale(1.08);
}

/* 자주 가는 사이트 섹션 */
.favorites-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.favorites-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: -0.2px;
}

.add-bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-bookmark-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.favorites-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

/* 자주 가는 사이트 타일 아이템 */
.fav-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 86px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fav-tile:hover {
  transform: translateY(-4px);
}

.fav-tile-box {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
  overflow: hidden;
}

.fav-tile:hover .fav-tile-box {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), var(--shadow-glow);
}

.fav-tile-label {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
  text-align: center;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 브랜드별 특화 타일 스타일 */
.fav-tile.brand-apple .fav-tile-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(71, 85, 105, 0.35));
  border-color: rgba(255, 255, 255, 0.35);
}

.fav-tile.brand-google .fav-tile-box {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.3), rgba(234, 67, 53, 0.2));
  border-color: rgba(66, 133, 244, 0.4);
}

.fav-tile.brand-youtube .fav-tile-box {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.35), rgba(185, 28, 28, 0.2));
  border-color: rgba(239, 68, 68, 0.4);
}

.fav-brand-svg {
  width: 32px;
  height: 32px;
}

/* 북마크 삭제 버튼 */
.fav-del-btn {
  position: absolute;
  top: -4px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border: none;
  font-size: 0.75rem;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.fav-tile:hover .fav-del-btn {
  display: flex;
}

.fav-del-btn:hover {
  background: #dc2626;
  transform: scale(1.15);
}

/* ==========================================================================
   우측 위젯 패널 (Widget Panel - Right)
   ========================================================================== */
.widget-panel {
  position: absolute;
  right: 24px;
  top: 24px;
  bottom: 24px;
  width: 330px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  z-index: 5;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.widget-panel::-webkit-scrollbar {
  width: 4px;
}
.widget-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.widget-panel.collapsed {
  transform: translateX(360px);
  opacity: 0;
  pointer-events: none;
}

.widget-card {
  background: var(--glass-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.widget-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.widget-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.widget-icon {
  font-size: 1rem;
}

.widget-chip {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-sky);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.widget-mini-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.widget-mini-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.stress-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
}

.stress-badge.off {
  background: #64748b;
  color: #ffffff;
}

.stress-badge.on {
  background: var(--accent-rose);
  color: #ffffff;
  animation: pulse-glow 1s infinite;
}

/* 1. 요일 및 디지털 시계 위젯 스타일 */
.day-time-body {
  text-align: center;
  padding: 4px 0 8px 0;
}

.day-of-week-large {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.day-of-week-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-sky);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 2px;
}

.date-full-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 6px;
}

.clock-display-wrap {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 10px;
  padding: 6px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Outfit', 'JetBrains Mono', monospace;
}

.clock-digits {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
}

.clock-seconds {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-sky);
  margin-left: 2px;
}

/* 2. 날씨 위젯 스타일 */
.widget-city-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.widget-city-select option {
  background: #0f172a;
  color: #ffffff;
}

.weather-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.weather-icon-visual {
  font-size: 2.4rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.weather-temp-group {
  display: flex;
  align-items: flex-start;
  font-family: 'Outfit', sans-serif;
}

.weather-temp-number {
  font-size: 2.1rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.weather-temp-unit {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-sky);
  margin-left: 2px;
}

.weather-status-group {
  text-align: right;
  flex: 1;
}

.weather-condition-text {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
}

.weather-minmax-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.weather-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  text-align: center;
}

.weather-detail-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 6px 4px;
}

.detail-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.detail-val {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

/* 3. CPU & 리소스 모니터 위젯 */
.cpu-widget-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resource-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.resource-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
}

.resource-progress-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-sky));
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resource-progress-bar.ram-bar {
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-sky));
}

.resource-progress-bar.high-load {
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-rose)) !important;
}

.cpu-canvas-container {
  position: relative;
  width: 100%;
  height: 72px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 4px;
}

#resource-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-fps-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-mint-light);
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 4px;
  border-radius: 4px;
}

/* 4. 미니 달력 위젯 */
.cal-nav-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  transition: all 0.2s ease;
}

.cal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cal-month-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cal-weekdays .sun { color: var(--accent-rose); }
.cal-weekdays .sat { color: var(--accent-sky); }

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}

.cal-day-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-day-cell:hover {
  background: rgba(255, 255, 255, 0.18);
}

.cal-day-cell.other-month {
  color: rgba(255, 255, 255, 0.2);
}

.cal-day-cell.today {
  background: var(--accent-sky);
  color: #0f172a;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.cal-day-cell.has-memo::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-mint-light);
}

.cal-day-cell.today.has-memo::after {
  background: #0f172a;
}

/* ==========================================================================
   윈도우 시스템 (Window Layout & Controls)
   ========================================================================== */
.windows-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.window {
  position: absolute;
  width: 720px;
  height: 520px;
  top: 60px;
  left: calc(50% - 360px);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.22s ease;
  z-index: 10;
}

.window.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.window.active-win {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.window.minimized {
  opacity: 0;
  transform: scale(0.85) translateY(100px);
  pointer-events: none;
}

.window.maximized {
  width: calc(100vw - 32px) !important;
  height: calc(100% - 32px) !important;
  top: 16px !important;
  left: 16px !important;
  border-radius: var(--radius-md);
}

.window-header {
  height: 48px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  user-select: none;
}

.window-header:active {
  cursor: grabbing;
}

.window-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.window-header-icon {
  font-size: 1.2rem;
}

.window-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.win-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.win-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.win-btn.close-btn:hover {
  background: var(--accent-rose);
  color: #ffffff;
  border-color: var(--accent-rose);
}

.window-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  color: var(--text-main);
}

.window-body::-webkit-scrollbar {
  width: 8px;
}
.window-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* 윈도우 내부 모달/컨텐츠 컴포넌트들 */
.primary-btn {
  background: linear-gradient(135deg, var(--accent-sky), var(--accent-blue));
  border: none;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}

.primary-btn.ghost-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.primary-btn.danger-btn {
  background: linear-gradient(135deg, var(--accent-rose), #b91c1c);
}

.primary-btn.danger-btn:hover {
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.4);
}

.primary-btn.mini-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* 달력 모달 레이아웃 */
.modal-calendar-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  height: 100%;
}

.modal-cal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-sub-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.selected-date-display {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-sky);
}

.modal-memo-textarea {
  width: 100%;
  height: 90px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px;
  color: #ffffff;
  font-size: 0.85rem;
  resize: none;
  outline: none;
}

.modal-memo-textarea:focus {
  border-color: var(--accent-sky);
}

.memo-list-preview {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.memo-list-preview h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.modal-memo-ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-memo-ul li {
  font-size: 0.78rem;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border-left: 3px solid var(--accent-mint);
}

.modal-memo-ul .empty-memo-li {
  border-left-color: var(--text-dim);
  color: var(--text-muted);
}

.modal-cal-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-cal-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-cal-big-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
}

.modal-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.modal-day-cell {
  min-height: 52px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-day-cell:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-sky);
}

.modal-day-cell.today {
  border-color: var(--accent-sky);
  background: rgba(56, 189, 248, 0.15);
}

.modal-day-cell.active-selected {
  outline: 2px solid var(--accent-mint);
}

.modal-day-num {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
}

.modal-day-snippet {
  font-size: 0.68rem;
  color: var(--accent-mint-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 상세 날씨 윈도우 */
.weather-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.weather-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.weather-hero-icon {
  font-size: 4rem;
}

.weather-hero-temp {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
}

.weather-hero-city {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 4px;
}

.weather-hero-desc {
  font-size: 0.9rem;
  color: var(--accent-sky);
}

.weather-hero-right {
  display: flex;
  gap: 16px;
}

.hero-stat-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-name {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  margin-top: 4px;
}

.section-heading {
  font-size: 1rem;
  font-weight: 800;
  margin: 18px 0 10px 0;
}

.hourly-forecast-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.hourly-card {
  min-width: 76px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
}

.hourly-time { font-size: 0.75rem; color: var(--text-muted); }
.hourly-icon { font-size: 1.5rem; margin: 6px 0; }
.hourly-temp { font-family: 'Outfit', sans-serif; font-size: 0.9rem; font-weight: 800; }

.weekly-forecast-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weekly-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 16px;
  border-radius: var(--radius-md);
}

.weekly-day { font-weight: 700; width: 80px; }
.weekly-icon { font-size: 1.3rem; }
.weekly-desc { font-size: 0.85rem; color: var(--text-muted); flex: 1; margin-left: 16px; }
.weekly-temps { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 0.95rem; }

/* CPU 모니터 상세 윈도우 */
.sys-info-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.sys-badge {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
}

.badge-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.badge-val {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-sky);
  margin-top: 4px;
}

.chart-big-container {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.chart-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.live-tag {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-mint-light);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
}

#win-cpu-big-canvas {
  width: 100%;
  height: 180px;
  display: block;
}

.cores-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.core-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.core-title {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.core-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.core-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-sky));
  transition: width 0.3s ease;
}

.stress-control-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
}

.stress-info h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-rose);
}

.stress-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 빠른 메모장 */
.notes-window-body {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

.notes-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notes-status {
  font-size: 0.78rem;
  color: var(--accent-mint-light);
}

.quick-notes-textarea {
  flex: 1;
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.quick-notes-textarea:focus {
  border-color: var(--accent-sky);
}

/* 설정 윈도우 */
.settings-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.setting-text h4 {
  font-size: 0.95rem;
  font-weight: 800;
}

.setting-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.wallpaper-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wp-thumb-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.wp-thumb-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.wp-thumb-btn.active {
  background: var(--accent-sky);
  color: #0f172a;
  border-color: var(--accent-sky);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.custom-url-row {
  display: flex;
  gap: 10px;
}

.modal-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
}

.modal-input:focus {
  border-color: var(--accent-sky);
}

/* ==========================================================================
   작업 표시줄 (Taskbar & Start Menu)
   ========================================================================== */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 48px;
  background: var(--taskbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

.taskbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.start-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-sky);
  transform: translateY(-1px);
}

.start-icon {
  font-size: 1.15rem;
  filter: drop-shadow(0 2px 6px rgba(56, 189, 248, 0.5));
}

.start-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.taskbar-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.taskbar-tab {
  height: 34px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.2s ease;
}

.taskbar-tab:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.taskbar-tab.active-tab {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-sky);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.taskbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.taskbar-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.taskbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.taskbar-clock-area {
  padding: 4px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: right;
  transition: background 0.2s ease;
}

.taskbar-clock-area:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tb-time {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.tb-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* 시작 메뉴 */
.start-menu {
  position: fixed;
  bottom: 58px;
  left: 16px;
  width: 280px;
  background: var(--glass-panel);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 110;
  animation: slide-up 0.2s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.start-menu.open {
  display: flex;
}

.start-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.start-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-sky), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.start-username {
  font-weight: 800;
  font-size: 0.9rem;
}

.start-user-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.start-menu-items {
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.15s ease;
}

.start-item:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateX(3px);
}

.start-item-icon {
  font-size: 1.2rem;
}

.start-menu-footer {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: var(--accent-sky);
  cursor: pointer;
}

/* 북마크 추가 모달 오버레이 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  width: 90%;
  max-width: 440px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: slide-up 0.2s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

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

/* ==========================================================================
   반응형 미디어 쿼리 (Responsive Adaptations)
   ========================================================================== */
@media (max-width: 1024px) {
  .widget-panel {
    width: 290px;
  }
  .desktop-center-panel {
    max-width: 520px;
  }
}

@media (max-width: 860px) {
  .widget-panel {
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 60px;
    width: 320px;
    background: rgba(10, 15, 29, 0.95);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-xl);
    padding: 16px;
    transform: translateX(360px);
    opacity: 0;
  }
  .widget-panel.mobile-open {
    transform: translateX(0);
    opacity: 1;
  }
  .desktop-center-panel {
    top: 10%;
    max-width: 90%;
  }
  .window {
    width: 95vw !important;
    left: 2.5vw !important;
  }
}

@media (max-width: 600px) {
  .desktop-icons {
    flex-direction: row;
    flex-wrap: wrap;
    top: 12px;
    left: 12px;
    right: 12px;
  }
  .desktop-center-panel {
    top: 140px;
  }
  .search-container {
    height: 48px;
  }
  .favorites-grid {
    gap: 10px;
  }
  .fav-tile {
    width: 72px;
  }
  .fav-tile-box {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }
  .modal-calendar-layout {
    grid-template-columns: 1fr;
  }
}
