* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

.window.maximized {
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px); /* Account for taskbar */
}

.media-player-buttons .maximize {
    display: none;
}

.toolbar {
    display: flex;
    align-items: center;
    background-color: #c0c0c0;
    padding: 5px;
    border-bottom: 1px solid #808080;
}

.toolbar button {
    background: #e0e0e0;
    border: 1px solid #808080;
    border-radius: 3px;
    padding: 5px 10px;
    margin-right: 5px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar button:hover {
    background: #d0d0d0;
}

.toolbar input {
    flex-grow: 1;
    border: 1px solid #808080;
    padding: 5px;
    font-size: 14px;
    background-color: #f0f0f0;
    color: #333;
}


.taskbar-instances {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px; 
    margin-bottom: 2.5px; 
    flex-grow: 1;
    flex-basis: 60%;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.taskbar-button {
    height: 30px;
    background-color: #cccccc;
    border: 1px solid #999999;
    padding: 5px 10px;
    display: flex;
    align-items: center; /* Vertically center icon and text */
    cursor: pointer;
    border-radius: 1px;
    box-shadow: -1px -1px 0px #ffffff, 2px 2px 0px #000000; /* Raised effect */
    transition: box-shadow 0.1s, transform 0.1s; /* Smooth transition */
}

.taskbar-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px; /* Space between icon and title */
    object-fit: contain;
}

.taskbar-button:active {
    box-shadow: 1px 1px 0px #ffffff, -2px -2px 0px #000000; /* Inverted shadow for pushed look */
    transform: translateY(1px); /* Slight downward shift */
}


.desktop {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-image: url('images/background.png'); /* Use a Windows XP-style wallpaper */
    background-size: cover;
    background-position: center;
    transition: background 0.5s ease;
}

.desktop-icons {
    display: flex; 
    justify-content: flex-start; 
    align-items: flex-start; 
    left: 0; 
}

.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    position: absolute;
}

.desktop-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    transition: transform 0.2s, box-shadow 0.2s;
}

.desktop-icon span {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.desktop-icon:hover img {
}

.desktop-icon.selected {
    background-color: rgba(0, 120, 215, 0.3); /* Light blue background */
    border: 2px solid #0078D7; /* Blue border */
    border-radius: 4px;
}

/* Taskbar Styles */
.taskbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 40px;
    background-color: #c0c0c0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #808080;
    z-index: 10000;
}

