/* ==============================================================================
   Jinn OS Web Portal - Estilos do Desktop, Cairo-Dock, Whisker Menu e Janelas
   Inspirado no visual XFCE / Cairo-Dock / Dr460nized / Obsidian Glass
   ============================================================================== */

:root {
  --bg-primary: #0b0f19;
  --panel-bg: rgba(15, 23, 42, 0.75);
  --dock-bg: rgba(11, 15, 25, 0.65);
  --window-bg: rgba(15, 23, 42, 0.88);
  --window-header: rgba(30, 41, 59, 0.85);
  --border-glow: rgba(56, 189, 248, 0.25);
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-ruby: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  user-select: none;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
}

/* Área de Trabalho com Wallpaper */
.desktop-surface {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-image: radial-gradient(rgba(11, 15, 25, 0.3) 0%, rgba(11, 15, 25, 0.75) 100%), url('assets/wallpaper-eagle.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Painel Superior */
.top-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 500;
  z-index: 50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Conky Widget HUD na Área de Trabalho */
.conky-hud {
  position: absolute;
  top: 48px;
  left: 20px;
  width: 270px;
  background: rgba(11, 15, 25, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  padding: 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  line-height: 1.45;
  color: #38bdf8;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 10;
  transition: opacity 0.2s ease;
}

/* Ícones do Desktop */
.desktop-shortcuts {
  position: absolute;
  top: 48px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
}

.desktop-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  text-align: center;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-icon-item:hover {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  transform: translateY(-2px);
}

.desktop-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.desktop-icon-label {
  font-size: 11px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  word-break: break-word;
}

/* Cairo-Dock Flutuante */
.cairo-dock-container {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 18px 10px 18px;
  background: var(--dock-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  z-index: 40;
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), margin 0.25s;
}

.dock-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  position: relative;
  transition: all 0.25s ease;
}

/* Reflexo característico do Cairo-Dock */
.dock-reflection {
  width: 46px;
  height: 18px;
  margin-top: 3px;
  border-radius: 0 0 13px 13px;
  opacity: 0.22;
  transform: scaleY(-1);
  filter: blur(1px);
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
}

.dock-item:hover {
  transform: translateY(-14px) scale(1.22);
  margin: 0 6px;
}

.dock-tooltip {
  position: absolute;
  top: -38px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.dock-item.active-running::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 5px;
  height: 5px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* Whisker Menu Iniciar (XFCE) */
.whisker-menu {
  position: absolute;
  bottom: 74px;
  left: 20px;
  width: 620px;
  height: 480px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 60;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.whisker-menu.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.97);
}

.whisker-search {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.whisker-search input {
  width: 100%;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.whisker-search input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.whisker-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.whisker-categories {
  width: 220px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  padding: 8px;
}

.whisker-category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.whisker-category-item:hover, .whisker-category-item.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--text-main);
  font-weight: 500;
}

.whisker-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.whisker-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.whisker-item-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Janela Modal do Sistema Operacional (XFCE / Aladdin Window) */
.os-window {
  position: absolute;
  background: var(--window-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 30;
  transition: transform 0.15s ease, opacity 0.15s ease;
  min-width: 380px;
  min-height: 280px;
}

.os-window.focused {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.75), 0 0 15px rgba(56, 189, 248, 0.25);
  z-index: 35;
}

.os-window.hidden {
  display: none !important;
}

.os-window.minimized {
  opacity: 0;
  transform: scale(0.7) translateY(200px);
  pointer-events: none;
}

.os-window-header {
  height: 38px;
  background: var(--window-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: move;
}

.os-window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

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

.win-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s;
}

.win-btn:hover {
  filter: brightness(1.25);
}

.win-btn.close { background-color: #ef4444; }
.win-btn.min { background-color: #f59e0b; }
.win-btn.max { background-color: #10b981; }

.os-window-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  user-select: text;
}

/* Terminal Interativo */
.terminal-screen {
  background: #050811;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  padding: 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  color: #38bdf8;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.terminal-history {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.terminal-prompt {
  color: #10b981;
  font-weight: bold;
  margin-right: 8px;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-family: inherit;
  font-size: inherit;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

