/* Windows XP Luna Theme Wishlist */
/* Optimized for Internet Explorer 6.0 - Best viewed at 800x600 */

/* ==== XP Color Palette ==== */
:root {
  --xp-blue-light: #3C8EF3;
  --xp-blue-dark: #0058E6;
  --xp-blue-border: #0831D9;
  --xp-button-face: #ECE9D8;
  --xp-button-highlight: #FFFFFF;
  --xp-button-shadow: #ACA899;
  --xp-button-dark-shadow: #716F64;
  --xp-window-bg: #F0F0F0;
  --xp-text: #000000;
  --xp-link-blue: #0000EE;
  --xp-link-visited: #551A8B;
  --xp-green: #73D216;
}

/* ==== Base Styles ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Better tap highlighting on mobile */
  -webkit-tap-highlight-color: rgba(60, 142, 243, 0.3);
}

body {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  color: var(--xp-text);
  padding: 20px 20px 60px 20px; /* Extra bottom padding for taskbar */
  cursor: default;
  min-height: 100vh;
  position: relative;
}

/* Blurred desktop background behind window */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  /* Bliss wallpaper - bright blue sky with rolling green hill and clouds */
  background:
    /* Soft fluffy clouds */
    radial-gradient(ellipse 400px 80px at 20% 15%, rgba(255, 255, 255, 0.7) 0%, transparent 70%),
    radial-gradient(ellipse 350px 90px at 75% 25%, rgba(255, 255, 255, 0.6) 0%, transparent 70%),
    radial-gradient(ellipse 300px 70px at 50% 10%, rgba(255, 255, 255, 0.5) 0%, transparent 70%),
    radial-gradient(ellipse 450px 100px at 85% 40%, rgba(255, 255, 255, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 280px 60px at 10% 35%, rgba(255, 255, 255, 0.45) 0%, transparent 70%),
    /* Hill bulge in center-left */
    radial-gradient(ellipse 800px 300px at 40% 75%,
      #95D968 0%,
      #8DD15F 30%,
      transparent 70%
    ),
    /* Base sky-to-hill gradient */
    linear-gradient(to bottom,
      #3A96DD 0%,
      #4DA4E3 30%,
      #5DB0E8 60%,
      #6BB8ED 65%,
      #7EC856 68%,
      #8DD15F 75%,
      #82C74C 85%,
      #5A9A3C 95%,
      #2D5016 100%
    );
  background-attachment: fixed;
}

/* Blurred desktop folder icons - generated dynamically by script.js */
#desktop-blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  filter: blur(20px);
  -webkit-filter: blur(20px);
}

/* ==== XP Window ==== */
.xp-window {
  max-width: 900px;
  margin: 0 auto;
  background: var(--xp-window-bg);
  border: 3px solid;
  border-color: var(--xp-button-highlight) var(--xp-button-dark-shadow) var(--xp-button-dark-shadow) var(--xp-button-highlight);
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

/* ==== Title Bar ==== */
.xp-titlebar {
  background: linear-gradient(180deg, var(--xp-blue-light) 0%, var(--xp-blue-dark) 100%);
  padding: 3px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--xp-blue-border);
  height: 28px;
}

.xp-icon {
  width: 16px;
  height: 16px;
  margin-right: 5px;
}

.xp-title {
  color: white;
  font-weight: bold;
  font-size: 11px;
  flex-grow: 1;
  letter-spacing: 0;
}

.xp-buttons {
  display: flex;
  gap: 2px;
}

.xp-btn {
  width: 21px;
  height: 20px;
  background: var(--xp-button-face);
  border: 1px solid;
  border-color: var(--xp-button-highlight) var(--xp-button-dark-shadow) var(--xp-button-dark-shadow) var(--xp-button-highlight);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  color: var(--xp-text);
  font-family: Marlett, Tahoma, sans-serif;
  padding: 0;
  line-height: 1;
}

.xp-btn:hover {
  background: #F0E9D8;
}

.xp-btn:active {
  border-style: inset;
  border-color: var(--xp-button-dark-shadow) var(--xp-button-highlight) var(--xp-button-highlight) var(--xp-button-dark-shadow);
}

.xp-close {
  background: #E04;
  color: white;
}

.xp-close:hover {
  background: #F05;
}

/* ==== Menu Bar ==== */
.xp-menubar {
  background: var(--xp-button-face);
  padding: 3px 5px;
  border-bottom: 1px solid var(--xp-button-shadow);
  font-size: 11px;
}

