/* Custom Font Face */
@font-face {
  font-family: '000webfont';
  src: url('../media/fonts/000webfont_Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Loading Overlay Styles */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-window {
  width: 400px;
  max-width: 90vw;
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.8);
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
}

.loading-titlebar {
  display: flex;
  align-items: center;
  height: 24px;
  background: linear-gradient(to right, #0078d4 0%, #106ebe 100%);
  color: white;
  padding: 0 8px;
  font-size: 11px;
  font-weight: bold;
}

.loading-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.loading-icon {
  width: 16px;
  height: 16px;
}

.loading-content {
  padding: 24px;
  text-align: center;
  background: #c0c0c0;
}

.loading-text {
  font-size: 14px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 20px;
}

.loading-progress-container {
  margin-bottom: 16px;
}

.loading-progress-bar {
  width: 100%;
  height: 20px;
  background: #ffffff;
  border: 1px inset #c0c0c0;
  overflow: hidden;
  position: relative;
}

.loading-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #0078d4 0%, #106ebe 50%, #0078d4 100%);
  background-size: 200% 100%;
  width: 0%;
  animation: loadingProgress 2s ease-in-out forwards, loadingShimmer 1s linear infinite;
  border-right: 1px solid #ffffff;
}

.loading-status {
  font-size: 11px;
  color: #666666;
  font-style: italic;
}

@keyframes loadingProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes loadingShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Early 2000s Desktop OS Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS Custom Properties for Mobile-Safe Dimensions */
:root {
  /* Standard taskbar height */
  --taskbar-height: 55px;
  
  /* Mobile-safe viewport calculations */
  --mobile-taskbar-height: 55px;
  --mobile-safe-height: calc(100vh - var(--mobile-taskbar-height));
  --mobile-safe-height-dvh: calc(100dvh - var(--mobile-taskbar-height));
  
  /* Window sizing for mobile */
  --mobile-window-max-width: 90vw;
  --mobile-window-max-height: calc(100vh - var(--mobile-taskbar-height) - 40px);
  --mobile-window-max-height-dvh: calc(100dvh - var(--mobile-taskbar-height) - 40px);
  
  /* Safe area insets for modern mobile devices */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
}

/* Support for dynamic viewport height where available */
@supports (height: 100dvh) {
  :root {
    --mobile-safe-height: var(--mobile-safe-height-dvh);
    --mobile-window-max-height: var(--mobile-window-max-height-dvh);
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari viewport fix */
  body {
    height: 100vh;
    height: -webkit-fill-available;
  }
  
  .desktop {
    height: calc(100vh - var(--taskbar-height));
    height: calc(-webkit-fill-available - var(--taskbar-height));
  }
  
  /* Ensure modals don't exceed safe area on iOS */
  .modal-container,
  .cart-modal-container,
  .product-modal-container {
    max-height: calc(100vh - var(--safe-area-top) - var(--safe-area-bottom) - 20px);
    max-height: calc(-webkit-fill-available - var(--safe-area-top) - var(--safe-area-bottom) - 20px);
  }
}

/* Retro Cursor Styles */
body {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  overflow: hidden;
  height: 100vh;
  background: black;
  cursor: default;
  user-select: none;
}

/* Different cursor styles for retro feel */
.desktop-icon {
  cursor: pointer;
}

.start-button,
.taskbar-button,
.window-control {
  cursor: pointer;
}

.tray-icon {
  cursor: pointer;
}

/* Text cursor for text areas */
.icon-label {
  cursor: default;
}

/* Wait cursor for loading states */
.loading {
  cursor: wait;
}

/* Help cursor for help elements */
.help {
  cursor: help;
}

/* Move cursor for draggable elements */
.draggable {
  cursor: move;
}

/* Desktop Background */
.desktop {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 6rem;
  width: 100vw;
  height: 100%; /* Account for taskbar */
  padding-bottom: 5rem;
  /* background: linear-gradient(135deg, #0078d4 0%, #106ebe 50%, #1e3a8a 100%);
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 0%, transparent 50%); */
  overflow: hidden;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
    url('https://storage.googleapis.com/jamtem_website_media/cloud_bg_2.jpg');
  background-size: 120%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  animation: desktopBackgroundMove 20s ease-in-out infinite;
}

/* Mobile-safe desktop height */
@supports (height: 100dvh) {
  .desktop {
    height: calc(100dvh - var(--taskbar-height));
  }
}

/* Desktop Icons Grid - 4 main icons in 2x2 grid */
.desktop-icons {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 30px;
  z-index: 10;
  margin-top: 20px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.1s ease;
  padding: 10px;
}

/* Show all icons now that logo is separate */
.desktop-icon:nth-child(6),
.desktop-icon:nth-child(7) {
  display: flex;
}

.desktop-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px dotted rgba(255, 255, 255, 0.8);
}

.desktop-icon:active {
  background-color: rgba(255, 255, 255, 0.3);
}

.desktop-icon.selected {
  background-color: rgba(255, 255, 255, 0.3);
  border: 1px dotted rgba(255, 255, 255, 0.9);
}

.icon-image {
  width: 100px;
  height: 100px;
  margin-bottom: 8px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

.icon-label {
  color: white;
  font-size: 1rem;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
  word-wrap: break-word;
}

.coming_soon {
  opacity: 0.5;
}

/* Desktop Logo - Above the icons */
.desktop-logo {

}

.desktop-logo-img {
  width: 200px;
  height: auto;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
  opacity: 0.9;
  animation: float 3s ease-in-out infinite;
}

/* Floating animation for desktop logo */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Desktop background movement animation */
@keyframes desktopBackgroundMove {
  0%, 100% {
    background-position: center;
  }
  25% {
    background-position: 55% center;
  }
  50% {
    background-position: center;
  }
  75% {
    background-position: 45% center;
  }
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid #9c9c9c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  z-index: 1000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 -1px 3px rgba(0, 0, 0, 0.2);
}

.taskbar-left {
  display: flex;
  align-items: center;
  width: 120px;
  padding-left: 10px;
  justify-content: flex-start
}

.start-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  height: 45px;
  width: 120px;
}

