/* Fluent UI Dark Mode — styles */
:root{
  /* Fluent UI Dark Theme Colors */
  --fluent-bg-primary: #202020;
  --fluent-bg-secondary: #2b2b2b;
  --fluent-bg-tertiary: #323232;
  --fluent-bg-layer: #1c1c1c;
  --fluent-surface: #2b2b2b;
  --fluent-surface-hover: #383838;
  --fluent-surface-pressed: #2f2f2f;
  --fluent-accent: #60cdff;
  --fluent-accent-hover: #3aa0f3;
  --fluent-accent-pressed: #1f7adb;
  --fluent-text-primary: #ffffff;
  --fluent-text-secondary: #c8c8c8;
  --fluent-text-tertiary: #9d9d9d;
  --fluent-text-disabled: #5d5d5d;
  --fluent-border: #414141;
  --fluent-border-hover: #575757;
  --fluent-divider: #333333;
  
  /* Fluent UI Shadows */
  --shadow-flyout: 0 8px 16px rgba(0,0,0,.4);
  --shadow-dialog: 0 16px 32px rgba(0,0,0,.5);
  --shadow-tooltip: 0 2px 4px rgba(0,0,0,.3);
  
  /* Fluent UI Radii */
  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 12px;
  
  /* Other */
  --icon-size: 48px;
  --grid-gap: 12px;
}

*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  background: var(--fluent-bg-primary);
  overflow:hidden;
  user-select:none;
  color: var(--fluent-text-primary);
}

/* Modern Fluent Scrollbar */
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
  border: 3px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Fluent UI SVG Icons */
.fluent-icon {
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.fluent-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* App icons (PNG images from images folder) */
.icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-tile .icon {
  width: 48px;
  height: 48px;
}

.app-icon .icon {
  width: 32px;
  height: 32px;
}

.desktop-icon .icon {
  width: var(--icon-size);
  height: var(--icon-size);
  margin: 0 auto 6px;
}

.ql .icon,
.task-button .icon {
  width: 100%;
  height: 100%;
}

.tray-icon {
  width: 16px;
  height: 16px;
}

/* Desktop */
#desktop{
  position:relative; 
  height:100%; 
  width:100%;
  background: url('../images/nav/wallpaper.jpg') center center / cover no-repeat;
}
#desktop-icons{list-style:none; margin:16px; padding:0; position:relative;}

/* Tablet Mode */
#tablet-mode{
  position: absolute;
  inset: 0;
  padding: 24px 120px 96px 120px;
  overflow-y: auto;
  background: var(--fluent-bg-primary);
  background-image: url('../images/nav/wallpaper.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.tablet-header{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px 0 24px 0;
  margin-bottom: 16px;
}

.tablet-start-btn{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 52px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  justify-self: start;
  color: var(--fluent-text-primary);
  backdrop-filter: blur(20px);
}

.tablet-start-btn:hover{
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.tablet-start-btn:active{
  transform: scale(0.98);
}

.tablet-start-btn .start-icon{
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tablet-start-btn .start-label{
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.tablet-header .search-input-wrapper{
  justify-self: center;
  width: auto;
  min-width: 500px;
  position: relative;
  display: flex;
  align-items: center;
}

.tablet-header .search-input-wrapper .fluent-icon{
  position: absolute;
  left: 50%;
  transform: translateX(-210px);
  width: 22px;
  height: 22px;
  color: var(--fluent-text-secondary);
  pointer-events: none;
  z-index: 1;
}

.tablet-header .search-input-wrapper input{
  flex: 1;
  height: 52px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--fluent-text-primary);
  transition: all 0.2s ease;
  width: 100%;
  font-size: 15px;
  outline: none;
  text-align: center;
  backdrop-filter: blur(20px);
}

.tablet-header .search-input-wrapper input::placeholder{
  color: var(--fluent-text-secondary);
  opacity: 0.8;
}

.tablet-header .search-input-wrapper input:hover{
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.tablet-header .search-input-wrapper input:focus{
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--fluent-accent);
}
.time-display{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 52px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  min-width: 120px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--fluent-text-primary);
  backdrop-filter: blur(20px);
}

.time-display:hover{
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
} 

.time-display:active{
  transform: scale(0.98);
}

.time-display .copilot-icon{
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.time-display .time-text{
  font-size: 14px;
  font-weight: 500;
}

.system-indicators{
  display: flex;
  align-items: center;
  gap: 24px;
  justify-self: end;
}
.indicator-group{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  height: 52px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(20px);
}

.indicator-group:hover{
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.indicator-group:active{
  transform: scale(0.98);
}

.indicator-group .fluent-icon{
  width: 20px;
  height: 20px;
  opacity: 0.9;
}

.time-display{
  font-size: 16px;
  font-weight: 600;
  color: var(--fluent-text-primary);
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 80px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#tablet-mode .start-search{
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--fluent-bg-primary);
  padding-bottom: 32px;
  margin-bottom: 32px;
}

#tablet-mode .home-categories-container{
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 0 40px;
  margin-top: 300px;
}

.desktop-icon{
  width:96px; 
  text-align:center; 
  color: var(--fluent-text-primary); 
  cursor:default; 
  position:absolute;
  padding:8px 6px; 
  border-radius: var(--radius-medium); 
  outline:none;
  transition: background 0.1s ease;
}
.desktop-icon .fluent-icon{
  width: var(--icon-size); 
  height: var(--icon-size); 
  display:block; 
  margin:0 auto 8px;
}
.desktop-icon .label{
  display:block; 
  font-size:12px; 
  line-height:1.3;
  font-weight: 400;
}
.desktop-icon:hover{
  background: var(--fluent-surface-hover);
}
.desktop-icon.selected{
  background: rgba(96, 205, 255, 0.15);
  border: 1px solid var(--fluent-accent);
}
.desktop-icon:focus{
  outline:2px solid var(--fluent-accent);
  outline-offset: 2px;
}

/* Taskbar - Fluent Design */
#taskbar{
  position:fixed; 
  left:0; 
  right:0; 
  bottom:0; 
  height:48px; 
  display:flex; 
  align-items:center; 
  gap:0;
  background: var(--fluent-surface);
  backdrop-filter: blur(30px);
  padding:0px; 
  color: var(--fluent-text-primary); 
  z-index:1000; 
  border-top:1px solid var(--fluent-border);
}