.xp-menu-item {
  padding: 3px 8px;
  margin-right: 2px;
  cursor: pointer;
  display: inline-block;
}

.xp-menu-item:hover {
  background: #3C8EF3;
  color: white;
  border: 1px solid #0831D9;
  padding: 2px 7px;
}

/* ==== Content Area ==== */
.xp-content {
  background: white;
  padding: 20px;
  min-height: 400px;
  overflow-y: auto;
  max-height: 600px;
}

/* ==== Status Bar ==== */
.xp-statusbar {
  background: var(--xp-button-face);
  border-top: 1px solid var(--xp-button-highlight);
  padding: 3px 5px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  height: 22px;
}

.status-section {
  display: flex;
  align-items: center;
  padding: 0 5px;
  border-right: 1px solid var(--xp-button-shadow);
  border-left: 1px solid var(--xp-button-highlight);
}

.status-section:last-child {
  border-right: none;
}

.status-ready {
  flex-grow: 1;
  text-align: right;
}

/* ==== Typography ==== */
h1 {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
  color: var(--xp-blue-dark);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

h2 {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  margin: 15px 0;
  color: var(--xp-text);
}

p {
  margin: 8px 0;
  line-height: 1.4;
}

a {
  color: var(--xp-link-blue);
  text-decoration: underline;
}

a:visited {
  color: var(--xp-link-visited);
}

a:hover {
  color: #FF0000;
}

/* ==== ASCII Borders ==== */
.ascii-border-top,
.ascii-border-bottom,
.box-title,
.box-bottom,
.guestbook-footer,
.separator {
  font-family: 'Courier New', Courier, monospace;
  text-align: center;
  color: var(--xp-blue-dark);
  font-size: 10px;
  line-height: 1;
  margin: 5px 0;
}

.box-title {
  text-align: left;
  margin-bottom: 10px;
}

.box-bottom {
  text-align: left;
  margin-top: 10px;
}

/* ==== Header ==== */
header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--xp-button-shadow);
}

.marquee-banner {
  background: var(--xp-button-face);
  padding: 5px;
  margin-top: 10px;
  border: 1px inset var(--xp-button-shadow);
  font-size: 11px;
  color: var(--xp-text);
}

/* ==== Interests Box ==== */
.interests-box {
  background: #FFFFCC; /* Classic yellow notepad color */
  border: 2px solid var(--xp-button-shadow);
  padding: 15px;
  margin: 15px 0;
  font-size: 11px;
}

.interest {
  color: var(--xp-blue-dark);
  font-weight: bold;
}

/* ==== Navigation Buttons ==== */
.nav-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.xp-button {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  font-weight: normal;
  padding: 4px 12px;
  background: var(--xp-button-face);
  border: 2px solid;
  border-color: var(--xp-button-highlight) var(--xp-button-dark-shadow) var(--xp-button-dark-shadow) var(--xp-button-highlight);
  color: var(--xp-text);
  cursor: pointer;
  min-width: 80px;
}

.xp-button:hover {
  background: #F0E9D8;
}

.xp-button:active {
  border-style: inset;
  border-color: var(--xp-button-dark-shadow) var(--xp-button-highlight) var(--xp-button-highlight) var(--xp-button-dark-shadow);
  padding: 5px 11px 3px 13px; /* Shift content on press */
}

/* ==== Section Header ==== */
.section-header {
  margin: 20px 0;
}

/* ==== Wishlist Grid ==== */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

/* ==== Wishlist Items ==== */
.wishlist-item {
  background: var(--xp-button-face);
  border: 2px solid;
  border-color: var(--xp-button-highlight) var(--xp-button-dark-shadow) var(--xp-button-dark-shadow) var(--xp-button-highlight);
  padding: 10px;
  text-align: center;
}

.priority-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: bold;
  margin-bottom: 5px;
  border: 1px solid var(--xp-button-shadow);
  background: white;
}

.priority-high {
  color: #CC0000;
}

.priority-medium {
  color: #CC6600;
}

.priority-low {
  color: #0066CC;
}

.item-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 2px inset var(--xp-button-shadow);
  margin: 10px 0;
  background: white;
}

.item-name {
  font-size: 12px;
  font-weight: bold;
  margin: 8px 0;
  color: var(--xp-text);
}

