/* ================================================
   XP-DESKTOP.CSS — Moldura Windows XP
   Desktop + janelas + taskbar + media player + lixeira
   ================================================ */

:root {
  --xp-blue-dk:    #0a246a;
  --xp-blue-md:    #1c56b8;
  --xp-blue-lt:    #2a7ade;
  --xp-grey:       #ece9d8;
  --xp-border-lt:  #ffffff;
  --xp-border-dk:  #a0a0a0;
  --xp-border-dk2: #404040;
  --xp-green:      #3a9c3a;
  --xp-font: 'Tahoma', 'Segoe UI', sans-serif;
}

#xp-desktop, #xp-desktop * { box-sizing: border-box; }

#xp-desktop {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0; left: 0;
  overflow: hidden;
  font-family: var(--xp-font);
  font-size: 12px;
  color: #000;
  z-index: 0;

  /*
    ══════════════════════════════════════════
    FUNDO: Troque pela imagem que você escolher.
    ══════════════════════════════════════════
  */
  background-image: url('assets/img/background/xereka.jpg');
  background-size: cover;
  background-position: center;
  background-color: #1a3a6a;
}

/* ════════════════════════════════
   ÍCONES DO DESKTOP (arrastáveis)
   ════════════════════════════════ */
#xp-desktop-icons {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: calc(100% - 30px);
  z-index: 2;
}

.xp-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 76px;
  cursor: pointer;
  user-select: none;
  z-index: 3;
}

.xp-icon.dragging { z-index: 500; opacity: 0.85; cursor: grabbing; }

.xp-icon-img { image-rendering: auto; filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.6)); pointer-events: none; }

.xp-icon-label {
  font-size: 11px;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
  line-height: 1.2;
  padding: 1px 3px;
  pointer-events: none;
}

.xp-icon.selected .xp-icon-label,
.xp-icon:hover .xp-icon-label {
  background: rgba(49,106,197,0.55);
  outline: 1px dotted #fff;
}

/* Área da lixeira recebendo um ícone (drop target highlight) */
#xp-icon-trash.xp-drop-hover .xp-icon-img {
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 10px #5ad);
}

/* ════════════════════════════════
   JANELAS (genérico)
   ════════════════════════════════ */
.xp-window {
  position: absolute;
  background: var(--xp-grey);
  border-top: 1px solid var(--xp-border-lt);
  border-left: 1px solid var(--xp-border-lt);
  border-right: 1px solid var(--xp-border-dk2);
  border-bottom: 1px solid var(--xp-border-dk2);
  border-radius: 6px 6px 0 0;
  box-shadow: 4px 6px 16px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.4);
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 260px;
  min-height: 160px;
}

.xp-window.active { z-index: 200; }
.xp-window.minimized { display: none !important; }
.xp-window.maximized {
  top: 0 !important; left: 0 !important;
  width: 100vw !important; height: calc(100vh - 30px) !important;
  border-radius: 0;
}

/* ── TITLEBAR ── */
.xp-titlebar {
  height: 28px;
  background: linear-gradient(180deg,
    #4a9cf0 0%, #1666c7 10%, #1457b5 18%, #0d47a1 45%,
    #0a3d91 55%, #1457b5 80%, #1f72d8 100%);
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 5px;
  cursor: move;
  flex-shrink: 0;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

.xp-titlebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.05) 70%, transparent 100%);
  pointer-events: none;
}