#taskbar.hidden{
  display: none;
}

#start-button{
  display:inline-flex; 
  align-items:center; 
  gap:10px; 
  height:100%; 
  padding:0 16px; 
  border-radius: 0; 
  border:1px solid transparent;
  background: var(--fluent-bg-layer);
  color: var(--fluent-text-primary); 
  font-weight:600; 
  letter-spacing:0;
  transition: all 0.1s ease;
}
#start-button:hover{
  background: var(--fluent-surface-hover);
}
#start-button:active{
  background: var(--fluent-surface-pressed);
  transform: scale(0.98);
}
#start-button .winlogo{display:inline-grid; place-items:center}
#start-button .winlogo svg{width:16px; height:16px; display:block; color: var(--fluent-accent);}
#start-button .start-text{font-size:14px}

/* Taskbar Search */
#taskbar-search{
  display:flex;
  align-items:center;
  gap:8px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 0 14px;
  margin: 0;
  min-width: 240px;
  max-width: 320px;
  height: 100%;
  border-top: none;
  border-bottom: none;
  border-left: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}
#taskbar-search .search-icon{
  width: 16px;
  height: 16px;
  opacity: 0.7;
}
#taskbar-search input{
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fluent-text-primary);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
}
#taskbar-search input::placeholder{
  color: var(--fluent-text-tertiary);
}
#taskbar-search:hover{
  background: rgba(255, 255, 255, 0.05);
  border-right-color: rgba(255, 255, 255, 0.12);
}
#taskbar-search:focus-within{
  background: rgba(255, 255, 255, 0.08);
  border-right-color: rgba(96, 205, 255, 0.4);
}

#taskbar-quicklaunch{display:flex; align-items:center; gap:4px; margin-left:4px}
#taskbar-quicklaunch .ql{
  width:40px; 
  height:40px; 
  display:grid; 
  place-items:center; 
  background: transparent; 
  border:1px solid transparent; 
  border-radius: var(--radius-medium);
  transition: all 0.1s ease;
}
#taskbar-quicklaunch .ql:hover{
  background: var(--fluent-surface-hover);
}
#taskbar-quicklaunch .ql:active{
  background: var(--fluent-surface-pressed);
}
#taskbar-quicklaunch .fluent-icon{width:18px; height:18px;}

#taskbar-windows{flex:1 1 auto; display:flex; align-items:center; gap:4px; overflow-x:auto}
.task-button{
  display:flex; 
  align-items:center; 
  gap:10px; 
  max-width:220px; 
  padding:6px 12px; 
  height:40px; 
  background: var(--fluent-surface); 
  border:1px solid transparent; 
  color: var(--fluent-text-primary); 
  border-radius: var(--radius-medium);
  transition: all 0.1s ease;
}
.task-button:hover{
  background: var(--fluent-surface-hover);
}
.task-button.active{
  background: var(--fluent-accent);
  color: #000;
}
.task-button .fluent-icon{width:16px; height:16px;}

#system-tray{display:flex; align-items:center; gap:0px; margin-left:auto; height:100%;}
#system-tray .tray-box{
  display:flex; 
  align-items:center; 
  gap:8px; 
  padding:8px 12px; 
  border-radius: 0; 
  cursor:pointer;
  background: var(--fluent-surface-hover);
  border:1px solid transparent;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.1s ease;
  height: 100%;
}
#system-tray .tray-box:hover{
  background: var(--fluent-surface-hover);
}
#system-tray .fluent-icon{width:16px; height:16px; opacity:.9;}
#system-tray .clock-box{
  padding:8px 12px; 
  border-radius: 0; 
  color: var(--fluent-text-primary); 
  background: var(--fluent-surface-hover);
  border:1px solid transparent;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  cursor:pointer;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}
#system-tray .clock-box:hover{
  background: var(--fluent-surface-hover);
}
#clock{min-width:56px; text-align:center; font-variant-numeric: tabular-nums; display:inline-block; font-size:12px}

#system-tray .copilot-icon-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

#system-tray .copilot-icon-btn img{
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}


/* Action Center - Fluent Design */
#action-center{
  position:fixed; 
  inset:0 0 48px auto;
  z-index:1300; 
  pointer-events:none;
}

/* Full height when taskbar is hidden (tablet/gaming mode) */
#taskbar.hidden ~ #action-center{
  inset:0 0 0 auto;
}

#action-center.hidden .ac-panel{
  transform: translateX(100%);
  opacity: 0;
}
#action-center .ac-panel{
  pointer-events:auto; 
  position:absolute; 
  right:0; 
  top:0; 
  bottom:0; 
  width:auto; 
  min-width:380px; 
  max-width:min(480px, 50vw);
  background: var(--fluent-bg-layer);
  backdrop-filter: blur(60px);
  border-left:5px solid rgba(255, 255, 255, 0.1); 
  border-radius: 0; 
  box-shadow: var(--shadow-flyout); 
  display:flex; 
  flex-direction:column; 
  overflow:hidden;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
  transform: translateX(0);
  opacity: 1;
}

#action-center .ac-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.ac-header{
  padding: 12px 16px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.segmented-control{
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 8px;
}

.segment-btn{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--fluent-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
  font-weight: 500;
}

.segment-btn:hover{
  background: rgba(255, 255, 255, 0.05);
  color: var(--fluent-text-primary);
}