.start-button:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 50%, #b5aca7 100%);
}

.start-button:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 50%, #f2efea 100%);
}

.start-icon {
  width: 50px;

}

.taskbar-center {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.taskbar-button {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000000;
  cursor: pointer;
  height: 28px;
  min-width: 80px;
  justify-content: center;
}

.taskbar-button:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 50%, #b5aca7 100%);
}

.taskbar-button:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 50%, #f2efea 100%);
}

/* Disabled taskbar buttons for media */
.taskbar-button[data-app="vignettes"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.mobile-app-button[data-app="vignettes"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.taskbar-right {
  display: flex;
  padding-right: 10px;
  width: 120px;
  justify-content: flex-end;
  align-items: center;
}

.system-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px inset #d4d0c8;
  height: 45px;
  width: 110px;
}

.tray-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tray-icon {
  font-size: 14px;
  cursor: pointer;
  position: relative;
}

/* Cart Icon Styling */
.cart-icon {
  position: relative;
  display: inline-block;
}

.cart-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  padding: 2px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #ff4444;
  color: white;
  font-size: 9px;
  font-weight: bold;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  line-height: 1;
}

.cart-badge.animate {
  animation: cartBounce 0.3s ease-out;
}

@keyframes cartBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Cart Modal Styles */
.cart-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.cart-modal-container {
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  width: 600px;
  max-width: 95vw;
  max-height: 80vh;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
}

.cart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(to right, #0078d4 0%, #106ebe 100%);
  color: white;
  border-bottom: 1px solid #808080;
}

.cart-modal-header h2 {
  font-size: 14px;
  font-weight: bold;
  margin: 0;
}

.cart-modal-close {
  width: 20px;
  height: 20px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-modal-close:hover {
  background: linear-gradient(to bottom, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.cart-modal-content {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
  background: white;
  border: 1px inset #d4d0c8;
  margin: 8px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  padding: 8px;
  background: #f8f8f8;
  border: 1px outset #d4d0c8;
  align-items: center;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border: 1px solid #808080;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-placeholder {
  font-size: 9px;
  color: #999999;
  text-align: center;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-title {
  font-size: 12px;
  font-weight: bold;
  color: #000000;
  line-height: 1.2;
}

.cart-item-variant {
  font-size: 10px;
  color: #666666;
}

.cart-item-price {
  font-size: 11px;
  color: #0078d4;
  font-weight: bold;
}

.cart-item-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 4px;
}

.quantity-display {
  font-size: 11px;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
}

.cart-item-remove:hover {
  background: linear-gradient(to bottom, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: #666666;
}

.cart-empty p {
  font-size: 14px;
  margin-bottom: 16px;
}

.cart-modal-footer {
  padding: 12px;
  background: #f0f0f0;
  border-top: 1px solid #d6d3ce;
}

.cart-total {
  margin-bottom: 12px;
  text-align: right;
}

.cart-total-label {
  font-size: 14px;
  font-weight: bold;
  color: #000000;
}

.cart-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cart-actions .btn {
  padding: 6px 12px;
  font-size: 11px;
}

/* Responsive Cart Modal */
@media (max-width: 768px) {
  .cart-modal-container {
    width: var(--mobile-window-max-width);
    max-height: var(--mobile-window-max-height);
  }
  
  .cart-item {
    grid-template-columns: 50px 1fr auto;
    gap: 8px;
  }
  
  .cart-item-image {
    width: 50px;
    height: 50px;
  }
  
  .cart-actions {
    flex-direction: column;
  }
}

.clock {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000000;
  font-weight: normal;
  min-width: 60px;
  text-align: center;
}

/* Video Window Modal */
.video-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  max-width: 95vw;
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
}

.window-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  background: linear-gradient(to right, #0078d4 0%, #106ebe 100%);
  color: white;
  padding: 0 4px;
  font-size: 11px;
  font-weight: bold;
  cursor: move;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.window-icon {
  width: 16px;
  height: 16px;
}

.window-controls {
  display: flex;
  gap: 2px;
}

.window-control {
  width: 16px;
  height: 14px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 9px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.window-control:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.window-control:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 100%);
}

.window-control.close:hover {
  background: linear-gradient(to bottom, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.window-content {
  padding: 8px;
  background: #c0c0c0;
  border-top: 1px solid #808080;
}

#desktop-video {
  width: 100%;
  height: auto;
  max-height: 600px;
  background: #000000;
  border: 1px inset #c0c0c0;
}

/* Mobile App Popup Styles */
.mobile-app-popup {
  position: fixed;
  bottom: 55px;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid #9c9c9c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 -1px 3px rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: none;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-app-popup.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-app-buttons {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 4px;
  gap: 4px;
}

.mobile-app-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 10px;
  color: #000000;
  cursor: pointer;
  min-width: 60px;
  min-height: 60px;
  flex: 1;
  max-width: 80px;
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.2);
  touch-action: manipulation;
  user-select: none;
}

.mobile-app-button:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 50%, #b5aca7 100%);
}

.mobile-app-button:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 50%, #f2efea 100%);
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.3);
}

.mobile-app-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.mobile-app-button span {
  text-align: center;
  line-height: 1.1;
  word-wrap: break-word;
}

/* Desktop taskbar buttons wrapper */
.desktop-taskbar-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Mobile toggle button */
.mobile-toggle-button {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 14px;
  color: #000000;
  cursor: pointer;
  height: 28px;
  min-width: 40px;
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.2);
  touch-action: manipulation;
  user-select: none;
}

.mobile-toggle-button:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 50%, #b5aca7 100%);
}

.mobile-toggle-button:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 50%, #f2efea 100%);
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.3);
}

.toggle-arrow {
  transition: transform 0.3s ease;
}

.mobile-toggle-button.active .toggle-arrow {
  transform: rotate(180deg);
}