.xp-wmp-titlebar {
  background: linear-gradient(180deg, #2a2a4e 0%, #1a1a3a 50%, #0a0a2a 100%) !important;
}

.xp-title-icon { font-size: 14px; position: relative; z-index: 1; }
.xp-title-text {
  flex: 1; color: #fff; font-size: 11px; font-weight: bold;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative; z-index: 1;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

.xp-controls { display: flex; gap: 2px; position: relative; z-index: 1; }
.xp-btn {
  width: 21px; height: 21px;
  background: linear-gradient(180deg, #f0f6ff 0%, #d4e4f7 40%, #a8c4e8 100%);
  border: 1px solid #7a9fd4;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.8);
}
.xp-btn:hover { filter: brightness(1.1); }
.xp-btn:active { box-shadow: inset 0 2px 4px rgba(0,0,0,0.3); }
.xp-btn.close { background: linear-gradient(180deg, #ff8080 0%, #e46060 40%, #b01818 100%); border-color: #a01010; color: #fff; }

/* ── MENUBAR / TOOLBAR / ADDRESSBAR ── */
.xp-menubar {
  height: 20px;
  background: var(--xp-grey);
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 2px;
  border-bottom: 1px solid var(--xp-border-dk);
  flex-shrink: 0;
}
.xp-menubar span { padding: 1px 6px; cursor: pointer; font-size: 11px; border-radius: 2px; }
.xp-menubar span:hover { background: var(--xp-blue-lt); color: #fff; }

.xp-toolbar {
  height: 30px;
  background: var(--xp-grey);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-bottom: 1px solid var(--xp-border-dk);
  flex-shrink: 0;
}
.xp-toolbtn {
  background: transparent;
  border: 1px solid transparent;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 3px;
  font-family: var(--xp-font);
}
.xp-toolbtn:hover {
  border-color: var(--xp-border-dk);
  background: linear-gradient(180deg, #fff, #e8f0fc);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.xp-addressbar {
  height: 26px;
  background: var(--xp-grey);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-bottom: 1px solid var(--xp-border-dk);
  flex-shrink: 0;
}
.xp-addressbar > span:first-child { font-size: 11px; color: #555; }
.xp-address-input {
  flex: 1;
  background: #fff;
  border: 1px solid var(--xp-border-dk);
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 11px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}
.xp-go {
  background: linear-gradient(180deg, #fff, var(--xp-grey));
  border: 1px solid var(--xp-border-dk);
  border-radius: 2px;
  padding: 2px 10px;
  font-size: 11px;
  cursor: pointer;
}
.xp-go:hover { background: linear-gradient(180deg, #fff, #e8f0fc); }

/* ── IFRAME WRAP ── */
.xp-iframe-wrap { flex: 1; background: #fff; overflow: hidden; position: relative; }
#xp-browser-frame { width: 100%; height: 100%; border: none; display: block; }

.xp-statusbar {
  height: 20px;
  background: var(--xp-grey);
  border-top: 1px solid var(--xp-border-dk);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
  font-size: 10px;
  color: #555;
  flex-shrink: 0;
}
.xp-status-sep { width: 1px; height: 12px; background: var(--xp-border-dk); }

/* Resize handle decorativo */
.xp-window::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 14px; height: 14px;
  background: linear-gradient(135deg, transparent 50%, var(--xp-border-dk) 50%);
  pointer-events: none;
}

/* ════════════════════════════════
   WINDOWS MEDIA PLAYER (funcional)
   ════════════════════════════════ */
.xp-wmp-body {
  background: linear-gradient(180deg, #e8e8f4 0%, #d0d0e8 100%);
  padding: 12px;
}

.xp-wmp-screen {
  display: flex;
  gap: 10px;
  background: #000;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.xp-wmp-art {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #4455aa, #2233aa);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.xp-wmp-info { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.xp-wmp-track { color: #fff; font-size: 13px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-wmp-artist { color: #aaccff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.xp-wmp-progress { height: 8px; background: #ccc; border-radius: 4px; margin-bottom: 4px; overflow: hidden; cursor: pointer; }
.xp-wmp-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #4455cc, #6677ee); }

.xp-wmp-time-row { display: flex; justify-content: space-between; font-size: 10px; color: #555; margin-bottom: 10px; }

.xp-wmp-controls { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.xp-wmp-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid #999;
  background: linear-gradient(180deg, #fff, #ddd);
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.xp-wmp-btn.play { background: linear-gradient(180deg, #6677ee, #4455cc); color: #fff; width: 38px; height: 38px; font-size: 15px; }
.xp-wmp-btn:hover { filter: brightness(1.1); }

.xp-wmp-volume { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.xp-wmp-volume input[type="range"] { flex: 1; }

.xp-wmp-playlist { border-top: 1px solid #bbb; padding-top: 8px; max-height: 120px; overflow-y: auto; }
.xp-wmp-playlist-title { font-size: 11px; font-weight: bold; margin-bottom: 4px; color: #333; }
.xp-wmp-playlist-item { font-size: 11px; padding: 4px 6px; color: #444; cursor: pointer; border-radius: 2px; }
.xp-wmp-playlist-item:hover { background: rgba(68,85,204,0.12); }
.xp-wmp-playlist-item.active { background: #4455cc; color: #fff; }

/* ════════════════════════════════
   LIXEIRA
   ════════════════════════════════ */
.xp-trash-body {
  background: #fff;
  padding: 10px;
  min-height: 140px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.xp-trash-empty { color: #888; font-size: 12px; padding: 16px; text-align: center; width: 100%; }

.xp-trash-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 70px;
  font-size: 10px;
  color: #333;
  text-align: center;
}

.xp-trash-item img {
  width: 48px; height: 48px;
  object-fit: cover;
  border: 1px solid #ccc;
  background: #f0f0f0;
}

/* ════════════════════════════════
   TASKBAR
   ════════════════════════════════ */
#xp-taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(180deg, #3a82e8 0%, #1f5fd0 4%, #1345c0 8%, #1c5bce 50%, #1a56c4 85%, #0f3aa0 100%);
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  z-index: 9999;
  box-shadow: 0 -1px 0 rgba(255,255,255,0.3), 0 -3px 8px rgba(0,0,0,0.3);
}

#xp-start-btn {
  height: 24px;
  padding: 0 10px 0 6px;
  background: linear-gradient(180deg, #7ad87a 0%, var(--xp-green) 12%, #2e8b2e 55%, #246e24 100%);
  border: 1px solid #1a5c1a;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
  font-family: var(--xp-font);
  font-style: italic;
  box-shadow: 0 0 8px rgba(0,200,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -2px 4px rgba(0,0,0,0.2);
}
#xp-start-btn:hover { filter: brightness(1.08); }
#xp-start-btn:active { box-shadow: inset 0 2px 6px rgba(0,0,0,0.4); }
#xp-start-icon { font-size: 15px; font-style: normal; }

#xp-taskbar-items { display: flex; gap: 2px; flex: 1; overflow: hidden; }

.xp-taskbar-item {
  height: 22px;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.xp-taskbar-item:hover { background: linear-gradient(180deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1)); }
.xp-taskbar-item.active { background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.15)); box-shadow: inset 0 2px 4px rgba(0,0,0,0.4); }

#xp-taskbar-clock {
  background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1));
  padding: 2px 10px;
  color: #fff;
  font-size: 11px;
  height: 22px;
  display: flex; align-items: center;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* Scrollbar geral dentro das janelas XP */
.xp-trash-body::-webkit-scrollbar,
.xp-wmp-playlist::-webkit-scrollbar { width: 12px; }
.xp-trash-body::-webkit-scrollbar-track,
.xp-wmp-playlist::-webkit-scrollbar-track { background: var(--xp-grey); }
.xp-trash-body::-webkit-scrollbar-thumb,
.xp-wmp-playlist::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #e8e8e8, #c0c0c0); border: 1px solid var(--xp-border-dk); }


.xp-viewer-content{
 flex:1;
 background:#fff;
 padding:10px;
 overflow:auto;
 display:flex;
 align-items:center;
 justify-content:center;
}
.xp-viewer-content img{
 max-width:100%;
 max-height:100%;
 object-fit:contain;
}
.xp-trash-item{cursor:pointer;}
