/* ===== MOBILE STYLES - NEOCITY ===== */
/* Mobile-specific styles that override desktop layout */

/* ===== CORE LAYOUT ===== */
body {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-family: 'Press Start 2P', monospace;
  background-size: cover;
  padding-bottom: 60px; /* needed for fixed taskbar */
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
  overflow-y: scroll;
}

body::after {
  content: '';
  display: none; /* placeholder for scroll content */
}

/* ===== SCROLLBAR HANDLING ===== */
/* Hide scrollbars visually while keeping functionality */
html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
  overflow-y: scroll;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.window::-webkit-scrollbar,
.desktop-wrapper::-webkit-scrollbar,
.window-stack::-webkit-scrollbar {
  display: none;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* ===== TASKBAR ===== */
footer.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  z-index: 9999;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.3);
}

.taskbar-apps {
  opacity: 0;
  pointer-events: none;
}

/* ===== WINDOW CORE STYLES ===== */
.window {
  position: static !important;
  width: 94% !important;
  max-width: 540px;
  margin: 6px auto;
  height: auto !important;
  box-shadow: none !important;
  border: 2px solid #444;
  border-radius: 6px;
  margin-inline: auto;
}

@media (max-width: 768px) {
  .window .window-header {
    background: linear-gradient(to right, #000080, #0000ff) !important;
    color: white !important;
    font-family: 'DOSVGA', monospace !important;
    box-shadow:
      inset -1px -1px 0 #fff,
      inset 1px 1px 0 #000,
      0 1px 2px rgba(0, 0, 0, 0.5) !important;
  }
}

.desktop-icons {
  display: none !important;
}

/* ===== WINDOW ANIMATIONS ===== */
@keyframes mobileFadeIn {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes mobileFadeOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.96); }
}

.window.opening {
  animation: mobileFadeIn 0.25s ease-out forwards;
}

.window.closing {
  animation: mobileFadeOut 0.2s ease-out forwards;
}

/* ===== SPECIFIC WINDOW STYLES ===== */
/* Common window size settings */
#tip,
#chatbot,
#numerology,
#window-portfolio,
#window-shop,
#guestbook,
#gifypet,
#yume {
  width: 94% !important;
  max-width: 540px;
  margin: 6px auto;
  height: auto !important;
}

/* Prevent content overflow */
.window,
.window-content,
.desktop-icons,
.fixed-ipod {
  max-width: 100vw;
  overflow-x: hidden !important;
}

/* Allow start menu to overflow properly */
#start-menu {
  overflow-x: visible !important;
}

/* ===== IPOD WINDOW ===== */
@media (max-width: 768px) {
  #fixed-ipod:not(.visible) {
    display: none !important;
  }
  
  #fixed-ipod {
    transform: scale(0.8);
    transform-origin: bottom right;
  }
}

/* ===== OSCILLATOR WINDOW ===== */
@media (max-width: 768px) {
  #oscillator {
    max-height: 270px;
  }

  #oscillator .window-content {
    max-height: 230px;
    overflow: hidden;
  }

  #oscilloscope {
    width: 100% !important;
    height: 50px !important;
  }
}

/* ===== NUMEROLOGY WINDOW ===== */
@media (max-width: 768px) {
  #numerology {
    max-height: 400px;
  }

  #numerology .window-content {
    max-height: 360px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #numerology-output {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 10px;
  }

  #numerology .form-row {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
  }
}

/* ===== CHATBOT WINDOW ===== */
@media (max-width: 768px) {
  #chatbot {
    height: 520px !important;
    max-height: 520px !important;
  }

  #chatbot .window-content {
    flex: 1;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .chatbot-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .chat-display {
    flex: 1;
    overflow-y: auto;
    max-height: unset;
  }
}

/* ===== PORTFOLIO WINDOW ===== */
@media (max-width: 768px) {
  #window-portfolio {
    max-height: 400px;
  }

  #window-portfolio .window-content {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
  }
}

/* ===== GIFYPET WINDOW ===== */
@media (max-width: 768px) {
  #gifypet {
    width: 240px !important;
    height: 360px !important;
    max-height: 90vh;
  }

  #gifypet .window-content {
    height: 100%;
    overflow: hidden;
    padding: 0 !important;
  }

  #gifypet iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border: none;
  }
}

/* ===== GUESTBOOK WINDOW ===== */
@media (max-width: 768px) {
  #guestbook {
    max-height: 360px !important;
  }

  #guestbook .window-content {
    max-height: 320px;
    overflow-y: auto;
  }
}

/* ===== YUME WINDOW ===== */
@media (max-width: 768px) {
  #yume {
    width: 94% !important;
    max-width: 540px !important;
    min-width: unset !important;
  }

  #yume .window-content {
    flex-direction: column;
    height: auto !important;
  }

  #yume img {
    height: auto !important;
    max-height: 100px;
    object-fit: cover;
  }

  .yume-marquee-wrapper {
    margin-top: 6px;
  }
}

/* ===== THEME OVERRIDES ===== */
/* Windows 98 theme for mobile */
@media (max-width: 768px) {
  body.theme-win98 .window .window-header {
    background: linear-gradient(to right, #ff00a8, #00d7ff) !important;
    color: #fff;
    font-family: 'DOSVGA', monospace;
    font-size: 13px;
    border-bottom: 2px solid #fff;
    box-shadow:
      inset 0 -1px 0 #fff,
      inset 0 1px 0 #000,
      0 0 4px #00d7ffaa;
  }
  
  body.theme-win98 .window.active-window .window-header {
    background: linear-gradient(to right, #ff00a8, #00d7ff) !important;
    color: #fff;
    border-bottom: 0.05px solid #fff;
    box-shadow:
      inset 0 -1px 0 #fff,
      inset 0 1px 0 #000,
      0 0 4px #00d7ffaa;
  }
}