/* Responsive Design for Tablets */
@media (max-width: 768px) {
  .desktop {
    background-size: 200%;
  }
  /* Skip center position for logo on mobile */
  .desktop-icon:nth-child(5) {
    display: none;
  }
  
  .desktop-icon:nth-child(6),
  .desktop-icon:nth-child(7) {
    display: flex;
  }

  /* Hide desktop taskbar buttons on mobile */
  .desktop-taskbar-buttons {
    display: none;
  }
  
  /* Show mobile toggle button */
  .mobile-toggle-button {
    display: flex;
  }
  
  .taskbar-button {
    height: 36px;
    font-size: 12px;
    padding: 6px 10px;
  }
  

  
  .video-window {
    width: 95vw;
    max-width: none;
    max-height: var(--mobile-window-max-height);
  }
  
  /* .desktop {
    height: var(--mobile-safe-height);
  } */
  
  /* App window responsive adjustments for tablets */
  .app-window {
    width: var(--mobile-window-max-width) !important;
    height: var(--mobile-window-max-height) !important;
    max-width: var(--mobile-window-max-width) !important;
    max-height: var(--mobile-window-max-height) !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  
  #vignettes-window,
  #products-window,
  #collage-window,
  #join-window {
    width: var(--mobile-window-max-width) !important;
    height: var(--mobile-window-max-height) !important;
  }
}




/* Selection and Focus States */
.desktop-icon:focus {
  outline: 1px dotted rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.2);
}

.taskbar-button:focus,
.start-button:focus,
.window-control:focus {
  outline: 1px dotted #000000;
  outline-offset: -2px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .desktop-icon {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .desktop {
    background: #000080;
  }
  
  .icon-label {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
  }
  
  .taskbar {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
  }
}

/* Additional Retro Cursor Effects */
.start-menu {
  cursor: default;
}

.start-menu div:hover {
  cursor: pointer;
}

.context-menu {
  cursor: default;
}

.context-menu div:hover {
  cursor: pointer;
}

/* Retro-style selection highlighting */
::selection {
  background: #316ac5;
  color: white;
}

::-moz-selection {
  background: #316ac5;
  color: white;
}

/* Retro Scrollbar Styles */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: #c0c0c0;
  border: 1px inset #d4d0c8;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 50%, #b5aca7 100%);
}

::-webkit-scrollbar-thumb:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 50%, #f2efea 100%);
}

::-webkit-scrollbar-corner {
  background: #c0c0c0;
  border: 1px inset #d4d0c8;
}

/* Scrollbar buttons (arrows) */
::-webkit-scrollbar-button {
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border: 1px outset #d4d0c8;
  width: 16px;
  height: 16px;
  display: block;
}

::-webkit-scrollbar-button:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 50%, #b5aca7 100%);
}

::-webkit-scrollbar-button:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 50%, #f2efea 100%);
}

/* Arrow directions */
::-webkit-scrollbar-button:vertical:start:decrement {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><polygon points="4,2 2,6 6,6" fill="%23000000"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

::-webkit-scrollbar-button:vertical:end:increment {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><polygon points="4,6 2,2 6,2" fill="%23000000"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

::-webkit-scrollbar-button:horizontal:start:decrement {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><polygon points="2,4 6,2 6,6" fill="%23000000"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

::-webkit-scrollbar-button:horizontal:end:increment {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><polygon points="6,4 2,2 2,6" fill="%23000000"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: auto;
  scrollbar-color: #d6d3ce #c0c0c0;
}

/* App Window Styling */
.app-window {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 1500;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  /* Enhanced mobile positioning */
  -webkit-overflow-scrolling: touch;
  overflow: auto;
}

/* Mobile-specific app window positioning */
@media (max-width: 768px) {
  .app-window {
    /* Ensure windows are properly positioned on mobile */
    top: calc(var(--safe-area-top) + 20px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: var(--mobile-window-max-width) !important;
    height: var(--mobile-window-max-height) !important;
    max-width: var(--mobile-window-max-width) !important;
    max-height: var(--mobile-window-max-height) !important;
    /* Prevent content from being cut off */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* iPhone specific window positioning */
@media (max-width: 480px) {
  .desktop {
    background-size: 270%;
  }

  .app-window {
    top: calc(var(--safe-area-top) + 15px) !important;
    width: var(--mobile-window-max-width) !important;
    height: var(--mobile-window-max-height) !important;
    /* Ensure proper touch scrolling */
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }
}

/* Default window sizing */
#vignettes-window {
  width: 600px;
  height: 500px;
  max-width: 90vw;
  max-height: 85vh;
}

#products-window {
  width: 80%;
  height: 70%;
  max-width: 1000px;
  max-height: 600px;
}

#collage-window {
  width: 80%;
  height: 80%;
  max-width: 1000px;
  max-height: 1000px;
}

#join-window {
  width: 700px;
  height: 700px;
  max-width: 90vw;
  max-height: 85vh;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Vignettes Grid */
.vignettes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 15px;
  padding: 16px;
  background: white;
  border: 1px inset #d4d0c8;
  overflow-y: auto;
}

.vignette-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #f0f0f0;
  border: 1px outset #d4d0c8;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.vignette-icon:hover {
  background: #e0e0e0;
}

.vignette-icon:active {
  border: 1px inset #d4d0c8;
  background: #d0d0d0;
}

.vignette-image {
  width: 60px;
  height: 60px;
  margin-bottom: 4px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

.vignette-label {
  font-size: 10px;
  text-align: center;
  color: #000000;
  line-height: 1.2;
  max-width: 80px;
  word-wrap: break-word;
}

/* Window content areas */
.window-content {
  height: calc(100% - 24px);
  overflow: auto;
}

/* Toolbar styling */
.collage-toolbar,
.products-toolbar {
  display: grid;
  grid-template-columns: 1fr 60px;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px inset #d4d0c8;
  margin-bottom: 8px;
}

.toolbar-btn {
  padding: 2px 8px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000000;
  cursor: pointer;
  height: 22px;
  /* Mobile touch improvements */
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.2);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* Prevent iOS zoom on focus */
  -webkit-touch-callout: none;
  -webkit-appearance: none;
  /* Ensure proper layering */
  position: relative;
  z-index: 10;
}

.toolbar-btn:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.toolbar-btn:active,
.toolbar-btn.active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 100%);
  /* Enhanced active state for touch */
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.3);
}