.start-button {
    width: 80px;
    height: auto;
    margin-left: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.start-button img {
    width: 80px;
    height: auto;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.system-tray {
    display: flex;
    align-items: center;
    padding-right: 10px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.tray-icon {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.tray-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.wifi-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    color: white;
    font-size: 14px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.wifi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #666;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.wifi-item:last-child {
    border-bottom: none;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.wifi-item:hover {
    background-color: #000080;
    color: black;
    cursor: default;
}

.wifi-status {
    font-size: 16px;
}

.power-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    color: white;
    font-size: 14px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.power-item {
    padding: 10px;
    margin-bottom: 5px;
    background-color: #000080;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.power-item:hover {
    background-color: #3333cc;
    color: black;
}

.start-menu {
    position: absolute;
    bottom: 50px;
    left: 10px;
    width: 250px;
    background-color: #c0c0c0;
    border: 2px solid #808080;
    border-radius: 5px;
    display: none;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    z-index: 1001;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

.start-menu-header {
    display: flex;
    align-items: center;
    background-color: #000080;
    padding: 5px 10px;
    border-bottom: 1px solid #808080;
    color: white;
}

.start-menu-logo {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.start-menu-title {
    font-weight: bold;
    font-size: 14px;
}

.start-menu-content {
    padding: 10px;
}

.start-menu-section {
    margin-bottom: 10px;
}

.start-menu-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.start-menu-item:hover {
    background-color: #0000a0;
}

.menu-icon {
    width: 16px;
    height: 16px;
    margin-right: 10px;
}

.start-menu-submenu ul {
    list-style: none;
    padding-left: 26px; /* Indent submenu items */
    margin-top: 5px;
}

.start-menu-submenu ul li {
    padding: 5px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #000080;
}

.start-menu-submenu ul li:hover {
    background-color: #e0e0e0;
    color: #000;
}



.start-menu-submenu {
    display: none;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.start-menu-submenu.show {
    opacity: 1;
    visibility: visible;
    display: block;
    animation: slideDown 0.3s forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Popup Window Styles */
/* Settings (Display Properties) */
.settings-dialog{
  display:flex;
  flex-direction:column;
  gap:12px;
  height:100%;
  background:#d4d0c8;
  color:#000;
  font-family:'Tahoma','Verdana',sans-serif;
}
.settings-tabs{
  display:flex;
  gap:2px;
  padding:4px 6px 0;
  background:linear-gradient(#f3f3f3,#d4d0c8);
  border-bottom:1px solid #808080;
}
.settings-tab{
  border:1px solid #808080;
  border-bottom:0;
  padding:4px 12px;
  background:#c0c0c0;
  font-size:12px;
  cursor:pointer;
  position:relative;
  top:1px;
}
.settings-tab.active{
  background:#ffffff;
  font-weight:bold;
  box-shadow:inset -1px -1px 0 #ffffff,inset 1px 1px 0 #808080;
}
.settings-body{
  display:flex;
  gap:12px;
  padding:8px 12px 12px;
  flex:1;
  min-height:0;
  overflow:hidden;
}
.settings-preview{
  min-width:210px;
  max-width:240px;
  background:#c8c4bc;
  border:1px solid #808080;
  box-shadow:inset -1px -1px 0 #ffffff,inset 1px 1px 0 #a0a0a0;
  padding:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.settings-monitor{
  width:160px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.settings-monitor-bezel{
  width:100%;
  aspect-ratio:4/3;
  background:#3e3e3e;
  border:4px solid #bcbcbc;
  box-shadow:inset -2px -2px 0 #ffffff,inset 2px 2px 0 #808080;
  display:flex;
  align-items:center;
  justify-content:center;
}
.settings-monitor-screen{
  width:90%;
  height:80%;
  background:#000;
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.settings-monitor-screen::after{
  content:attr(data-label);
  position:absolute;
  bottom:4px;
  left:6px;
  font-size:10px;
  color:#39ff14;
  text-shadow:0 0 4px #39ff14;
  opacity:0.8;
}
.settings-monitor-screen.previewing{
  outline:2px solid #00ffff;
  box-shadow:0 0 14px rgba(0,255,255,0.7);
}
.settings-monitor-stand{
  width:60px;
  height:20px;
  background:#bcbcbc;
  border:2px solid #808080;
  box-shadow:inset -1px -1px 0 #ffffff,inset 1px 1px 0 #808080;
}
.settings-squiggle{
  position:absolute;
  width:160%;
  height:160%;
  border:2px solid #39ff14;
  border-radius:50%;
  animation:settingsSquiggle 6s linear infinite;
  opacity:0.8;
}
.settings-squiggle.ghost{
  border-color:#fffc00;
  animation-duration:9s;
  animation-direction:reverse;
  opacity:0.4;
}
@keyframes settingsSquiggle{
  0%{transform:rotate(0deg) scale(1);}
  50%{transform:rotate(180deg) scale(0.7);}
  100%{transform:rotate(360deg) scale(1);}
}
.settings-preview-controls{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12px;
}
.settings-preview-controls select,
.settings-preview-controls input[type=number]{
  width:100%;
  box-sizing:border-box;
  padding:2px 4px;
  border:1px solid #808080;
  background:#fff;
  font-size:12px;
}
.settings-preview-buttons{
  display:flex;
  gap:6px;
}
.settings-preview-buttons button{
  flex:1;
}
.settings-wait{
  display:flex;
  align-items:center;
  gap:6px;
}
.settings-checkbox{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
}
.settings-panels{
  flex:1;
  min-width:0;
  border:1px solid #808080;
  box-shadow:inset -1px -1px 0 #ffffff,inset 1px 1px 0 #a0a0a0;
  background:#f0efeb;
  padding:12px;
  display:flex;
  flex-direction:column;
  overflow:auto;
  gap:12px;
}
.settings-pane{
  display:none;
  flex-direction:column;
  gap:10px;
  font-size:13px;
  width:100%;
}
.settings-pane.active{
  display:flex;
}
.settings-pane select,
.settings-pane input[type=number]{
  margin-top:4px;
  padding:2px 4px;
  border:1px solid #808080;
  background:#fff;
  font-size:12px;
}
.settings-slider input[type=range]{
  width:100%;
}
.settings-background-options{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.settings-energy-times{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.settings-footer{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:0 12px 12px;
}
.settings-footer button,
.settings-preview button,
.settings-panels button{
  background:#c0c0c0;
  border:1px solid #808080;
  padding:4px 12px;
  font-size:12px;
  cursor:pointer;
  box-shadow:inset -1px -1px 0 #ffffff,inset 1px 1px 0 #808080;
}
.settings-footer button:active,
.settings-preview button:active,
.settings-panels button:active{
  box-shadow:inset 1px 1px 0 #ffffff,inset -1px -1px 0 #808080;
}
.settings-status, .settings-footer{
  flex-shrink:0;
}
.settings-status{
  border-top:1px solid #808080;
  background:#e2e2dd;
  padding:6px 12px;
  font-size:11px;
  color:#333;
  box-shadow:inset 0 1px 0 #ffffff;
}

.popup-window {
    position: absolute;
    top: 100px;
    left: 150px;
    width: 400px;
    height: 300px;
    border: 2px solid #808080;
    background-color: #c0c0c0;
    display: none; /* Hidden by default */
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    animation: fadeIn 0.3s forwards;
    z-index: 600; 
    overflow: hidden;
    user-select: none;
}

.popup-window .window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000080;
    padding: 5px 10px;
    color: white;
    cursor: move;
}

.popup-window .window-title {
    font-size: 16px;
    font-weight: bold;
}

.popup-window .window-buttons button {
    background-color: #c0c0c0;
    border: 1px solid #808080;
    color: black;
    padding: 2px 6px;
    cursor: pointer;
    margin-left: 5px;
    border-radius: 2px;
    transition: background-color 0.2s;
    font-size: 12px;
}

.popup-window .window-buttons button:hover {
    background-color: #808080;
    color: white;
}

.popup-window .window-content {
    flex-grow: 1;
    padding: 10px;
    background-color: #e0e0e0;
    overflow: auto;
}

/* Specific Styles for Popup Content */
#documentsPopup .window-content p,
#settingsPopup .window-content p,
#findPopup .window-content p,
#helpPopup .window-content p {
    font-size: 14px;
    color: #000;
}

#settingsPopup{height:550px;width:500px;}

#documentsPopup .window-content button,
#settingsPopup .window-content button,
#findPopup .window-content button,
#helpPopup .window-content button {
    padding: 5px 10px;
    margin-top: 5px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #808080;
    border-radius: 3px;
    background-color: #d0d0d0;
    transition: background-color 0.2s;
}

#documentsPopup .window-content button:hover,
#settingsPopup .window-content button:hover,
#findPopup .window-content button:hover,
#helpPopup .window-content button:hover {
    background-color: #a0a0a0;
    color: white;
}

/* Animation for Slide Down */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


.window {
    position: absolute;
    top: 60px;
    left: 120px;
    width: 386.989px;
    height: 426.983px;
    border: 2px solid #808080;
    background-color: #c0c0c0;
    display: none;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    animation: fadeIn 0.3s forwards;
    z-index: 500;
    overflow: hidden;
}

.media-player {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 556.42px; 
    height: 617px; 
    max-width: 556.42px; 
    max-height: 617px; 
    aspect-ratio: 556.42 / 617; 
    transform: translate(-50%, -50%);
    border: 2px solid #0b0b10;
    background-color: #0b0b10;
    display: none; 
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    animation: fadeIn 0.3s forwards;
    z-index: 500;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000080;
    padding: 5px 10px;
    color: white;
    cursor: move;
    user-select: none;
}

.media-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-image: url('icons/TASKBAR_INAC.png');
    background-size: 100%; 
    background-repeat: no-repeat; 
    background-position: center;
    padding: 0;
    color: white;
    cursor: move;
    user-select: none;
}

.media-player-header.active {
    background-image: url('icons/TASKBAR_ACT.png');
    background-size: 100%; 
    background-repeat: no-repeat; 
    background-position: center; 
}


.window-title, .media-player-title {
    font-size: 16px;
    font-weight: bold;
}

.window-buttons, .media-player-buttons {
    display: flex;
    margin-right: 2px;
}

.window-buttons button {
    background-color: #c0c0c0;
    border: 1px solid #808080;
    color: black;
    padding: 2px 6px;
    cursor: pointer;
    margin-left: 5px;
    border-radius: 2px;
    transition: background-color 0.2s;
    font-size: 12px;
}

.media-player-buttons button {
    background-color: transparent;
    border: none;
    color: #706543;
    padding: 2px 6px;
    margin-right: 2px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 5px;
    border-radius: 2px;
    transition: color 0.2s;
    font-size: 12px;
}

.window-buttons button:hover {
    background-color: #808080;
    color: white;
}

.media-player-buttons button:hover {
    color: #e9ea80;
}


.window-content, .media-player-content {
    flex-grow: 1;
    padding: 0; /* Removed padding for proper scaling */
    background-color: black;
    position: relative;
    overflow: hidden; /* Hide overflow to prevent scrollbars */
}

.media-player-logo {
    position: absolute;
    bottom: 10px; 
    right: 10px; 
    width: 20px; 
    height: auto;
    opacity: 0.7; 
}


.window .iframe-wrapper{
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: black; 
}

.aspect-keeper {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:#c0c0c0;
}

.aspect-keeper .aspect-box {
  aspect-ratio: 4 / 3;
  height: 100%;
  width: auto;
  max-height: 100%;
  max-width: 100%;
  display: block;
  background:#c0c0c0;
  position: relative;
}

.aspect-keeper .aspect-box > .iframe-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background:#c0c0c0;
  transform: none;
}

.window-content,
.iframe-wrapper { min-height: 0; }

.aspect-keeper .aspect-box {
  background:#c0c0c0;
  box-shadow: 0 0 0 1px #2a2a2a inset;
}

#paintWindow .iframe-wrapper {
  background: #c0c0c0;
}

.iframe-content {
    position: absolute;
    transform-origin: center;
    border:none;
}

#apacheToob .iframe-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    border: none; 
}

#apacheToob .iframe-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden; 
}
#aimWindow {
    width: 300px;
}

#aimWindow .window-content {
    flex: 0 0 514px;
    width: 300px;
}

#aimWindow .iframe-wrapper {
    width: 300px;
    height: 514px;
    background: #1d1f21;
}

#aimWindow .iframe-content {
    width: 100%;
    height: 100%;
    transform: none;
    top: 0;
    left: 0;
}

#aimMessageWindow {
    width: 400px;
}

