/* ============================================================
   Base Resets & Global Typography (Windows XP Luna)
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0; padding: 0;
  cursor: default; /* Use standard OS cursor, no custom cursor */
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--col-bg);
  color: var(--col-text);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbars - XP style (gray/silver) */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #f0f0f0; border-left: 1px solid #e0e0e0; }
::-webkit-scrollbar-thumb {
  background: #cddbfa;
  border: 1px solid #7a96df;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: #9bb0e8; }
::-webkit-scrollbar-corner { background: #f0f0f0; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; margin-bottom: 8px; }
a { color: var(--col-primary); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
p { margin-bottom: 12px; line-height: 1.5; font-size: 13px; }

button { cursor: pointer; }

/* ============================================================
   DESKTOP
   ============================================================ */

#desktop {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--taskbar-h);
  background: url('../assets/wallpapers/wallpaperflare.com_wallpaper.jpg') no-repeat center center;
  background-size: cover;
  background-color: #000;
  z-index: var(--z-desktop);
  overflow: hidden;
}

/* Desktop Icons */
#desktop-icons {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 10px 8px;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
}

.desktop-icon {
  width: 74px;
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 4px;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background var(--trans-fast);
  z-index: var(--z-icons);
}

.desktop-icon:hover {
  background: rgba(255,255,255,0.1);
}

.desktop-icon.selected {
  background: rgba(0, 0, 128, 0.4);
  border: 1px dotted rgba(255, 255, 255, 0.6);
}

.di-emoji {
  font-size: 32px;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.6));
  pointer-events: none;
}

.di-label {
  font-size: 11px;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8); /* Classic XP desktop text shadow */
  line-height: 1.2;
  word-wrap: break-word;
  max-width: 100%;
  pointer-events: none;
}

/* ============================================================
   CONTEXT MENU (XP Style)
   ============================================================ */

#context-menu {
  position: absolute;
  background: #fff;
  border: 1px solid #aca899;
  border-radius: 2px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  min-width: 150px;
  padding: 2px;
  z-index: var(--z-context-menu);
  display: none;
  font-family: var(--font-body);
  font-size: 11px;
  color: #000;
}
#context-menu.visible { display: block; }

.ctx-item {
  padding: 4px 16px;
  cursor: pointer;
}
.ctx-item:hover {
  background: #316ac5;
  color: #fff;
}
.ctx-separator {
  height: 1px;
  background: #aca899;
  margin: 3px 2px;
}

/* ============================================================
   UTILITY COMPONENTS (XP Style buttons)
   ============================================================ */

.xt-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
  transition: filter var(--trans-fast);
  border: 1px solid #707070;
  background: linear-gradient(180deg, #f2f2f2 0%, #ebebeb 50%, #dddddd 51%, #cfcfcf 100%);
  color: #000;
}
.xt-btn:hover {
  background: linear-gradient(180deg, #e5f1fb 0%, #d8e6f4 50%, #cce0f0 51%, #bce0fb 100%);
  border-color: #3c7fb1;
}
.xt-btn:active {
  background: linear-gradient(180deg, #b5d5f1 0%, #a0c9e7 50%, #90bbe0 51%, #a4ceeb 100%);
  border-color: #2c628b;
}

.xt-btn-primary {
  background: linear-gradient(180deg, #5abf3c 0%, #268010 100%);
  border-color: #1a6a08;
  color: #fff;
}
.xt-btn-primary:hover {
  background: linear-gradient(180deg, #6fd350 0%, #30a014 100%);
}

.xt-btn-discord {
  background: linear-gradient(180deg, #7289da 0%, #5b6eae 100%);
  border-color: #4b5a8e;
  color: #fff;
}
.xt-btn-discord:hover {
  background: linear-gradient(180deg, #8298e8 0%, #687bc1 100%);
}

.xt-section-title {
  font-family: var(--font-heading);
  font-size: 13px; font-weight: bold;
  color: var(--col-primary);
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}

/* ============================================================
   Desktop Widget (Live Status)
   ============================================================ */
.desktop-widget {
  position: absolute;
  top: 40px; right: 220px; width: 220px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  animation: widgetFadeIn 1s ease forwards;
}

@keyframes widgetFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.dw-title { font-size: 10px; color: #88caff; letter-spacing: 1px; margin-bottom: 4px; }
.dw-game { font-size: 16px; font-weight: bold; margin-bottom: 8px; }
.dw-status { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: bold; color: #ff4030; }
.dw-dot {
  width: 8px; height: 8px;
  background: #ff4030; border-radius: 50%;
  box-shadow: 0 0 8px #ff4030;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 64, 48, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 64, 48, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 64, 48, 0); }
}