.segment-btn.active{
  background: var(--fluent-accent);
  color: #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.segment-btn .fluent-icon{
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.segment-btn.active .fluent-icon{
  opacity: 1;
  filter: brightness(0);
}

.segment-btn .label{
  white-space: nowrap;
}

.ac-section{padding:16px; overflow:auto; flex: 1 1 auto;}
.ac-grid{display:grid; grid-template-columns: repeat(3, 1fr); gap:8px}
.tile{
  display:flex; 
  flex-direction:column; 
  align-items:center; 
  justify-content:center;
  gap:8px; 
  padding:10px 8px; 
  background: var(--fluent-surface); 
  border:1px solid transparent; 
  border-radius: var(--radius-medium); 
  color: var(--fluent-text-primary);
  cursor: pointer;
  transition: all 0.1s ease;
  min-height: 60px;
}
.tile:hover{
  background: var(--fluent-surface-hover);
}
.tile:active{
  background: var(--fluent-surface-pressed);
}
.tile .fluent-icon{width:20px; height:20px;}
.tile .t{font-size:11px; text-align:center; font-weight: 400; margin-top: auto;}
.tile.active{
  background: var(--fluent-accent); 
  color: #000;
}
.tile.active .fluent-icon{filter: brightness(0);}

.slider-tile{
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--fluent-surface);
  border: 1px solid transparent;
  border-radius: var(--radius-medium);
  color: var(--fluent-text-primary);
  cursor: pointer;
  transition: all 0.1s ease;
  min-height: 48px;
  position: relative;
  overflow: hidden;
  grid-column: 1 / -1;
}

.slider-tile::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--slider-value, 70%);
  background: var(--fluent-accent);
  opacity: 1;
  transition: width 0.1s ease;
  pointer-events: none;
}

.slider-tile::after {
  content: '';
  position: absolute;
  left: var(--slider-value, 70%);
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ffffff;
  border-radius: 0;
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.3);
  transition: left 0.1s ease;
  pointer-events: none;
  z-index: 1;
}

.slider-tile:hover{
  background: var(--fluent-surface-hover);
}

.slider-tile .fluent-icon{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  filter: brightness(0);
}

.slider-tile .t{
  font-size: 11px;
  font-weight: 400;
  position: relative;
  z-index: 1;
  min-width: 70px;
  color: #000;
}

.slider-tile input[type="range"]{
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
}

.slider-tile input[type="range"]::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}

.slider-tile input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  border: none;
}

.slider-tile input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  border: none;
}

.slider-tile input[type="range"]::-moz-range-track {
  background: transparent;
  height: 100%;
  border: none;
}

.ac-controls{
  padding:12px 16px; 
  border-top:1px solid var(--fluent-divider); 
  display:flex; 
  flex-direction:column; 
  gap:12px; 
  background: var(--fluent-bg-secondary);
}
.ac-controls .ctrl{display:flex; align-items:center; gap:12px}
.ac-controls input[type="range"]{
  width:100%;
  height: 4px;
  background: var(--fluent-border);
  border-radius: 2px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.ac-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fluent-accent);
  cursor: pointer;
}
.ac-controls input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fluent-accent);
  cursor: pointer;
  border: none;
}

.ac-bottom{
  border-top:1px solid var(--fluent-divider); 
  background: var(--fluent-bg-secondary);
  margin-top: auto;
}
.ac-activeapps{
  display:flex; 
  flex-direction: column;
  align-items: flex-start;
  gap:12px;
  padding:12px 16px; 
  background: var(--fluent-bg-layer);
}
.ac-activeapps .title{font-weight:600; font-size: 12px; color: var(--fluent-text-secondary);}

.ac-battery-settings{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--fluent-bg-layer);
  border-top: 1px solid var(--fluent-divider);
  gap: 12px;
}

.ac-battery-settings .battery-info{
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fluent-text-primary);
  font-size: 14px;
  flex-shrink: 0;
}

.ac-battery-settings .battery-info .battery-icon{
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.ac-battery-settings .battery-info .fluent-icon{
  width: 20px;
  height: 20px;
}

.ac-battery-settings .battery-text{
  font-weight: 400;
}

.ac-battery-settings .icons{
  display:flex; 
  gap:12px; 
  color: var(--fluent-text-primary); 
  background: rgba(255, 255, 255, 0.03);
  border:1px solid rgba(255, 255, 255, 0.08); 
  border-radius: var(--radius-medium); 
  padding:8px 12px;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.ac-battery-settings .icons .icons-label{
  font-size: 12px;
  color: var(--fluent-text-secondary);
  font-weight: 400;
}

.ac-battery-settings .icons .fluent-icon{
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.ac-battery-settings .icons .icon{
  width:20px; 
  height:20px;
  border-radius: var(--radius-small);
  transition: all 0.1s ease;
}

.ac-battery-settings .icons .icon:hover{
  transform: scale(1.1);
}

.ac-battery-settings .icons .icon:nth-child(n+7){display:none}

.ac-battery-settings .settings-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: background 0.1s ease;
  color: var(--fluent-text-primary);
  flex-shrink: 0;
}

.ac-battery-settings .settings-btn:hover{
  background: var(--fluent-surface-hover);
}

.ac-battery-settings .settings-btn:active{
  background: var(--fluent-surface-pressed);
}

.ac-battery-settings .settings-btn .fluent-icon{
  width: 20px;
  height: 20px;
}

.ac-footer{display:flex; align-items:center; gap:8px; padding:12px 16px}
.ac-footer .btn{
  display:flex; 
  align-items:center; 
  gap:10px; 
  background: transparent; 
  border:1px solid var(--fluent-border); 
  border-radius: var(--radius-medium); 
  padding:8px 14px;
  cursor: pointer;
  transition: all 0.1s ease;
  font-size: 13px;
  color: var(--fluent-text-primary);
  font-weight: 500;
}
.ac-footer .btn:hover{
  background: var(--fluent-surface-hover);
  border-color: var(--fluent-border-hover);
}
.ac-footer .btn:active{
  background: var(--fluent-surface-pressed);
}
.ac-footer .btn .fluent-icon{width:16px; height:16px;}
.ac-footer .icon-btn{
  width:40px; 
  height:40px; 
  display:grid; 
  place-items:center; 
  background: transparent; 
  border:1px solid var(--fluent-border); 
  border-radius: var(--radius-medium);
  cursor: pointer;
  transition: all 0.1s ease;
}
.ac-footer .icon-btn:hover{
  background: var(--fluent-surface-hover);
  border-color: var(--fluent-border-hover);
}
.ac-footer .icon-btn:active{
  background: var(--fluent-surface-pressed);
}
.ac-footer .icon-btn .fluent-icon{width:16px; height:16px;}
.ac-footer .spacer{flex:1}

/* Time & Calendar Center / Copilot Center - Fluent Design */
#copilot-center{
  position:fixed; 
  inset:0 0 48px auto; 
  z-index:1299; 
  pointer-events:none;
}

/* Full height when taskbar is hidden (tablet/gaming mode) */
#taskbar.hidden ~ #copilot-center{
  inset:0 0 0 auto;
}