.toolbar-btn:focus {
  outline: 2px solid #0078d4;
  outline-offset: 1px;
}

/* Mobile-specific toolbar button enhancements */
@media (max-width: 768px) {
  .toolbar-btn {
    height: 36px; /* iOS minimum touch target */
    min-width: 44px;
    /* Enhanced touch feedback */
    -webkit-tap-highlight-color: rgba(0, 120, 212, 0.25);
  }
  
  .collage-toolbar {
    padding: 8px;
    gap: 8px;
  }
}

/* iPhone specific optimizations */
@media (max-width: 480px) {
  /* .toolbar-btn {
    padding: 10px 18px;
    font-size: 15px;
    min-width: 48px;
    -webkit-tap-highlight-color: rgba(0, 120, 212, 0.3);
  } */
  
  .collage-toolbar {
    padding: 10px;
    gap: 10px;
    flex-wrap: wrap;
    /* Ensure toolbar doesn't get cut off */
    min-height: 68px;
  }
}

/* iPhone Pro Max and larger screens */
@media (max-width: 430px) {
  /* .toolbar-btn {
    height: 50px;
    padding: 12px 20px;
    font-size: 16px;
    min-width: 50px;
  } */
  
  .collage-toolbar {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
    min-height: 74px;
  }
}

.toolbar-separator {
  width: 1px;
  height: 18px;
  background: #9c9c9c;
  border-right: 1px solid #ffffff;
  margin: 0 4px;
}

.search-input {
  padding: 2px 4px;
  border: 1px inset #d4d0c8;
  background: white;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  height: 20px;
  flex: 1;
  /* Enhanced mobile touch improvements */
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.2);
  touch-action: manipulation;
  -webkit-appearance: none;
  -webkit-touch-callout: none;
  user-select: text;
  -webkit-user-select: text;
  /* Prevent iOS zoom on focus */
  font-size: 16px; /* Prevents zoom on iOS */
  /* Ensure proper layering */
  position: relative;
  z-index: 10;
}

.search-input:focus {
  outline: 2px solid #0078d4;
  outline-offset: 1px;
  border: 1px solid #0078d4;
  background: #ffffff;
}

.search-input::placeholder {
  color: #999999;
  opacity: 1;
}

/* Mobile-specific search input enhancements */
@media (max-width: 768px) {
  .search-input {
    height: 36px; /* iOS minimum touch target */
    font-size: 16px; /* Prevents iOS zoom */
    border-radius: 0;
  }
}

/* iPhone specific optimizations */
@media (max-width: 480px) {
  /* .search-input {
    height: 48px; 
    padding: 10px 14px;
    font-size: 16px; 
    min-width: 120px;
    flex: 1;
    max-width: none;
    border-width: 2px;
  } */
  
  .search-input:focus {
    border: 2px solid #0078d4;
    outline-offset: 2px;
  }
}

/* iPhone Pro Max and larger screens */
@media (max-width: 430px) {
  .search-input {
    width: 100%;
  }
}

/* Form Styling */
.form-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #9c9c9c;
}

.form-header h2 {
  font-size: 16px;
  color: #000000;
  margin-bottom: 4px;
}

.form-header p {
  font-size: 11px;
  color: #666666;
}

/* Desktop Form */
.desktop-form {
  height: calc(100% - 80px);
  display: flex;
  flex-direction: column;
}

/* Form Tabs */
.form-tabs {
  display: flex;
  margin-bottom: 16px;
  border-bottom: 1px solid #9c9c9c;
}

.tab-button {
  padding: 6px 16px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-bottom: none;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000000;
  cursor: pointer;
  margin-right: 2px;
}

.tab-button:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.tab-button.active {
  background: #c0c0c0;
  border: 1px solid #9c9c9c;
  border-bottom: 1px solid #c0c0c0;
  position: relative;
  z-index: 1;
}

/* Tab Content */
.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.tab-content.active {
  display: block;
}

.form-section {
  padding: 16px;
  background: #f0f0f0;
  border: 1px inset #d4d0c8;
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #000000;
}

.required {
  color: #ff0000;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 2px 4px;
  border: 1px inset #d4d0c8;
  background: white;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  height: 35px;
}

.form-textarea {
  height: auto;
  resize: vertical;
  min-height: 60px;
}

.form-input:focus,
.form-textarea:focus {
  outline: 1px dotted #000000;
  outline-offset: -2px;
}

.character-counter {
  font-size: 10px;
  color: #666666;
  text-align: right;
  margin-top: 2px;
}

.form-error {
  color: #ff0000;
  font-size: 10px;
  margin-top: 2px;
  min-height: 12px;
}

.form-help {
  font-size: 10px;
  color: #666666;
  margin-top: 4px;
}

/* Input with prefix */
.input-with-prefix {
  display: flex;
  align-items: center;
}

.input-prefix {
    background: #e0e0e0;
    border: 1px inset #d4d0c8;
    border-right: none;
    padding: 5px;
    font-size: 15px;
    height: 100%;
    display: flex;
    align-items: center;
}

.form-input.with-prefix {
  border-left: none;
}

/* Form Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #9c9c9c;
  margin-top: auto;
}

.nav-btn {
  padding: 6px 16px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000000;
  cursor: pointer;
  min-width: 80px;
}

.nav-btn:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.nav-btn:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 100%);
}

.submit-btn {
  background: linear-gradient(to bottom, #0078d4 0%, #106ebe 100%);
  color: white;
}

.submit-btn:hover {
  background: linear-gradient(to bottom, #106ebe 0%, #1e3a8a 100%);
}

/* File Upload */
.file-upload-area {
  border: 2px dashed #9c9c9c;
  background: #f8f8f8;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.file-upload-area:hover {
  background: #f0f0f0;
}

.file-upload-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.file-upload-text {
  font-size: 12px;
  margin-bottom: 4px;
}

.file-upload-hint {
  font-size: 10px;
  color: #666666;
  margin-bottom: 12px;
}

.browse-btn {
  padding: 4px 16px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000000;
  cursor: pointer;
}

.browse-btn:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.image-preview {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px inset #d4d0c8;
  align-items: center;
}