.item-description {
  font-size: 10px;
  margin: 5px 0;
  color: #333;
}

.item-price {
  font-size: 13px;
  font-weight: bold;
  color: var(--xp-green);
  margin: 8px 0;
}

.item-link {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: var(--xp-button-face);
  color: var(--xp-text);
  text-decoration: none;
  border: 2px solid;
  border-color: var(--xp-button-highlight) var(--xp-button-dark-shadow) var(--xp-button-dark-shadow) var(--xp-button-highlight);
  font-size: 10px;
}

.item-link:visited {
  color: var(--xp-text);
}

.item-link:hover {
  background: #F0E9D8;
  color: var(--xp-text);
}

.item-link:active {
  border-style: inset;
  border-color: var(--xp-button-dark-shadow) var(--xp-button-highlight) var(--xp-button-highlight) var(--xp-button-dark-shadow);
}

/* ==== Loading State ==== */
.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  font-size: 12px;
}

#loading-throbber {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}

/* ==== Guestbook ==== */
.guestbook-section {
  margin: 30px 0;
  padding: 15px;
  background: var(--xp-button-face);
  border: 2px solid;
  border-color: var(--xp-button-highlight) var(--xp-button-dark-shadow) var(--xp-button-dark-shadow) var(--xp-button-highlight);
}

.canvas-instructions {
  text-align: center;
  font-size: 10px;
  color: #666;
  margin-bottom: 10px;
}

.guestbook-canvas {
  background: #FFFFFF; /* White like Notepad */
  border: 2px inset var(--xp-button-shadow);
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.2;
  padding: 10px;
  min-height: 300px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  cursor: text;
  position: relative;
  overflow-x: auto;
  white-space: pre;
  color: #000000; /* Black text like Notepad */
}

.guestbook-canvas:focus {
  outline: 2px solid var(--xp-blue-dark);
}