#copilot-center.hidden .cc-panel{
  transform: translateX(100%);
  opacity: 0;
}
#copilot-center .cc-panel{
  pointer-events:auto; 
  position:absolute; 
  right:0; 
  top:0; 
  bottom:0; 
  min-width:400px; 
  max-width:min(540px, 50vw);
  background: var(--fluent-bg-layer);
  backdrop-filter: blur(60px);
  border:none; 
  border-radius: 0; 
  box-shadow: var(--shadow-flyout); 
  display:flex; 
  flex-direction:column; 
  gap:12px; 
  padding:16px; 
  overflow:auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
  transform: translateX(0);
  opacity: 1;
}

/* Modern Fluent scrollbar for copilot center */
#copilot-center .cc-panel::-webkit-scrollbar {
  width: 12px;
}

#copilot-center .cc-panel::-webkit-scrollbar-track {
  background: transparent;
}

#copilot-center .cc-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: padding-box;
  transition: background 0.2s ease;
}

#copilot-center .cc-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
  border: 3px solid transparent;
  background-clip: padding-box;
}

#copilot-center .cc-panel::-webkit-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.6);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.card{
  background: var(--fluent-surface); 
  border:1px solid var(--fluent-border); 
  border-radius: var(--radius-medium);
}
.cc-weather{display:flex; gap:16px; padding:16px}
.cc-weather .sun{font-size:48px;}
.cc-weather .temp{font-weight:700; font-size:32px; color: var(--fluent-text-primary);}
.cc-weather .unit{font-weight:500; font-size:16px; margin-left:4px}
.cc-weather .place{font-weight:600; color: var(--fluent-text-primary);}
.cc-weather .conditions{font-size:13px; color: var(--fluent-text-secondary);}
.cc-weather .link{
  margin-top:8px; 
  background:transparent; 
  border:0; 
  color: var(--fluent-accent); 
  cursor: pointer;
  font-size: 13px;
}
.cc-weather .w-left{display:flex; align-items:center; gap:12px}
.cc-weather .w-right{display:flex; flex-direction:column}

.cc-time{padding:16px; display:flex; flex-direction:column; gap:8px; align-items:center; text-align:center}
.cc-time .time-row{display:flex; align-items:baseline; gap:8px; color: var(--fluent-text-primary); justify-content:center;}
.cc-time .big-time{font-size:48px; font-weight:700;}
.cc-time .ampm{font-size:16px; font-weight:600; color: var(--fluent-text-secondary);}
.cc-time .date-row{font-size:14px; color: var(--fluent-text-secondary);}
.cc-time .alarm-row{display:flex; align-items:center; gap:8px; color: var(--fluent-text-secondary); justify-content:center;}
.cc-time .fluent-icon{width:16px; height:16px;}

.cc-schedule{padding:16px}
.cc-schedule header{font-weight:600; color: var(--fluent-text-primary); margin-bottom:12px; font-size: 14px;}
.cc-schedule .events{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px}
.cc-schedule .events li{display:grid; grid-template-columns:60px 10px 1fr; align-items:center; gap:8px}
.cc-schedule .events .time{font-size:12px; color: var(--fluent-text-secondary);}
.cc-schedule .events .dot{width:8px; height:8px; border-radius:50%; background: var(--fluent-accent);}
.cc-schedule .events .dot.all{background:#ff8c00}
.cc-schedule .events .name{font-size:13px; color: var(--fluent-text-primary);}

.cc-calendar{padding:16px}
.cc-cal-header{
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  margin-bottom:12px; 
  color: var(--fluent-text-primary);
  font-weight: 600;
}
.cc-cal-header .nav{
  background: var(--fluent-surface-hover); 
  border:1px solid transparent; 
  border-radius: var(--radius-small); 
  width:32px; 
  height:32px;
  cursor: pointer;
  transition: all 0.1s ease;
}
.cc-cal-header .nav:hover{
  background: var(--fluent-surface-pressed);
}
.cc-calendar .dow{
  font-size:11px; 
  color: var(--fluent-text-tertiary); 
  letter-spacing:.5px; 
  margin:4px 2px; 
  font-weight: 600;
}
.cc-cal-grid{display:grid; grid-template-columns: repeat(7, 1fr); gap:4px}
.cc-day{
  aspect-ratio:1/1; 
  display:grid; 
  place-items:center; 
  border:1px solid transparent; 
  border-radius: var(--radius-small); 
  background: transparent; 
  color: var(--fluent-text-primary);
  cursor: pointer;
  transition: all 0.1s ease;
  font-size: 13px;
}
.cc-day:hover{
  background: var(--fluent-surface-hover);
}
.cc-day.muted{color: var(--fluent-text-tertiary);}
.cc-day.today{
  background: var(--fluent-accent); 
  color: #000; 
  font-weight:600;
}

/* Copilot Chatbox */
.cc-chatbox{
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--fluent-bg-layer);
  border-top: 1px solid var(--fluent-border);
  padding: 12px 16px 8px 16px;
  margin: -16px -16px 0 -16px;
  z-index: 10;
}

.chatbox-input-wrapper{
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fluent-surface);
  border: 1px solid var(--fluent-border);
  border-radius: 24px;
  padding: 8px 16px;
  transition: all 0.2s ease;
  position: relative;
}