.image-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 1px solid #808080;
}

.image-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.image-name {
  font-size: 11px;
  font-weight: bold;
  color: #000000;
}

.image-size {
  font-size: 10px;
  color: #666666;
}

.remove-image-btn {
  padding: 2px 8px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 10px;
  color: #000000;
  cursor: pointer;
  align-self: flex-start;
}

.form-actions {
  text-align: center;
  padding: 16px 0;
}

.btn {
  padding: 6px 16px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000000;
  cursor: pointer;
}

.btn:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.btn-primary {
  background: linear-gradient(to bottom, #0078d4 0%, #106ebe 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #106ebe 0%, #1e3a8a 100%);
}

/* Loading and spinner */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #d6d3ce;
  border-top: 3px solid #0078d4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Window opening animation */
@keyframes windowOpen {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.app-window.opening {
  animation: windowOpen 0.2s ease-out;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1600;
}

/* Modal positioning wrapper for absolutely positioned children */
.modal-overlay > .modal-container {
  position: relative;
}

.modal-container {
  position: relative;
  background: #c0c0c0;
  box-shadow: 2px 2px 8px rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  width: 415px;
  padding: 15px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.modal-close:hover {
  background: linear-gradient(to bottom, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.modal-content {
  position: relative;
  display: grid;
  /* width: 385px; */
  grid-template-columns: 1fr;
  grid-template-rows: 50px 250px 200px;
  gap: 20px;
  /* padding: 16px; */
  background: linear-gradient(to bottom, #C0C0C0 75%, #FDFDFD);
}

.card_name_shape {
  display: grid;
  grid-template-areas: "main";
  top: 0;
  left: 0;
  height: auto;
}

.name_corner {
  grid-area: main;
  width: 220px;
  z-index: 1;
}

.modal-location {
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-location span {
  font-size: 0.8rem;
  margin-top: 3px;
}

.modal-instagram {
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-instagram span {
  font-size: 0.8rem;
  margin-top: 3px;
}

.modal-image-section {
  display: flex;
  flex-direction: column;
  height: 350px;
  /* width: 350px; */
  margin-inline: 16px;
}

.modal-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5); */
  border-radius: 20px;
  height: 250px;
}

.modal-member-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50px;
}

.member_pic_border {
  position: absolute;
  top: 0;
  left: -6px;
  width: 103%;
  height: 103%;
  pointer-events: none;
  z-index: 9999;
}


.modal-image-placeholder {
  color: #666666;
  font-size: 11px;
  text-align: center;
}

.modal-info-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: scroll;
  /* border: 5px solid #A6A6A6; */
  padding: 5px;
  /* width: 350px; */
  margin: 0 16px 16px 16px;
  /* Hide scrollbar when not scrolling */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.modal-info-section::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}

.modal-header {
  display: flex;
  justify-content: space-between;
}

.header_emblems {
  margin: 10px 0 0 0;
  display: flex;
}

.modal-member-name {
  grid-area: main;
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: #000000;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  translate: -15px;
}

.emblem {
  width: 45px;
  height: 45px;
  margin-right: 8px;
}

.modal-member-craft {
  font-size: 12px;
  color: #0078d4;
  font-weight: bold;
}

.modal-member-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.location_instagram {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: start;
  gap: 10px;
  /* border: 1px solid grey; */
}

.icon {
  width: 24px;
  height: 24px;
}

.modal-instagram,
.modal-bio {

}

.modal-bio strong {
  font-size: 1rem;
  color: #000000;
  display: block;
  margin-bottom: 8px;
}

.modal-bio p {
  font-size: 11px;
  line-height: 1.4;
  color: #333333;
}

/* Collage Grid Styles */
.collage-grid,
.community-grid {
  display: grid;
  gap: 2px;
  padding: 8px;
  background: white;
  border: 1px inset #d4d0c8;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.collage-content {
  height: 100%;
  /* Enhanced mobile scrolling */
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

.collage-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #d6d3ce;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Enhanced touch interaction */
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.2);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
  /* Prevent image selection on mobile */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}

.collage-item:hover img {
  transform: scale(1.05);
}

.collage-item:active {
  /* Enhanced active state for touch */
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.3);
  transform: scale(0.98);
}

.collage-item.placeholder {
  background: #e0e0e0;
  color: #999999;
  font-size: 10px;
  text-align: center;
}

/* Mobile-specific collage item enhancements */
@media (max-width: 768px) {
  .collage-item {
    /* Larger touch targets for mobile */
    min-height: 44px;
    min-width: 44px;
    /* Enhanced touch feedback */
    -webkit-tap-highlight-color: rgba(0, 120, 212, 0.25);
  }
  
  .collage-item:active {
    transform: scale(0.95);
    -webkit-tap-highlight-color: rgba(0, 120, 212, 0.4);
  }
}

/* iPhone specific collage optimizations */
@media (max-width: 480px) {
  .collage-item {
    min-height: 48px;
    min-width: 48px;
    /* Stronger visual feedback for small screens */
    -webkit-tap-highlight-color: rgba(0, 120, 212, 0.3);
  }
  
  .collage-item:active {
    transform: scale(0.92);
    -webkit-tap-highlight-color: rgba(0, 120, 212, 0.5);
  }
  
}

@media (max-width: 450px) {
  .emblem {
    width: 35px;
    height: 35px;
  }

  .name_corner {
    width: 180px;
  }

  .modal-member-name {
    margin-bottom: 10px;
  }
}

/* Dynamic grid classes */  
.grid-2x2 { grid-template-columns: repeat(2, 1fr); }
.grid-3x3 { grid-template-columns: repeat(3, 1fr); }
.grid-4x4 { grid-template-columns: repeat(4, 1fr); }
.grid-5x5 { grid-template-columns: repeat(5, 1fr); }
.grid-6x6 { grid-template-columns: repeat(6, 1fr); }
.grid-7x7 { grid-template-columns: repeat(7, 1fr); }
.grid-8x8 { grid-template-columns: repeat(8, 1fr); }
.grid-9x9 { grid-template-columns: repeat(9, 1fr); }
.grid-10x10 { grid-template-columns: repeat(10, 1fr); }
.grid-11x11 { grid-template-columns: repeat(11, 1fr); }
.grid-12x12 { grid-template-columns: repeat(12, 1fr); }
.grid-13x13 { grid-template-columns: repeat(13, 1fr); }
.grid-14x14 { grid-template-columns: repeat(14, 1fr); }
.grid-15x15 { grid-template-columns: repeat(15, 1fr); }
.grid-16x16 { grid-template-columns: repeat(16, 1fr); }
.grid-17x17 { grid-template-columns: repeat(17, 1fr); }
.grid-18x18 { grid-template-columns: repeat(18, 1fr); }
.grid-19x19 { grid-template-columns: repeat(19, 1fr); }
.grid-20x20 { grid-template-columns: repeat(20, 1fr); }

/* Sphere Container */
.sphere-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  height: 700px;
  aspect-ratio: 1/1;
  z-index: 1;
  /* Initial position for drop animation - start above viewport */
  transform: translateY(-100vh);
  opacity: 0;
}

/* Drop animation for sphere container */
.sphere-container.drop-in {
  animation: sphereDrop 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes sphereDrop {
  0% {
    transform: translateY(-100vh);
    opacity: 0;
  }
  60% {
    transform: translateY(10px);
    opacity: 1;
  }
  80% {
    transform: translateY(-5px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.sphere-canvas {
  width: 180%;
  aspect-ratio: 1/1;
  display: block;
}

.sphere-controls {
  position: relative;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sphere-join-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 50%, #ada5a0 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  min-width: 120px;
  justify-content: center;
  transition: all 0.1s ease;
  -webkit-tap-highlight-color: rgba(0, 120, 212, 0.2);
  touch-action: manipulation;
  user-select: none;
}

.sphere-join-btn:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 50%, #b5aca7 100%);
}

.sphere-join-btn:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 50%, #f2efea 100%);
  transform: scale(0.98);
}

.sphere-join-btn .btn-icon {
  font-size: 14px;
}

.sphere-join-btn .btn-text {
  white-space: nowrap;
}

.control-hint {
  text-align: center;
  white-space: nowrap;
}

/* Mobile responsive controls */
@media (max-width: 768px) {
  .desktop {
    gap: 1rem;
  }
  
  .control-hint span {
    display: block;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .sphere-controls {
    position: absolute;
    bottom: 85px;
  }
}

/* Error and Loading States */
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  padding: 20px;
}

.error-message h3 {
  color: #000000;
  font-size: 16px;
  margin-bottom: 8px;
}

.error-message p {
  color: #666666;
  font-size: 12px;
  margin-bottom: 16px;
}

.retry-btn {
  padding: 4px 12px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000000;
  cursor: pointer;
  height: 24px;
}

.retry-btn:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

/* Responsive Modal */
@media (max-width: 768px) {
  /* .modal-content {
    grid-template-columns: 1fr;
    min-width: auto;
  } */

  .sphere-canvas {
    width: 130%;
  }

}

@media (max-width: 480px) {
  .modal-container {
    width: var(--mobile-window-max-width);
    max-width: var(--mobile-window-max-width);
    max-height: var(--mobile-window-max-height);
  }
  
  .modal-content {

  }

  .modal-image-container {
  }

  .modal-member-image {
  }
  .sphere-container {
    /* width: auto;
    height: 120%; */
  }

  .sphere-canvas {
    width: 90%;
  }
}

/* Responsive Design for Small Mobile */
@media (max-width: 480px) {
  /* Update CSS variables for small mobile */
  :root {
    --mobile-taskbar-height: 52px;
    --mobile-window-max-width: 92vw;
    --mobile-window-max-height: calc(100vh - var(--mobile-taskbar-height) - 30px);
    --mobile-window-max-height-dvh: calc(100dvh - var(--mobile-taskbar-height) - 30px);
  }

  .desktop-icons {
    gap: 20px;
  }

  .icon-image {
    width: 80px;
    height: 80px;
  }

  /* Show all icons on small mobile */
  .desktop-icon:nth-child(5),
  .desktop-icon:nth-child(6),
  .desktop-icon:nth-child(7) {
    display: flex;
  }

  .community-grid {
    grid-template-columns: repeat(2, 1fr);
  }


  
  .clock {
    font-size: 11px;
    min-width: 55px;
  }
  
  .tray-icon {
    font-size: 16px;
  }
  
  /* .desktop {
    height: var(--mobile-safe-height);
  } */
  
  .video-window {
    width: var(--mobile-window-max-width);
    max-height: var(--mobile-window-max-height);
  }
  
  #desktop-video {
    max-height: calc(var(--mobile-window-max-height) - 100px);
  }
  
  /* App window responsive adjustments for small mobile - CRITICAL FIX */
  .app-window {
    width: var(--mobile-window-max-width) !important;
    height: var(--mobile-window-max-height) !important;
    max-width: var(--mobile-window-max-width) !important;
    max-height: var(--mobile-window-max-height) !important;
    top: calc(var(--safe-area-top) + 15px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: auto !important;
  }
  
  #vignettes-window,
  #products-window,
  #collage-window,
  #join-window {
    width: var(--mobile-window-max-width) !important;
    height: var(--mobile-window-max-height) !important;
  }

  .vignettes-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr 1fr;
  }
}

/* Support for dynamic viewport height on small mobile */
@media (max-width: 480px) {
  @supports (height: 100dvh) {
    :root {
      --mobile-safe-height: var(--mobile-safe-height-dvh);
      --mobile-window-max-height: var(--mobile-window-max-height-dvh);
    }
  }
}

/* Products Grid Styles */
.products-content {
  height: 100%;
  position: relative;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px;
  background: white;
  border: 1px inset #d4d0c8;
  overflow-y: auto;
}

.product-card {
  position: relative;
  background: #f8f8f8;
  border: 1px outset #d4d0c8;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.product-card:hover {
  border: 1px inset #d4d0c8;
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
}

.product-card:active {
  transform: translateY(0);
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Product Mobile Banner */
.product-mobile-banner {
  display: none;
  padding: 8px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border-bottom: 1px solid #9c9c9c;
}

.product-title {
  font-size: 11px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 2px;
  line-height: 1.2;
}

.product-price {
  font-size: 10px;
  color: #0078d4;
  font-weight: bold;
}

/* Product Image Grid */
.product-image-grid {
  display: grid;
  gap: 2px;
  background: #e0e0e0;
  max-height: 250px;
}

.product-image-grid.grid-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.product-image-grid.grid-2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

.product-image-grid.grid-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.product-image-grid.grid-4 {
  grid-template-columns: 1fr 1fr;
}

.product-image-item {
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 100px;
}

.product-image-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.2s ease;
}

.product-image-item:hover img {
  transform: scale(1.05);
}

.product-image-item.placeholder {
  background: #e8e8e8;
  color: #999999;
  font-size: 10px;
  text-align: center;
}

/* Product Hover Popup */
.hover-popup {
  position: fixed;
  background: #ffffcc;
  border: 1px solid #000000;
  padding: 4px 8px;
  font-size: 11px;
  z-index: 3000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hover-popup.visible {
  opacity: 1;
}

.popup-title {
  font-weight: bold;
  color: #000000;
  margin-bottom: 2px;
}

.popup-price {
  color: #0078d4;
  font-weight: bold;
}

/* Product Modal Styles - Separate from Member Modal */
.product-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1600;
}

.product-modal-container {
  position: relative;
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  width: 800px;
  max-width: 95vw;
  max-height: 90vh;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  overflow: scroll;
}

.product-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.product-modal-close:hover {
  background: linear-gradient(to bottom, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.product-modal-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  padding: 20px;
  /* min-height: 500px; */
  background: #c0c0c0;
  height: calc(100% - 40px);
  overflow-y: auto;
}

.modal-product-image {
  width: 100%;
  height: 250px;
  object-fit: contain;
  border: 1px solid #808080;
  background: white;
}

.modal-thumbnails {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.modal-thumbnail {
  width: 50px;
  height: 50px;
  border: 2px solid #d6d3ce;
  cursor: pointer;
  overflow: hidden;
  background: white;
}

.modal-thumbnail.active {
  border-color: #0078d4;
}

.modal-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-thumbnail:hover {
  border-color: #106ebe;
}

.modal-product-title {
  font-size: 20px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 4px;
  line-height: 1.2;
}

.modal-product-vendor {
  font-size: 12px;
  color: #666666;
  margin-bottom: 8px;
}

.modal-product-price {
  font-size: 18px;
  font-weight: bold;
  color: #0078d4;
  margin-bottom: 8px;
}

.modal-product-availability {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 16px;
}

.modal-product-availability.available {
  color: #008000;
}

.modal-product-availability.unavailable {
  color: #ff0000;
}

.modal-description {
  margin-bottom: 16px;
}

.modal-description strong {
  font-size: 12px;
  color: #000000;
  display: block;
  margin-bottom: 4px;
}

.modal-description p {
  font-size: 11px;
  line-height: 1.4;
  color: #333333;
}

/* Product Variants */
.modal-variants {
  margin-bottom: 16px;
}

.variant-group {
  margin-bottom: 12px;
}

.variant-label {
  font-size: 11px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 4px;
}

.variant-options {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.variant-option {
  padding: 4px 8px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 10px;
  color: #000000;
  cursor: pointer;
  min-width: 40px;
  text-align: center;
}

.variant-option:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.variant-option.selected {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #0078d4 0%, #106ebe 100%);
  color: white;
}

.variant-option.unavailable {
  background: #e0e0e0;
  color: #999999;
  cursor: not-allowed;
}

/* Quantity Controls */
.modal-quantity {
  margin-bottom: 16px;
}

.modal-quantity label {
  font-size: 11px;
  font-weight: bold;
  color: #000000;
  display: block;
  margin-bottom: 4px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.quantity-btn {
  width: 24px;
  height: 24px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.quantity-btn:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 100%);
}

.quantity-input {
  width: 60px;
  height: 24px;
  text-align: center;
  border: 1px inset #d4d0c8;
  background: white;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-actions .btn {
  flex: 1;
  padding: 8px 16px;
  font-size: 12px;
  height: 32px;
}

/* Product Tags */
.modal-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.modal-tag {
  padding: 2px 6px;
  background: #f0f0f0;
  border: 1px solid #d6d3ce;
  font-size: 10px;
  color: #666666;
  border-radius: 0;
}

/* No Products State */
.no-products {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  padding: 20px;
}

.no-products-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-products h3 {
  color: #000000;
  font-size: 16px;
  margin-bottom: 8px;
}

.no-products p {
  color: #666666;
  font-size: 12px;
}

/* ELMNT Mobile Tap Indicator Styles */
.elmnt-tap-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  z-index: 15;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
}

.elmnt-tap-indicator.show {
  opacity: 1;
  transform: scale(1);
}

.elmnt-tap-indicator.pulse {
  animation: tapPulse 1.5s ease-in-out infinite;
}

@keyframes tapPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* ELMNT Video Modal Styles */
.elmnt-video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  box-sizing: border-box;
}

.elmnt-modal-content {
  background: #000;
  border-radius: 8px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.elmnt-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.elmnt-modal-close:hover {
  color: #ff6b6b;
}

.elmnt-modal-title {
  color: white;
  margin: 0 0 20px 0;
  text-align: center;
  font-size: 24px;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
}

.elmnt-modal-video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Mobile-specific ELMNT styles */
@media (max-width: 768px) {
  .elmnt-tap-indicator {
    font-size: 9px;
    padding: 3px 6px;
    max-width: 70px;
    bottom: 6px;
    right: 6px;
  }
  
  .elmnt-modal-content {
    padding: 15px;
    max-width: 95vw;
    max-height: 95vh;
  }
  
  .elmnt-modal-title {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .elmnt-modal-video {
    max-height: 60vh;
  }
  
  .elmnt-modal-close {
    top: 5px;
    right: 10px;
    font-size: 24px;
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .elmnt-tap-indicator {
    font-size: 8px;
    padding: 2px 4px;
    max-width: 60px;
    bottom: 4px;
    right: 4px;
    border-radius: 3px;
  }
  
  .elmnt-modal-content {
    padding: 10px;
  }
  
  .elmnt-modal-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .elmnt-modal-video {
    max-height: 50vh;
  }
}

/* Join Icon Popup Styles */
.join-icon-popup {
  position: absolute;
  background: #ffffcc;
  border: 2px outset #d4d0c8;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 1200;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #000000;
  padding: 8px 12px;
  border-radius: 0;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.join-icon-popup.show {
  opacity: 1;
  transform: scale(1);
}

.join-icon-popup.hide {
  opacity: 0;
  transform: scale(0.8);
}

.popup-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #ffffcc;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

.popup-content {
  position: relative;
  z-index: 1;
}

/* Mobile adjustments for join popup */
@media (max-width: 768px) {
  .join-icon-popup {
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .join-icon-popup {
    font-size: 10px;
    padding: 5px 8px;
  }
  
  .popup-arrow {
    border-left-width: 6px;
    border-right-width: 6px;
    border-top-width: 6px;
    bottom: -6px;
  }
}

/* Responsive Products */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 12px;
  }
  
  .product-mobile-banner {
    display: block;
  }
  
  .product-modal-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  
  .modal-product-image {
    height: 200px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
}

/* Mobile responsiveness for product modal */
@media (max-width: 768px) {
  .product-modal-container {
    width: var(--mobile-window-max-width);
    max-width: var(--mobile-window-max-width);
    max-height: var(--mobile-window-max-height);
  }

  .product-modal-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .modal-product-image {
    height: 200px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .product-card {
    min-height: 120px;
  }

  .product-image-grid {
    min-height: 80px;
  }

  .product-modal-container {
  }
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #f0f0f0;
  border: 1px inset #d4d0c8;
}

.benefit-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.benefit-text h3 {
  font-size: 12px;
  color: #000000;
  margin-bottom: 4px;
}

.benefit-text p {
  font-size: 11px;
  color: #333333;
  line-height: 1.4;
}

.benefits-footer {
  text-align: center;
}

/* Help Content Styles */
.help-content {
  padding: 16px;
}

.help-content h2 {
  font-size: 16px;
  color: #000000;
  margin-bottom: 16px;
}

.help-section {
  margin-bottom: 16px;
  padding: 12px;
  background: #f0f0f0;
  border: 1px inset #d4d0c8;
}

.help-section h3 {
  font-size: 12px;
  color: #000000;
  margin-bottom: 8px;
}

.help-section p {
  font-size: 11px;
  color: #333333;
  line-height: 1.4;
  margin-bottom: 8px;
}

.help-section ul {
  margin-left: 16px;
}

.help-section li {
  font-size: 11px;
  color: #333333;
  line-height: 1.4;
  margin-bottom: 4px;
}

/* File Manager Content Styles */
.file-manager-content {
  padding: 8px;
}

.file-toolbar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px inset #d4d0c8;
  margin-bottom: 8px;
}

.file-list {
  background: white;
  border: 1px inset #d4d0c8;
  height: 300px;
  overflow-y: auto;
}

.file-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 8px;
  padding: 4px 8px;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.file-item:hover {
  background: #e0e0e0;
}

.file-item:active {
  background: #316ac5;
  color: white;
}

.file-icon {
  font-size: 16px;
  text-align: center;
}

.file-name {
  font-size: 11px;
  color: #000000;
}

.file-size {
  font-size: 10px;
  color: #666666;
}

/* Dialog Windows */
.dialog-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  width: 400px;
  min-height: 200px;
}

.dialog-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  background: linear-gradient(to right, #0078d4 0%, #106ebe 100%);
  color: white;
  padding: 0 4px;
  font-size: 11px;
  font-weight: bold;
}

.dialog-title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dialog-content {
  padding: 16px;
  text-align: center;
}

.dialog-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.dialog-content h3 {
  font-size: 14px;
  color: #000000;
  margin-bottom: 8px;
}

.dialog-content p {
  font-size: 11px;
  color: #333333;
  line-height: 1.4;
  margin-bottom: 8px;
}

.dialog-buttons {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* Active taskbar button */
.taskbar-button.active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 100%);
}

/* Additional responsive adjustments for new content */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .form-tabs {
    flex-wrap: wrap;
  }
  
  .tab-button {
    flex: 1;
    min-width: 80px;
  }
  
  .image-preview {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .image-preview img {
    width: 100px;
    height: 100px;
    margin: 0 auto;
  }
  
  .benefits-list {
    gap: 12px;
  }
  
  .benefit-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .file-item {
    grid-template-columns: 30px 1fr;
    gap: 8px;
  }
  
  .file-size {
    display: none;
  }
}

@media (max-width: 480px) {
  .form-header h2 {
    font-size: 14px;
  }
  
  .form-header p {
    font-size: 10px;
  }
  
  .tab-button {
    padding: 4px 8px;
    font-size: 10px;
  }
  
  .form-section {
    padding: 12px;
  }
  
  .form-navigation {
    flex-direction: column;
    gap: 8px;
  }
  
  .nav-btn {
    width: 100%;
  }
  
  .dialog-window {
    width: 95vw;
    max-width: 350px;
    max-height: var(--mobile-window-max-height);
  }
}

/* Share Profile Button */
.share-profile-btn {
  position: absolute;
  top: 8px;
  right: 40px;
  width: 24px;
  height: 24px;
  background: linear-gradient(to bottom, #ece9d8 0%, #d6d3ce 100%);
  border: 1px outset #d4d0c8;
  border-radius: 0;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all 0.1s ease;
}

.share-profile-btn:hover {
  background: linear-gradient(to bottom, #f2efea 0%, #ddd9d4 100%);
}

.share-profile-btn:active {
  border: 1px inset #d4d0c8;
  background: linear-gradient(to bottom, #d6d3ce 0%, #ece9d8 100%);
}

/* Focus styles for new elements */
.tab-button:focus,
.nav-btn:focus,
.share-profile-btn:focus,
.dialog-window:focus {
  outline: 1px dotted #000000;
  outline-offset: -2px;
}