#aimMessageWindow .window-content {
    flex: 0 0 410px;
    width: 400px;
}

#aimMessageWindow .iframe-wrapper {
    width: 400px;
    height: 410px;
    background: #9aa3ad;
}

#aimMessageWindow .iframe-content {
    width: 100%;
    height: 100%;
    transform: none;
    top: 0;
    left: 0;
}
.popup-window {
    background-color: #C0C0C0; /* Classic gray */
    border: 2px solid #808080; /* Darker gray border */
    box-shadow: inset -2px -2px 0px #FFFFFF, inset 2px 2px 0px #808080, 0 0 10px rgba(0,0,0,0.5); /* 3D inset and outer shadow */
    border-radius: 3px; /* Slight rounding */
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

/* Window Header */
.popup-window .window-header {
    background-color: #000080; /* Windows blue */
    color: #FFFFFF; /* White text */
    padding: 5px 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    border-bottom: 2px solid #FFFFFF; /* White bottom border */
}

/* Window Buttons */
.popup-window .window-buttons button {
    background-color: #C0C0C0; /* Gray buttons */
    border: 1px solid #808080; /* Darker border */
    width: 20px;
    height: 20px;
    margin-left: 5px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    font-size: 12px;
    text-align: center;
    line-height: 18px;
}

.popup-window .window-buttons button:hover {
    background-color: #808080; /* Darker on hover */
    box-shadow: inset -1px -1px 0px #FFFFFF, inset 1px 1px 0px #000000; /* Pressed effect */
}

.popup-window .window-buttons button:active {
    box-shadow: inset 1px 1px 0px #FFFFFF, inset -1px -1px 0px #000000; /* Inverted pressed effect */
}

/* Window Content */
.popup-window .window-content {
    padding: 10px;
    background-color: #C0C0C0; /* Match window background */
    overflow: auto;
}

/* Button Styles within Popups */
.popup-window .window-content button {
    background-color: #E0E0E0; /* Light gray buttons */
    border: 2px outset #FFFFFF; /* 3D outset border */
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.2s, border 0.2s;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
    font-size: 12px;
    border-radius: 2px;
}

.popup-window .window-content button:hover {
    background-color: #D0D0D0; /* Darker on hover */
    border: 2px inset #FFFFFF; /* Inset border on hover */
}

.popup-window .window-content button:active {
    background-color: #C0C0C0; /* Even darker on click */
    border: 2px inset #FFFFFF; /* Inset border on click */
}

/* Specific Popup Enhancements */

/* Documents Popup */
#documentsPopup .window-content p {
    font-size: 14px;
    color: #000000; /* Black text */
}