.chatbox-input-wrapper::before{
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(135deg, 
    #60cdff 0%, 
    #a855f7 25%, 
    #ec4899 50%, 
    #f59e0b 75%, 
    #60cdff 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 1;
  animation: rotate-gradient 3s linear infinite;
  pointer-events: none;
}

.chatbox-input-wrapper:focus-within::before{
  opacity: 1;
}

@keyframes rotate-gradient {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

.chatbox-input-wrapper:focus-within{
  border-color: transparent;
  background: var(--fluent-bg-tertiary);
}

.chatbox-mode-dropdown{
  background: var(--fluent-bg-tertiary);
  border: 1px solid var(--fluent-border);
  border-radius: 16px;
  padding: 6px 12px 6px 14px;
  margin-right: 8px;
  color: var(--fluent-text-primary);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2360cdff' d='M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.chatbox-mode-dropdown:hover{
  background: var(--fluent-surface-hover);
  border-color: var(--fluent-border-hover);
}

.chatbox-mode-dropdown:focus{
  border-color: var(--fluent-accent);
  background: var(--fluent-surface);
}

.chatbox-mode-dropdown option{
  background: var(--fluent-surface);
  color: var(--fluent-text-primary);
  padding: 8px;
}

.chatbox-input{
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fluent-text-primary);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}

.chatbox-input::placeholder{
  color: var(--fluent-text-tertiary);
}

.chatbox-send{
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--fluent-text-secondary);
}

.chatbox-send:hover{
  background: var(--fluent-surface-hover);
  color: var(--fluent-text-primary);
}

.chatbox-send:active{
  background: var(--fluent-surface-pressed);
  transform: scale(0.95);
}

.send-icon{
  font-size: 20px;
  display: block;
}

/* Start Menu - Fluent Design */
#start-menu{
  position:fixed; 
  top:0; 
  bottom:48px; 
  left:0;
  width:50vw; 
  height:auto; 
  background: var(--fluent-bg-layer);
  backdrop-filter: blur(60px);
  border:none; 
  border-radius: 0;
  box-shadow: var(--shadow-flyout); 
  overflow:hidden; 
  z-index:1200;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
  transform: translateX(0);
  opacity: 1;
}

/* Full height when taskbar is hidden (tablet/gaming mode) */
#taskbar.hidden ~ #start-menu{
  bottom: 0;
}

#start-menu.hidden{
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.start-modern{display:flex; height:100%; min-width:0;}
.start-rail{
  width:72px; 
  background: var(--fluent-surface);
  color: var(--fluent-text-primary); 
  padding:8px; 
  display:flex; 
  flex-direction:column; 
  gap:8px;
  border-right: 1px solid var(--fluent-border);
}
.start-rail .rail-btn{
  width:100%; 
  min-height:64px; 
  padding:8px 4px; 
  display:flex; 
  flex-direction:column; 
  align-items:center; 
  justify-content:center; 
  gap:4px; 
  background: transparent; 
  border:1px solid transparent; 
  border-radius: var(--radius-medium); 
  color: var(--fluent-text-primary); 
  text-align:center;
  cursor: pointer;
  transition: all 0.1s ease;
}
.start-rail .rail-btn:hover{
  background: var(--fluent-surface-hover);
}
.start-rail .rail-btn:active{
  background: var(--fluent-surface-pressed);
}
.start-rail .rail-btn.active{
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}
.start-rail .rail-btn.danger{
  background: #c50f1f;
  color: #fff;
}
.start-rail .rail-btn.danger:hover{
  background: #a80d16;
}
.start-rail .rail-btn .fluent-icon{
  width:24px; 
  height:24px;
}
.start-rail .rail-btn .label{
  font-size:10px; 
  line-height:1.2;
}
.start-rail .rail-spacer{flex:1 1 auto}

.start-content{
  flex:1 1 auto; 
  min-width:0; 
  display:flex; 
  flex-direction:column; 
  overflow:auto;
  background: var(--fluent-bg-secondary);
  color: var(--fluent-text-primary);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Modern Fluent scrollbar for start menu */
.start-content::-webkit-scrollbar {
  width: 12px;
}

.start-content::-webkit-scrollbar-track {
  background: transparent;
}

.start-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: padding-box;
  transition: background 0.2s ease;
}

.start-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.start-content::-webkit-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.6);
  border: 3px solid transparent;
  background-clip: padding-box;
}
.start-search{
  display:flex; 
  align-items:center; 
  gap:12px; 
  padding:32px 40px 24px 40px; 
  border-bottom:1px solid transparent;
  position:sticky;
  top:0;
  background: var(--fluent-bg-primary);
  z-index:10;
}

.search-input-wrapper{
  flex:1;
  position:relative;
  display:flex;
  align-items:center;
}

.search-input-wrapper .fluent-icon{
  position:absolute;
  left:18px;
  width:22px;
  height:22px;
  color: var(--fluent-text-secondary);
  pointer-events:none;
  z-index:1;
}

.start-search input{
  flex:1 1 auto; 
  height:52px; 
  border-radius: 26px; 
  border:2px solid rgba(255, 255, 255, 0.08); 
  padding:0 24px 0 52px; 
  background: rgba(255, 255, 255, 0.05); 
  color: var(--fluent-text-primary);
  transition: all 0.2s ease;
  width:100%;
  font-size:15px;
}

.start-search input::placeholder{
  color: var(--fluent-text-secondary);
  opacity: 0.7;
}

