/* Mobile Styles */

@media (max-width: 768px) {
  /* Lock the body to prevent overall page scrolling */
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent body scrolling */
    position: fixed;
  }
  
  body:has(.monitor) {
    transform: none;
    width: 100%;
    height: 100%;
    position: fixed;
    overflow: hidden;
    display: block;
    margin: 0;
    padding: 0;
  }
  
  body {
    background-image: url('images/background.png');
    background-size: cover;
  }


  /* Hide desk clickable areas on mobile */
  .desk-clickable-areas,
  .desk-click-box {
    display: none !important;
    pointer-events: none;
  }

  /* Mobile cursor settings */
  * {
    cursor: auto !important;
  }
  
  /* Hide desktop-specific elements */
  .flame-overlay,
  .cursor-container,
  #custom-cursor,
  #physical-mouse,
  .corner-icons,
  .monitor-bg,
  .notepad-wrapper {
    display: none !important;
  }
  
  /* Mobile monitor styles */
  .monitor-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .monitor {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    border: 3px solid #fcb1ff;
    box-sizing: border-box;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
  }
  
  .monitor-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 65px 15px 15px 15px; /* Increased top padding for header */
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    height: 100%;
  }
  
  /* Fix wallpaper positioning */
  .wallpaper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
  }
  
  /* Make tab content fill the available space */
  .tab-content {
    display: none;
    position: relative;
  }
  
  .tab-content.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 1; /* Above wallpaper */
    overflow: hidden;
    max-height: calc(100% - 30px); /* Account for padding */
  }
  
  /* Make grid section fill the available space */
  .grid-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    margin: 5px 0;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    max-height: calc(100% - 10px);
  }
  
  /* Only the projects grid should scroll */
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px 15px;
    padding: 10px;
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
  }
  
  /* Make sure sections fill available space on mobile */
  .section {
    margin: 5px 0;
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
  }
  
  .project-card {
    padding: 12px;
  }
  
  .project-card img {
    margin-bottom: 10px;
  }
  
  .project-card:hover {
    transform: none;
    box-shadow: 0 0 8px #ffd6ff;
  }
  
  /* Hide navigation arrows as they're no longer needed */
  .arrow-btn {
    display: none;
  }
  
  /* Fix footer position */
  .footer {
    position: relative;
    width: 100%;
    margin-top: auto;
    padding-bottom: 10px;
    z-index: 1;
  }

  /* Mobile header styles */
  .mobile-header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #1a1a2e;
    border-bottom: 2px solid #fcb1ff;
    z-index: 9990;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    text-align: center;
  }
  
  .mobile-header h1 {
    margin: 0;
    padding: 0;
    line-height: 50px;
    color: #fcb1ff;
    font-size: 1.5rem;
  }
  
  /* Move the menu button to be part of the header */
  .mobile-menu-button {
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    border-radius: 0;
    border: none;
    border-left: 2px solid #fcb1ff;
    box-shadow: none;
  }

  /* Mobile menu container styles */
  .mobile-menu-container {
    display: block; /* Show on mobile */
  }
  
  /* Mobile menu styles */
  .mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background-color: #1a1a2e;
    z-index: 9998;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 10px 0;
    text-align: center;
  }
  
  .mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
  }
  
  .mobile-menu-item {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    background-color: #2a2a4f;
    border: 2px solid #fcb1ff;
    border-radius: 15px;
    color: #fcb1ff;
    font-weight: bold;
    cursor: pointer !important;
    transition: background-color 0.2s;
  }
  
  .mobile-menu-item.active {
    background-color: #fcb1ff;
    color: #1a1a2e;
  }
  
  /* Adjust sections for mobile */
  .subtabs {
    flex-wrap: wrap;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin-bottom: 5px;
  }
  
  .subtab {
    padding: 8px 5px;
    font-size: 0.9em;
  }
  
  /* Make subtab content containers scrollable */
  .subtab-content {
    display: none;
  }
  
  .subtab-content.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
    max-height: calc(100% - 40px); /* Account for subtabs */
  }

  
  /* Make globe gifs smaller */
  #extras img[src*="globe.gif"] {
    height: 30px !important;
    width: auto;
  }
  
  /* Make arrow gifs smaller */
  #extras img[src*="arrow.gif"] {
    height: 25px !important;
    width: auto;
  }

  #extras h2,
  #extras h3,
  #extras p {
    font-size: 0.9em;
  }
}