#documentsPopup .window-content button {
    margin-top: 10px;
}

/* Settings Popup */
#settingsPopup .window-content ul {
    list-style: none;
    padding: 0;
}

#settingsPopup .window-content ul li {
    margin-bottom: 5px;
}

#settingsPopup .window-content button {
    width: 100%;
    text-align: left;
}


/* Find Popup */
#findPopup .window-content input {
    border: 2px inset #FFFFFF; /* Classic inset border */
    padding: 5px;
    font-size: 14px;
    background-color: #FFFFFF; /* White background */
    color: #000000; /* Black text */
    border-radius: 2px;
}



#findPopup .window-content button {
    margin-top: 10px;
    width: 100%;
}

/* Help Popup */
#helpPopup .window-content ul {
    list-style: none;
    padding: 0;
}

#helpPopup .window-content ul li {
    margin-bottom: 5px;
}

#helpPopup .window-content button {
    width: 100%;
    text-align: left;
}
/* Resize Handle Styles */
.resize-handle {
    position: absolute;
    width: 15px;
    height: 15px;
    background: transparent;
}

.resize-handle-bottom-right {
    right: 0;
    bottom: 0;
    cursor: se-resize;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

.window.show, .media-player.show {
    display: flex;
    animation: fadeIn 0.3s forwards;
}

.window.hide, .media-player.hide {
    animation: fadeOut 0.3s forwards;
}

.media-player-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-image: url('icons/MAIN_BACK.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    }

#player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    width: 386.989px;
    height: 426.983px;
    }
#screen {
    position: relative;
    margin-top: 10px;
    width: 100%;
    height: 200px;
    background-color: black;
    overflow: hidden;
    }

#visualizer, #youtube-video {
    width: 100%;
    height: 100%;
    }

#youtube-video-container {
    position: absolute;
    width: 100%; /* Changed from 0 to 100% */
    height: 100%;
    overflow: hidden;
    
    }

#youtube-video {
    width: 100%;
    height: 100%;

    }

#controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 10px;
    }

#controls img {
    width: 24px;
    height: 24px;
    cursor: pointer;
    }

#seek-bar {
    position: relative;
    width: 100%;
    height: 10px;
    margin: 0px;
    justify-content: center;
    align-content: center;
    }

#seek-bar img#track {
    width: 100%;
    height: 100%;
    }
    
#seek-bar img#head {
    position: absolute;
    top: 0;
    margin-top: 6px;
    left: 0;
    cursor: pointer;
    }

#sliders {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

#volume-slider {
    background-position: 0px -405px; 
}
    
#volume-slider .slide-button {
    left: 49.1956px; 
}

#pan-slider {
    background-position: 0px -202.5px;
}

#pan-slider .slide-button {
    left: 24.5978px; 
}

.slider-label {
    text-align: center;
    margin-top: 5px;
    font-size: 10px;
    color: white;
    text-shadow: 1px 1px 2px black;
    user-select: none;
}

.slider {
    position: relative;
    width: 66px;
    height: 15px;
    background-image: url('icons/slider.png');
    background-repeat: no-repeat;
    background-position: 0 0;
    margin: 0 auto;
    cursor: pointer;
}

.slide-button {
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 15px;
    background-image: url('icons/MINI_SLIDE.png');
    cursor: pointer;
}

#playlist {
    margin-top: 10px;
    background-image: url('icons/playlist_back.png'); 
    background-size: cover;
    background-position: center;
}

#playlist ul {
    font-family: 'Press Start 2P', sans-serif;
    list-style: none;
    padding: 0;
    color: white;
}

#playlist li {
    font-size: 10px;
    font-family: 'Press Start 2P', sans-serif;
    padding: 5px;
    color: #09c300;
    cursor: pointer;
}