.start-search input:hover{
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.start-search input:focus{
  border-color: rgba(96, 205, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 205, 255, 0.15);
}

.edit-mode-btn{
  height:36px;
  padding:0 16px;
  display:flex;
  align-items:center;
  gap:6px;
  background: var(--fluent-surface);
  border:1px solid var(--fluent-border);
  border-radius: var(--radius-medium);
  color: var(--fluent-text-primary);
  font-size:13px;
  font-weight:500;
  cursor:pointer;
  transition: all 0.15s ease;
  white-space:nowrap;
}

.edit-mode-btn:hover{
  background: var(--fluent-surface-hover);
  border-color: var(--fluent-accent);
}

.edit-mode-btn.active{
  background: var(--fluent-accent);
  border-color: var(--fluent-accent);
  color: #fff;
}

.edit-mode-btn .fluent-icon{
  width:16px;
  height:16px;
}

/* Section header */
.start-section{padding:12px 16px 0}
.section-title{
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  color: var(--fluent-text-primary); 
  font-weight:600; 
  padding:0 4px 8px;
  font-size: 14px;
}
.section-title .link{
  background:transparent; 
  border:0; 
  color: var(--fluent-accent); 
  cursor: pointer;
  transition: opacity 0.1s ease;
}
.section-title .link:hover{
  opacity: 0.8;
}
.section-title .link[disabled]{
  opacity:.4;
  cursor: not-allowed;
}

.pinned-grid{
  padding:8px 12px 16px; 
  display:grid; 
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
  gap: 8px;
}
.pinned-grid .app-tile:nth-child(n+9){ display:none; }
.app-tile{
  display:flex; 
  flex-direction:column; 
  align-items:center; 
  gap:8px; 
  padding:12px 8px; 
  background: var(--fluent-surface); 
  border:1px solid transparent; 
  border-radius: var(--radius-medium); 
  color: var(--fluent-text-primary); 
  min-height:96px;
  cursor: pointer;
  transition: all 0.1s ease;
}
.app-tile:hover{
  background: var(--fluent-surface-hover);
}
.app-tile:active{
  background: var(--fluent-surface-pressed);
}
.app-tile .fluent-icon{
  width:40px; 
  height:40px;
}
.app-tile .label{
  font-size:12px; 
  text-align:center;
  color: var(--fluent-text-primary);
}

.category-grid{
  padding:12px 12px 20px; 
  display:grid; 
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
  gap:12px;
}
.category-card{
  background: var(--fluent-surface); 
  border:1px solid var(--fluent-border); 
  border-radius: var(--radius-medium); 
  padding:16px; 
  display:flex; 
  flex-direction:column; 
  align-items:center; 
  gap:12px;
}
.category-icons{
  display:grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap:8px;
}
.app-icon{
  width:48px; 
  height:48px; 
  display:grid; 
  place-items:center; 
  background: var(--fluent-surface-hover); 
  border:1px solid transparent; 
  border-radius: var(--radius-small); 
  cursor: pointer;
  transition: all 0.1s ease;
}
.app-icon:hover{
  background: var(--fluent-surface-pressed);
}
.app-icon .fluent-icon{
  width:32px; 
  height:32px;
}
.category-label{
  font-size:12px; 
  color: var(--fluent-text-secondary);
}

/* Apps List - Vertical Layout */
.apps-list{
  padding:0 12px 20px;
  display:flex;
  flex-direction:column;
  gap:0;
}

.app-letter-group{
  display:flex;
  flex-direction:column;
}

.letter-header{
  font-size:13px;
  font-weight:600;
  color: var(--fluent-text-secondary);
  padding:12px 16px 8px;
  margin-top:8px;
  position:sticky;
  top:0;
  background: var(--fluent-bg-secondary);
  z-index:1;
}

.app-list-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 16px;
  background:transparent;
  border:none;
  border-radius: var(--radius-small);
  cursor:pointer;
  transition: background 0.1s ease;
  text-align:left;
  width:100%;
}

.app-list-item:hover{
  background: var(--fluent-surface-hover);
}

.app-list-item:active{
  background: var(--fluent-surface-pressed);
}

.app-list-item .icon{
  width:32px;
  height:32px;
  flex-shrink:0;
}

.app-list-item .label{
  font-size:14px;
  color: var(--fluent-text-primary);
  font-weight:400;
}

/* Search View */
.search-view{
  display:flex;
  flex-direction:column;
  height:100%;
  width:100%;
}

.search-filters{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px 16px;
  border-bottom: 1px solid var(--fluent-divider);
  display: none;
}

.search-filters.visible{
  display: flex;
}