.canvas-cursor {
  position: absolute;
  background: #000000 !important;
  background-color: #000000 !important;
  width: 8px;
  height: 16px;
  animation: cursor-blink 0.8s step-end infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==== Footer ==== */
footer {
  margin-top: 30px;
  padding-top: 15px;
  text-align: center;
  font-size: 10px;
}

.footer-section {
  margin: 10px 0;
}

.footer-links {
  margin: 10px 0;
}

.footer-links p {
  margin: 5px 0;
}

.footer-info {
  margin-top: 15px;
  color: #666;
}

/* ==== Hidden Items (for filtering) ==== */
.wishlist-item.hidden {
  display: none;
}

/* ==== Windows XP Taskbar ==== */
.xp-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, #3168D5 0%, #2350C6 5%, #1F45B5 50%, #1840B0 100%);
  border-top: 2px solid #1840B0;
  display: flex;
  align-items: center;
  padding: 0 5px;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

.xp-start-button {
  height: 32px;
  padding: 0 12px 0 8px;
  background: linear-gradient(180deg, #5EAB5D 0%, #3C8D3C 100%);
  border: 1px solid;
  border-color: #7FD67F #1E5B1E #1E5B1E #7FD67F;
  border-radius: 0 6px 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  user-select: none;
}

.xp-start-button:hover {
  background: linear-gradient(180deg, #6FBC6E 0%, #4D9E4D 100%);
}

.xp-start-button:active {
  border-style: inset;
  border-color: #1E5B1E #7FD67F #7FD67F #1E5B1E;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.start-logo {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #FF0000 0%, #FF6B00 25%, #FFD800 50%, #00A651 75%, #0057B8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.xp-taskbar-items {
  flex-grow: 1;
  height: 32px;
  margin-left: 10px;
  display: flex;
  gap: 3px;
}

.xp-taskbar-item {
  height: 100%;
  padding: 0 10px;
  background: linear-gradient(180deg, #2350C6 0%, #1840B0 100%);
  border: 1px solid;
  border-color: #4A7AE8 #0F2C7A #0F2C7A #4A7AE8;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 11px;
  color: white;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
}

.xp-taskbar-item.active {
  background: linear-gradient(180deg, #1840B0 0%, #2350C6 100%);
  border-color: #0F2C7A #4A7AE8 #4A7AE8 #0F2C7A;
  border-style: inset;
}

.xp-taskbar-item:hover:not(.active) {
  background: linear-gradient(180deg, #2A5ED7 0%, #1F4FC0 100%);
}

.xp-system-tray {
  height: 32px;
  margin-left: auto;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(23, 111, 230, 0.5) 0%, rgba(16, 64, 176, 0.5) 100%);
  border: 1px solid;
  border-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.2) rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: white;
}

.xp-clock {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  color: white;
  padding: 0 5px;
}

/* ==== Responsive (maintain XP feel) ==== */

/* Tablets and small laptops */
@media (max-width: 900px) {
  .xp-window {
    max-width: 100%;
    margin: 10px;
  }

  .wishlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Mobile phones */
@media (max-width: 600px) {
  body {
    font-size: 14px;
    padding: 10px 10px 80px 10px; /* More bottom padding for taskbar on mobile */
  }

  .xp-window {
    margin: 0;
    border-width: 2px;
  }

  /* Make title bar touch-friendly */
  .xp-titlebar {
    height: 36px;
    padding: 5px;
  }

  .xp-title {
    font-size: 14px;
  }

  /* Larger touch targets for window controls */
  .xp-btn {
    width: 32px;
    height: 28px;
    font-size: 18px;
  }

  /* Make menu items touch-friendly */
  .xp-menu-item {
    padding: 8px 12px;
    font-size: 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .xp-menubar {
    padding: 5px;
  }

  /* Single column grid */
  .wishlist-grid {
    grid-template-columns: 1fr;
  }

  .xp-content {
    padding: 10px;
    max-height: none;
  }

  /* Touch-friendly navigation buttons */
  .nav-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .xp-button {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    min-height: 44px;
  }

  /* Larger text for readability */
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 18px;
  }

  .item-name {
    font-size: 16px;
  }

  .item-description {
    font-size: 14px;
  }

  .item-price {
    font-size: 16px;
  }

  .item-link {
    font-size: 14px;
    padding: 10px 16px;
    min-height: 44px;
  }

  /* Guestbook adjustments */
  .guestbook-canvas {
    font-size: 16px;
    min-height: 250px;
  }

  .canvas-instructions {
    font-size: 14px;
  }

  /* Taskbar mobile-friendly */
  .xp-taskbar {
    height: 56px;
    padding: 0 8px;
  }

  .xp-start-button {
    height: 44px;
    font-size: 14px;
    padding: 0 16px 0 12px;
  }

  .start-logo {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .xp-taskbar-items {
    height: 44px;
    margin-left: 8px;
  }

  .xp-taskbar-item {
    font-size: 13px;
    padding: 0 12px;
  }

  .xp-system-tray {
    height: 44px;
    font-size: 13px;
    padding: 0 12px;
  }

  .xp-clock {
    font-size: 13px;
  }

  /* Status bar */
  .xp-statusbar {
    font-size: 13px;
    height: 32px;
    padding: 5px;
  }

  .status-section {
    padding: 0 8px;
  }

  /* Marquee */
  .marquee-banner {
    font-size: 13px;
  }

  /* Footer */
  footer {
    font-size: 13px;
  }

  /* Make interests box more readable */
  .interests-box {
    font-size: 14px;
  }

  /* Prevent iOS text size adjustment */
  body {
    -webkit-text-size-adjust: 100%;
  }

  /* Make input elements more touch-friendly if any are added */
  input, textarea, select {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  /* Smoother scrolling on mobile */
  .xp-content {
    -webkit-overflow-scrolling: touch;
  }

  /* Hide horizontal scrollbars that might appear */
  .xp-window {
    overflow-x: hidden;
  }

  /* Maximized state on mobile */
  .xp-window.maximized {
    height: 100vh;
    max-height: 100vh;
    border: none;
  }

  .xp-window.maximized .xp-content {
    max-height: calc(100vh - 150px); /* Account for larger mobile UI elements */
  }

  /* Better guestbook interaction on mobile */
  .guestbook-canvas {
    -webkit-user-select: text;
    user-select: text;
    touch-action: manipulation;
  }
}

/* ==== Maximized State ==== */
.xp-window.maximized {
  max-width: 100%;
  width: 100%;
  margin: 0;
  height: 100vh;
  max-height: 100vh;
}

.xp-window.maximized .xp-content {
  max-height: calc(100vh - 100px);
}

/* ==== No Select on UI Elements ==== */
.xp-titlebar,
.xp-menubar,
.xp-statusbar,
.xp-btn,
.xp-button {
  user-select: none;
  -webkit-user-select: none;
}