#playlist li:hover {
    background-color: #555;
    color: black;
}

#playlist li.active {
    background-color: #333;
    color: #c40800;
}

#screen .fullscreen {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    z-index: 1;
}

@media (max-width: 1200px) {
    .window {
        width: 80%;
        height: 70%;
        top: 30px; 
        left: 10%;
    }


}

@media (max-width: 768px) {
    .window, .media-player {
        width: 95%;
        height: 80%;
        left: 2.5%;
    }

    .taskbar-icon {
        width: 20px;
        height: 20px;
    }
    .start-button {
        width: 90px;
    }
}




@media (max-width: 1200px) and (min-width: 801px) {

    .taskbar-instances {
        width: 100%;
        height: auto;
        display: flex;
        align-items: center;
        gap: 5px;
        margin-left: 10px; 
        margin-bottom: 2.7px;
        flex-grow: 1;
    }

    .taskbar-button {
        height: 28px;
        padding: 5px 10px;

    }

    .taskbar-icon {
        width: 16px;
        height: 16px;
        margin-right: 5px;
        object-fit: contain;
    }


    .window, .media-player {
        width: 80%;
        height: 70%;
        top: 30px;
        left: 10%;
    }

    .tray-icon {
        width: 40px;
        height: 40px;
    }

    .start-button {
        height: auto;
        margin-left: 10px;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }


    .desktop-icon {
        width: 90px;
    }

    .desktop-icon img {
        width: 72px;
        height: 72px;
    }

    .desktop-icon span {
        font-size: 13px;
    }
}

@media (max-width: 800px) and (min-width: 571px) {

    .taskbar {
        height: 50px;
    }

    .desktop {
        background-color: #171a24;
        position: relative;
        width: 100vw;
        height: 100vh;
        background-image: url('images/background_land2.png'); 
        background-size: cover;
        background-position: center;
        transition: background 0.5s ease;
    }

    .start-button {
        width: 100px;
        height: auto;
        margin-left: 10px;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }


    .taskbar-button {
        width: 100px;
        height: 30px;
        padding: 10px;
        font-size: 12px;
    }

    .taskbar-icon {
        width: 20px;
        height: 20px;
    }

    /* System Tray */
    .system-tray {
        flex-direction: row;
        justify-content: center;
        padding: 5px 0;
    }

    .tray-icon {
        width: 50px;
        height: 50px;
        margin-right: 5px;
    }

    .desktop-icons {
        display: flex; 
        justify-content: flex-start; 
        align-items: flex-start; 
        left: 0; 
    }

    .desktop-icon {
        width: 100px;
        margin: 10px;
        position: static;
    }

    .desktop-icon img {
        width: 88px;
        height: 88px;
    }

    .desktop-icon span {
        font-size: 12px;
    }

    /* Start Menu */
    .start-menu {
        width: 90%;
        left: 5%;
        bottom: 80px;
    }

    .start-menu ul li {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Windows */
    .window, .media-player {
        width: 90%;
        height: 80%;
        top: 10%;
        left: 5%;
    }

    /* Window Header */
    .window-header {
        padding: 10px 15px;
        font-size: 18px;
    }
    .media-player-header {
        padding: 0;
        background-image: url('icons/TASKBAR_INAC_MOB.png');
        font-size: 18px;
    }

    .media-player-header.active {
        background-image: url('icons/TASKBAR_AC_MOB.png');
    }


    /* Window Control Buttons */
    .window-buttons button, .media-player-buttons button {
        padding: 5px 10px;
        font-size: 16px;
    }

    /* Window Content */
    .window-content, .media-player-content {
        padding: 0px;
    }

    /* Resize Handle */
    .resize-handle {
        width: 20px;
        height: 20px;
    }

    #controls {
        margin-top: 5px;
        margin-bottom: 5px;
    }
    /* Media Player Controls */
    #controls img {
        width: 32px;
        height: 32px;
    }

    #seek-bar img#track {
        height: 20px;
    }

    #seek-bar img#head {
        width: 20px;
        height: 20px;
        margin-top: 0;
    }

    #sliders .slider-container {
        flex-direction: column;
        align-items: center;
    }


    .slider-label {
        font-size: 12px;
    }

    /* Playlist */
    #playlist {
        height: 60px;
    }

    #playlist ul {
        font-size: 12px;
    }

    #screen .fullscreen {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    body, html {
        font-size: 14px;
    }

    /* Enhance Clickable Areas */
    .start-button, .tray-icon, .taskbar-button, .desktop-icon, .window-buttons button, .media-player-buttons button, .slider, #head, .fullscreen {
        touch-action: manipulation;
    }

    /* Hide Scrollbars on Windows */
    .window-content::-webkit-scrollbar, .media-player-content::-webkit-scrollbar {
        display: none;
    }

    .window-content, .media-player-content {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    /* Desktop Background Scaling */
    .desktop {
        background-size: contain; /* Adjusted from cover to contain for better scaling */
        background-repeat: no-repeat;
    }
}