.filter-btn{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--fluent-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--fluent-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.filter-btn:hover{
  background: var(--fluent-surface-hover);
  border-color: var(--fluent-border-hover);
  color: var(--fluent-text-primary);
}

.filter-btn.active{
  background: var(--fluent-accent);
  border-color: var(--fluent-accent);
  color: #ffffff;
}

.filter-btn.active:hover{
  background: var(--fluent-accent-hover);
  border-color: var(--fluent-accent-hover);
}

.filter-btn .fluent-icon{
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.filter-btn.active .fluent-icon{
  filter: brightness(0) invert(1);
  opacity: 1;
}

.filter-label{
  line-height: 1;
}

.search-results-container{
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.search-recent-state{
  padding: 24px 32px;
}

.search-recent-state .recent-header{
  margin-bottom: 16px;
}

.search-recent-state .recent-header h3{
  font-size: 16px;
  font-weight: 600;
  color: var(--fluent-text-primary);
  margin: 0;
}

.recent-items{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.recent-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-medium);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.recent-item:hover{
  background: var(--fluent-surface-hover);
}

.recent-item:active{
  background: var(--fluent-surface-pressed);
  transform: scale(0.98);
}

.recent-item .recent-icon{
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.recent-item .recent-title{
  font-size: 14px;
  font-weight: 400;
  color: var(--fluent-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-empty-state{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 48px 32px;
  text-align: center;
}

.search-empty-state .fluent-icon{
  width: 64px;
  height: 64px;
  opacity: 0.3;
  margin-bottom: 24px;
}

.search-empty-state h3{
  font-size: 18px;
  font-weight: 600;
  color: var(--fluent-text-primary);
  margin: 0 0 8px 0;
}

.search-empty-state p{
  font-size: 14px;
  color: var(--fluent-text-secondary);
  margin: 0;
}

.search-results{
  padding: 16px 0;
}

.search-category{
  margin-bottom: 32px;
  padding: 0 32px;
}

.search-category:last-child{
  margin-bottom: 16px;
}

.search-category .category-header{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 4px;
  justify-content: flex-start;
}

.search-category .category-header .fluent-icon{
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.search-category .category-header h3{
  font-size: 14px;
  font-weight: 600;
  color: var(--fluent-text-secondary);
  margin: 0;
  text-transform: none;
  letter-spacing: 0.3px;
}

.search-items{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-item{
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-medium);
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.search-result-item:hover{
  background: var(--fluent-surface-hover);
}

.search-result-item:active{
  background: var(--fluent-surface-pressed);
  transform: scale(0.99);
}

.search-result-item .result-icon{
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.search-result-item .result-content{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-result-item .result-title{
  font-size: 14px;
  font-weight: 500;
  color: var(--fluent-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item .result-subtitle{
  font-size: 12px;
  color: var(--fluent-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item .result-arrow{
  width: 16px;
  height: 16px;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.search-result-item .result-arrow .fluent-icon{
  width: 16px;
  height: 16px;
}

.search-result-item:hover .result-arrow{
  opacity: 0.6;
}

/* Widgets View */
.widgets-view{
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.widgets-container{
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

.widgets-header{
  margin-bottom: 24px;
}

.widgets-header h2{
  font-size: 28px;
  font-weight: 600;
  color: var(--fluent-text-primary);
  margin: 0;
}

.widgets-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  grid-auto-flow: dense;
}

.widget{
  background: var(--fluent-surface);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
  overflow: hidden;
}

.widget:hover{
  background: var(--fluent-surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.widget-small{
  grid-column: span 1;
  grid-row: span 1;
}

.widget-medium{
  grid-column: span 2;
  grid-row: span 1;
}

.widget-large{
  grid-column: span 2;
  grid-row: span 2;
}

.widget-square{
  grid-column: span 1;
  grid-row: span 1;
  aspect-ratio: 1;
}

.widget-tall{
  grid-column: span 2;
  grid-row: span 2;
}

.widget-header{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.widget-header .fluent-icon{
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.widget-title{
  font-size: 13px;
  font-weight: 600;
  color: var(--fluent-text-primary);
}

.widget-content{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* News Widget */
.news-content{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.news-headline{
  font-size: 14px;
  font-weight: 500;
  color: var(--fluent-text-primary);
  line-height: 1.4;
}

.news-source{
  font-size: 11px;
  color: var(--fluent-text-tertiary);
}

/* To Do Widget */
.todo-content{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: background 0.15s ease;
}

.todo-item:hover{
  background: rgba(255, 255, 255, 0.08);
}

.todo-checkbox{
  width: 18px;
  height: 18px;
  border: 2px solid var(--fluent-border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--fluent-accent);
}

.todo-item.completed .todo-checkbox{
  background: var(--fluent-accent);
  border-color: var(--fluent-accent);
  color: white;
}

.todo-text{
  font-size: 12px;
  color: var(--fluent-text-primary);
  flex: 1;
}

.todo-item.completed .todo-text{
  color: var(--fluent-text-tertiary);
  text-decoration: line-through;
}

/* Outlook Widget */
.outlook-content{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.email-item{
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: background 0.15s ease;
  cursor: pointer;
}

.email-item:hover{
  background: rgba(255, 255, 255, 0.08);
}

.email-subject{
  font-size: 12px;
  font-weight: 500;
  color: var(--fluent-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-time{
  font-size: 10px;
  color: var(--fluent-text-tertiary);
}

/* OneNote Widget */
.onenote-content{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.note-item{
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: background 0.15s ease;
  cursor: pointer;
}

.note-item:hover{
  background: rgba(255, 255, 255, 0.08);
}

.note-title{
  font-size: 12px;
  font-weight: 500;
  color: var(--fluent-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gaming Widget */
.gaming-content{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.game-item:hover{
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.game-icon{
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.game-info{
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.game-title{
  font-size: 13px;
  font-weight: 600;
  color: var(--fluent-text-primary);
}

.game-subtitle{
  font-size: 11px;
  color: var(--fluent-text-secondary);
}

/* Notifications View - Live Tiles */
.notifications-view{
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.notifications-container{
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

.notifications-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.notifications-header h2{
  font-size: 28px;
  font-weight: 600;
  color: var(--fluent-text-primary);
  margin: 0;
}

.notification-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

.dnd-btn{
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fluent-text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dnd-btn:hover{
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.dnd-btn.active{
  background: var(--fluent-accent);
  border-color: var(--fluent-accent);
  color: white;
}

.dnd-icon{
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-all-btn{
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.clear-all-btn:hover{
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.live-tiles-grid{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.live-tile{
  position: relative;
  background: var(--fluent-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.live-tile:hover{
  background: var(--fluent-surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.12);
}

.live-tile::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.tile-actions{
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.live-tile:hover .tile-actions{
  opacity: 1;
}

.tile-action-btn{
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tile-action-btn:hover{
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.tile-small{
  min-height: 120px;
}

.tile-medium{
  min-height: 120px;
}

.tile-wide{
  min-height: 120px;
}

.tile-content{
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  z-index: 1;
}

.tile-left{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.tile-icon-wrapper{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-icon{
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.tile-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--fluent-accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tile-app-name{
  font-size: 12px;
  font-weight: 500;
  color: white;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  margin: 0;
}

.tile-preview{
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  margin: 0;
  align-self: center;
}

.tile-small .tile-content{
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tile-small .tile-app-name{
  font-size: 12px;
  text-align: center;
}

/* Modern Uniform Dark Tiles */
/* All tiles (.tile-outlook, .tile-whatsapp, .tile-teams, .tile-edge, .tile-spotify, 
   .tile-calendar, .tile-clock, .tile-discord, .tile-store, .tile-photos, .tile-onedrive)
   now inherit the default .live-tile styling for a clean, uniform, modern Fluent Design look */

/* Calendar Large Display */
.calendar-large{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.calendar-date-large{
  font-size: 32px;
  font-weight: 600;
  color: white;
  line-height: 1;
}

.calendar-month-large{
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Clock Large Display */
.clock-large{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.clock-time-large{
  font-size: 28px;
  font-weight: 300;
  color: white;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clock-period-large{
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

/* Start Menu Views */
.start-view{
  display:flex;
  flex-direction:column;
  height:100%;
  width:100%;
}

.start-view.hidden{
  display:none;
}

/* Home View - Categories */
.home-categories-container{
  flex:1;
  overflow-y:auto;
  padding:16px 48px;
}

.home-category{
  margin-bottom:48px;
}

.category-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
  padding:0 8px;
}

.category-title-group{
  display:flex;
  align-items:center;
  gap:8px;
}

.category-title{
  font-size:16px;
  font-weight:600;
  color: var(--fluent-text-primary);
  margin:0;
}

.category-edit-actions{
  display:none;
  gap:6px;
  margin-left:8px;
}

.category-edit-actions.visible{
  display:flex;
}

.category-action-btn{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  background: var(--fluent-surface);
  border:1px solid var(--fluent-border);
  border-radius: var(--radius-small);
  cursor:pointer;
  transition: all 0.15s ease;
  color: var(--fluent-text-secondary);
}

.category-action-btn:hover{
  background: var(--fluent-surface-hover);
  color: var(--fluent-text-primary);
  border-color: var(--fluent-accent);
}

.category-action-btn.delete:hover{
  background: #c50f1f;
  color: #fff;
  border-color: #c50f1f;
}

.category-action-btn svg{
  width:14px;
  height:14px;
}

.category-controls{
  display:flex;
  gap:8px;
}
.scroll-btn{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  background: rgba(255, 255, 255, 0.12);
  border:1px solid rgba(255, 255, 255, 0.15);
  border-radius:50%;
  cursor:pointer;
  transition: all 0.15s ease;
  color: var(--fluent-text-primary);
  backdrop-filter: blur(20px);
}

.scroll-btn:hover{
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.scroll-btn:active{
  background: rgba(255, 255, 255, 0.15);
  transform:scale(0.95);
}

.home-apps-row{
  display:flex;
  gap:16px;
  overflow-x:auto;
  scroll-behavior:smooth;
  padding:8px;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.home-apps-row::-webkit-scrollbar{
  display:none;
}

.home-app-tile{
  flex-shrink:0;
  width:140px;
  height:140px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  background: rgba(255, 255, 255, 0.12);
  border:none;
  border-radius: 12px;
  cursor:pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding:16px 12px 12px 12px;
  position:relative;
  overflow:hidden;
  backdrop-filter: blur(20px);
}

.home-app-tile::before{
  content:'';
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, rgba(96, 205, 255, 0.1) 0%, rgba(96, 205, 255, 0) 50%);
  opacity:0;
  transition: opacity 0.2s ease;
  pointer-events:none;
}

.home-app-tile:hover{
  background: rgba(255, 255, 255, 0.18);
  transform:scale(1.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.2) inset;
}

.home-app-tile:hover::before{
  opacity:1;
}

.home-app-tile:active{
  transform:scale(0.98);
  background: rgba(255, 255, 255, 0.15);
}

.home-app-tile .icon{
  width:64px;
  height:64px;
  flex-shrink:0;
  border-radius: 14px;
  transition: transform 0.2s ease;
}

.home-app-tile:hover .icon{
  transform:scale(1.05);
}

.home-app-tile .label{
  font-size:13px;
  font-weight:500;
  color: var(--fluent-text-primary);
  text-align:center;
  line-height:1.3;
  word-wrap:break-word;
  max-width:100%;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.home-app-tile.add-tile{
  display:none;
  background: rgba(255, 255, 255, 0.02);
  border:2px dashed rgba(96, 205, 255, 0.3);
}

.home-app-tile.add-tile.visible{
  display:flex;
}

.home-app-tile.add-tile:hover{
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(96, 205, 255, 0.5);
}

.home-app-tile.add-tile .add-ico{
  opacity:0.6;
  transition: opacity 0.2s ease;
}

.home-app-tile.add-tile:hover .add-ico{
  opacity:1;
}

.home-app-tile .add-icon{
  width:32px;
  height:32px;
  color: var(--fluent-text-secondary);
}

/* Windows - Fluent Design */
#window-layer{position:absolute; inset:0; pointer-events:none}
.window{
  position:absolute; 
  min-width:320px; 
  min-height:200px; 
  background: var(--fluent-bg-secondary); 
  border:1px solid var(--fluent-border); 
  border-radius: var(--radius-medium); 
  box-shadow: var(--shadow-dialog); 
  overflow:hidden; 
  pointer-events:auto;
}
.window .titlebar{
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  height:32px; 
  padding:0 8px; 
  background: var(--fluent-surface);
  backdrop-filter: blur(30px);
  color: var(--fluent-text-primary); 
  user-select:none; 
  cursor:move;
  border-bottom: 1px solid var(--fluent-divider);
}
.window .title{
  display:flex; 
  align-items:center; 
  gap:8px; 
  font-weight:600;
  font-size: 13px;
}
.window .title .fluent-icon{
  width:16px; 
  height:16px;
}
.window .controls{display:flex; gap:4px}
.window .controls button{
  width:32px; 
  height:24px; 
  border:1px solid transparent; 
  border-radius: var(--radius-small); 
  background: transparent; 
  color: var(--fluent-text-primary);
  cursor: pointer;
  transition: all 0.1s ease;
}
.window .controls button .fluent-icon{
  width:12px; 
  height:12px;
}
.window .controls button:hover{
  background: var(--fluent-surface-hover);
}
.window .controls button:active{
  background: var(--fluent-surface-pressed);
}
.window .controls button.close:hover{
  background: #c50f1f;
  color: #fff;
}
.window .content{
  padding:12px; 
  height:calc(100% - 32px); 
  overflow:auto;
  background: var(--fluent-bg-primary);
}
.window.maximized{
  inset:0 0 48px 0 !important; 
  width:auto !important; 
  height:auto !important;
  border-radius: 0;
}
.window.minimized{display:none}

/* Selections & helpers */
.hidden{display:none}
.dragging{opacity:.9; cursor: grabbing;}

/* Initial positions for icons in a simple grid */
.desktop-icon:nth-child(1){left:16px; top:16px}
.desktop-icon:nth-child(2){left:16px; top:120px}
.desktop-icon:nth-child(3){left:16px; top:224px}

@media (max-width:600px){
  :root{ --xp-icon-size:44px }
  #start-menu{width:92vw}
  .taskbar{height: 56px;}
  #start-menu{bottom: 64px;}
  .window.maximized{inset:0 0 56px 0 !important;}
}