@media (max-width: 500px) {

    .taskbar {
        height: 100px;
        padding: 10px 0;
    }

    .start-button {
        width: 200px;
        height: auto;
        margin-left: 10px;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .taskbar-instances {
        width: 100%;
        height: auto;
        display: flex;
        align-items: center;
        gap: 5px;
        margin-left: 10px; 
        margin-bottom: 2.5px; 
        flex-grow: 1;
    }

    .taskbar-button {
        height: 40px;
        padding: 10px;
        font-size: 16px;
    }

    .taskbar-icon {
        width: 5px;
        height: 5px;
    }

    /* System Tray */
    .system-tray {
        flex-direction: row;
        justify-content: center;
        padding: 5px 0;
    }

    .tray-icon {
        width: 110px;
        height: 110px;
        margin-left: 5px;
    }

    .desktop-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
    }

    .desktop-icon {
        width: 250px;
        margin: 15px;
        position: static;
    }

    .desktop-icon img {
        width: 188px;
        height: 188px;
    }

    .desktop-icon span {
        font-size: 16px;
    }

    /* Start Menu */
    .start-menu {
        width: 95%;
        left: 2.5%;
        bottom: 80px;
    }

    .start-menu ul li {
        padding: 15px 25px;
        font-size: 16px;
    }

    /* Windows */
    .window  {
        width: 95%;
        height: 85%;
        top: 5%;
        left: 2.5%;
    }

    .media-player {
        width: 95%;
        height: 85%;
        max-width: 556.42px;
        max-height: 617px;
        aspect-ratio: 556.42 / 617;
        transform: translate(-50%, -50%);
    }

    .window-header {
        padding: 15px 20px;
        font-size: 20px;
    }

    .media-player-header {
        padding: 0;
        background-image: url('icons/TASKBAR_INAC_MOB.png');
        font-size: 20px;
    }

    .media-player-header.active {
        background-image: url('icons/TASKBAR_AC_MOB.png');
    }

    .window-buttons button {
        padding: 8px 12px;
        font-size: 18px;
    }
    .media-player-buttons button {
        padding: 8px 12px;
        font-size: 18px;
    }


    .window-content, .media-player-content {
        padding: 0px;
    }


    .resize-handle {
        width: 25px;
        height: 25px;
    }

    #controls {
        margin-top: 5px;
        margin-bottom: 5px;
    }

    /* Media Player Controls */
    #controls img {
        width: 40px;
        height: 40px;
    }

    #seek-bar img#track {
        height: 25px;
    }

    #seek-bar img#head {
        width: 25px;
        height: 25px;
        margin-top: 0;
    }

    #sliders .slider-container {
        margin-top: 10px;
        flex-direction: column;
        align-items: center;
    }



    .slider-label {
        font-size: 10px;
    }

    /* Playlist */
    #playlist {
        height: 60px;
    }

    #playlist ul {
        font-size: 14px;
    }

    #screen .fullscreen {
        width: 35px;
        height: 35px;
        font-size: 22px;
    }

    body, html {
        font-size: 16px;
    }

    /* Enhance Clickable Areas */
    .start-button, .tray-icon, .taskbar-button, .desktop-icon, .window-buttons button, .media-player-buttons button, .slider, #head, .fullscreen {
        touch-action: manipulation;
    }

    /* Hide Scrollbars on Windows */
    .window-content::-webkit-scrollbar, .media-player-content::-webkit-scrollbar {
        display: none;
    }

    .window-content, .media-player-content {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }


    .desktop {
        background-size: contain; /* Ensure the background scales down proportionally */
        background-repeat: no-repeat;
    }
}

@media (max-width: 800px) and (orientation: portrait) {
    /* Existing styles */

    .desktop-icons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        align-items: start;
        gap: 20px;
        position: static;
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
        margin: 0 auto;
        max-width: 600px;
    }

    .desktop-icon {
        position: static;
    }
}


@media (max-width: 500px) and (orientation: portrait) {


    .popup-window.show { 
    	width: 100% !important;
    	height: calc(100vh - 40px) !important; 
    	top: 0 !important;
    	left: 0 !important;
    	border-radius: 0 !important;
    	box-shadow: none !important;
    	z-index: 10001 !important; 
    }


    .popup-window .window-header { 
	width: 100%;
	box-sizing: border-box;
	padding: 10px; 
	font-size: 16px; 
    }


    .popup-window .window-buttons button {
	width: 30px;
	height: 30px;
	font-size: 16px;
    }


    .popup-window .window-content { 
	padding: 15px;
	overflow: auto;
    }


    .popup-window .window-content button { 
	width: 100%;
	padding: 10px;
	font-size: 14px;
    }

    .desktop-icons {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr); 
        justify-items: center; 
        align-items: start;
        gap: 15px; 
        position: static;
        width: 100%;
        padding: 10px;
        box-sizing: border-box; 
        margin: 0 auto; 
        max-width: 400px; 
    }

    .desktop-icon {
        width: 120px; /* Reduced width */
        margin: 10px; /* Reduced margin */
        position: static; /* Ensure static positioning */
    }


    .desktop-icon img {
        width: 80px; /* Reduced image width */
        height: 80px; /* Reduced image height */
    }

    .desktop-icon span {
        font-size: 12px; /* Reduced font size */
        margin-top: 3px; /* Reduced margin-top for tighter spacing */
    }


    #seek-bar {
        width: 85%;
        margin: 0 auto;
    }

    /* Increase Taskbar Elements */
    .taskbar {
        height: 50px;
        padding: 10px 0;
    }

    .start-button {
        width: 160px;
        height: auto;
        margin-left: 10px;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .taskbar-button {
        height: 30px;
        padding: 15px;
        font-size: 0px;
    }

    .taskbar-icon {
        width: 30px;
        height: 30px;
    }

    .tray-icon {
        width: 50px;
        height: 130px;
        margin-left: 10px;
    }


    .desktop-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
    }

    .desktop-icon {
        margin: 20px;
        position: static;
    }

    .desktop-icon img {
        width: 100px;
        height: 100px;
    }

    .desktop-icon span {
        font-size: 18px;
    }


    .start-menu {
        width: 50%;
        left: 2.5%;
        bottom: 85px;
    }

    .start-menu ul li {
        padding: 15px 25px;
        font-size: 16px;
    }


    .window, .media-player {
        width: 10%;
        height: 10%;
        top: 5%;
        left: 2.5%;
    }

    .window-header {
        padding: 10px 15px;
        font-size: 22px;
    }

    .media-player-header {
        padding: 0;
        background-image: url('icons/TASKBAR_INAC_MOB_S.png');
        font-size: 22px;
    }

    .media-player-header.active {
        background-image: url('icons/TASKBAR_AC_MOB_S.png');
    }

    .window-buttons button, .media-player-buttons button {
        padding: 8px 13px;
        font-size: 20px;
    }

    .window-content, .media-player-content {
        padding: 0px;
    }


    .resize-handle {
        width: 25px;
        height: 25px;
    }



    #seek-bar img#track {
        height: 25px;
    }

    #seek-bar img#head {
        width: 25px;
        height: 25px;
        margin-top: 0;
    }

    #sliders .slider-container {
        flex-direction: column;
        align-items: center;
    }



    .slider-label {
        font-size: 10px;
    }

    /* Playlist */
    #playlist {
        height:  80px;
        width:  85%;
        margin: 0 auto;
        margin-top: 10px;
    }

    #playlist ul {
        font-size: 16px;
    }

    #screen .fullscreen {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

.media-player-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

body, html {
    font-size: 18px;
}

.desktop {
    background-size: cover; /* Switch back to cover for better coverage */
    background-position: center;
}

}

/* Desktop icon drag state styling */
.desktop-icon {
    cursor: grab;
    touch-action: none;
}

.desktop-icon.dragging {
    cursor: grabbing;
    transition: none;
}

.desktop-icon.dragging img,
.desktop-icon.dragging span {
    pointer-events: none;
}

@media (orientation: portrait) {
    .desktop {
        background-image: url('images/background_port.png');
        background-size: cover;
        background-position: center;
        transition: background 0.5s ease;
    }

    .window-buttons .maximize,
    .media-player-buttons .maximize {
        display: none;
    }

    .iframe-wrapper {
    width: 100vw;
    height: 87vh;
    position: relative;
    display: block;
    }

}


html,
body,
#workspace,
#canvas-container,
#canvas-frame,
#paintCanvas,
#iframe-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Make sure any previous scale/translate transforms don’t offset the origin */
#iframe-content,
#workspace {
  transform: none !important;
  transform-origin: 0 0 !important;
}


#starblasterWindow .iframe-content,
#apacheWindow .iframe-content {
    top: 50%;
    left: 50%;
    right: 50%;      /* or width:50% if you really meant a 50% width */
    transform: translate(-50%, -50%);
    
}







#aimWindow.aim-expanded .window-content {
    flex: 0 0 570px;
}

#aimWindow.aim-expanded .iframe-wrapper {
    height: 570px;
}

#aimWindow,
#aimMessageWindow {
    height: auto;
}


@keyframes rainbowCycle{0%{filter:hue-rotate(0deg);}100%{filter:hue-rotate(360deg);}}
body.rainbow-icons .desktop-icon img,
body.rainbow-icons .desktop-icon span{
  animation:rainbowCycle 6s linear infinite;
}
.desktop.tile-background{
  background-repeat:repeat !important;
  background-size:auto !important;
}
body.theme-classic .desktop{filter:none;}
body.theme-midnight .desktop{filter:hue-rotate(200deg) brightness(0.7);}
body.theme-bubblegum .desktop{filter:hue-rotate(320deg) saturate(1.8);}
body.theme-matrix .desktop{filter:hue-rotate(90deg) saturate(1.4) contrast(1.2);}
body.theme-sunset .desktop{filter:hue-rotate(260deg) saturate(1.3) brightness(1.1);}
body.theme-terminal .desktop{filter:hue-rotate(120deg) saturate(0.6) contrast(1.7);}
body.theme-ocean .desktop{filter:hue-rotate(170deg) saturate(1.5) brightness(0.85);}
body.font-small .desktop-icon span{font-size:10px;}
body.font-normal .desktop-icon span{font-size:12px;}
body.font-large .desktop-icon span{font-size:14px;}

@media (max-width: 640px){
  .settings-body{
    flex-direction:column;
    overflow:auto;
  }
  .settings-preview{
    width:100%;
    max-width:none;
    align-self:center;
  }
  .settings-panels{
    min-height:160px;
  }
}
.screensaver-overlay{
  position:fixed;
  inset:0;
  background:radial-gradient(circle at center, rgba(0,0,0,0.1), rgba(0,0,0,0.9));
  display:none;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  z-index:2000;
  cursor:pointer;
}
.screensaver-overlay.active{display:flex;}
.screensaver-canvas{
  position:relative;
  width:100vw;
  max-width:100%;
  height:100vh;
  background:transparent;
  box-shadow:0 0 30px rgba(0,255,170,0.4);
  overflow:hidden;
}
.screensaver-dismiss{
  color:#9cf8ff;
  font-size:14px;
  margin-bottom:12px;
  text-shadow:0 0 6px #00ffee;
}
.saver-curve,
.saver-pipe,
.saver-toast,
.saver-mystery{
  position:absolute;
  will-change:transform;
}
.saver-curve{
  width:160px;
  height:160px;
  border:3px solid currentColor;
  border-radius:50%;
  animation:curveSpin var(--speed,8s) linear infinite;
  opacity:0.8;
}
@keyframes curveSpin{
  0%{transform:translate(-50%, -50%) rotate(0deg) scale(0.8);}
  50%{transform:translate(-50%, -50%) rotate(180deg) scale(1.1);}
  100%{transform:translate(-50%, -50%) rotate(360deg) scale(0.8);}
}
.saver-pipe{
  width:200px;
  height:32px;
  background:linear-gradient(90deg,#00c3ff,#00ff9d);
  filter:drop-shadow(0 0 10px rgba(0,255,170,0.7));
  animation:pipeSlide var(--speed,10s) linear infinite;
}
@keyframes pipeSlide{
  0%{transform:translateX(-110%) rotate(0deg);}
  50%{transform:translateX(120%) rotate(180deg);}
  100%{transform:translateX(-110%) rotate(360deg);}
}
.saver-toast{
  width:140px;
  height:90px;
  border-radius:20px 20px 30px 30px;
  background:linear-gradient(#ffd59e,#f2a661);
  border:4px solid #8c4b26;
  box-shadow:0 0 16px rgba(255,180,80,0.6);
  animation:toastFly var(--speed,12s) linear infinite;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
}
@keyframes toastFly{
  0%{transform:translate(-20vw, 30vh) rotate(-20deg);}
  50%{transform:translate(25vw, -30vh) rotate(20deg);}
  100%{transform:translate(-20vw, 30vh) rotate(-20deg);}
}
.saver-mystery{
  width:var(--size,120px);
  height:var(--size,120px);
  background:conic-gradient(from 45deg,#ff00ff,#00ffff,#ffff00,#ff00ff);
  border-radius:50%;
  mix-blend-mode:screen;
  animation:mysteryPulse var(--speed,9s) ease-in-out infinite;
}
@keyframes mysteryPulse{
  0%{transform:translate(-50%, -50%) scale(0.4) rotate(0deg); opacity:0.5;}
  50%{transform:translate(-50%, -50%) scale(1.1) rotate(180deg); opacity:0.9;}
  100%{transform:translate(-50%, -50%) scale(0.4) rotate(360deg); opacity:0.5;}
}
@media (max-width: 900px) {
  .desktop { position: relative; }
  .desktop-icons {
    position: relative;
    /* optional: stop grid/flex rearranging while dragging */
    display: block;  /* or keep your layout, but see note below */
  }
  .desktop-icon {
    position: absolute !important;  /* required for left/top dragging */
    width: 80px;                     /* tune for your design */
    margin: 0 !important;            /* margins fight absolute positioning */
  }
  .desktop-icon img { width: 64px; height: 64px; }
  .desktop-icon span { font-size: 12px; }
}
	@media (max-width: 658px) {
		/* allow scroll and give a little breathing room */
		.window-header {
			width:100%;
			height:50px;
		}
		#aimWindow, #aimMessageWindow {
			align-items:center;
		}
		.start-menu {
			left:0%;
			bottom:50px;
		}

	}

/* Apache external touch controls */
.apache-window-content {
  position: relative;
}

.apache-touch-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px;
  gap: 16px;
  pointer-events: none;
  z-index: 5;
}

.apache-touch-left,
.apache-touch-right {
  pointer-events: auto;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.apache-touch-right {
  flex-direction: column;
  align-items: flex-end;
}

.apache-touch-button {
  background: rgba(12, 16, 32, 0.78);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #f4f7ff;
  font-size: 16px;
  letter-spacing: 0.08em;
  padding: 12px 20px;
  border-radius: 12px;
  text-transform: uppercase;
  min-width: 92px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.28);
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
  touch-action: manipulation;
  margin-bottom: 20px;
  margin-right: 20px;  
  width:100%;
}

.apache-touch-button:active {
  transform: scale(0.95);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.apache-joystick {
  position: relative;
  width: clamp(82px, 19vw, 120px);
  height: clamp(82px, 19vw, 120px);
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.74);
  border: 2px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  margin-bottom: 20px;
  margin-right: 20px;    
}

.apache-joystick-base {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2), rgba(20, 26, 46, 0.78));
}

.apache-joystick-handle {
  position: relative;
  width: clamp(34px, 9vw, 56px);
  height: clamp(34px, 9vw, 56px);
  border-radius: 50%;
  background: linear-gradient(140deg, #8efbff, #5ea7ff);
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.05s ease;
  pointer-events: none;
}

@media (max-width: 720px) {
  .apache-touch-overlay {
    padding: 8px;
    gap: 12px;
  }

  .apache-touch-button {
    font-size: 14px;
    padding: 10px 16px;
    min-width: 80px;
  }
}

@media (pointer: fine) and (hover: hover) {
  .apache-touch-overlay {
    opacity: 0.85;
  }
}

button#apacheJumpButton { height:100px;}
