/* Font Definitions */
@font-face {
    font-family: 'Arial Black';
    src: url('../fonts/arial-black.ttf');
}

@font-face {
    font-family: 'Calibri';
    src: url('../fonts/calibri.ttf');
}

@font-face {
    font-family: 'Segoe UI';
    src: url('../fonts/segoe-ui.ttf');
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tahoma', sans-serif;
    user-select: none;
}

body {
    overflow: hidden;
    height: 100vh;
    background-color: #fff;
}

/* Desktop Styles */
#desktop {
    height: calc(100vh - 30px);
    background-image: url('../img/bg.webp');
    background-size: cover;
    position: relative;
    overflow: hidden;
}

/* Taskbar Styles */
#taskbar {
    height: 30px;
    background: linear-gradient(to bottom, #2A6ED3 0%, #1D57AA 100%);
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3);
}

#start-button {
    display: flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
    background: linear-gradient(to bottom, #3B7FE9 0%, #214976 100%);
    border-radius: 3px;
    box-shadow: inset 1px 1px rgba(255, 255, 255, 0.3), inset -1px -1px rgba(0, 0, 0, 0.2);
}

#start-button img {
    height: 100%;
    margin-right: 3px;
}

#start-button span {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

#system-tray {
    height: 100%;
    margin-left: auto;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, #2068CC 0%, #1D57AA 100%);
    padding: 0 10px;
}

#clock {
    color: white;
    font-size: 12px;
    margin-left: 5px;
}

/* Task buttons */
.taskbar-buttons {
    display: flex;
    margin-left: 10px;
    height: 100%;
    align-items: center;
    flex-grow: 1;
}

.task-button {
    height: 100%;
    padding: 0 5px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid #74726a;
    border-radius: 2px;
    display: flex;
    align-items: center;
    font-size: 11px;
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    color: #fff;
    margin-right: 2px;
}

.task-button.active {
    background: rgba(255, 255, 255, 0.22);
}

/* Desktop Icons */
.desktop-icon {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px;
    cursor: pointer;
    position: absolute;
}

.desktop-icon img {
    width: 40px;
    height: 40px;
}

.desktop-icon span {
    margin-top: 5px;
    text-align: center;
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
    max-width: 80px;
}

/* Windows */
.window {
    position: absolute;
    background-color: #ECE9D8;
    border: 1px solid #0054E3;
    box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    min-height: 300px;
    display: none;
    resize: both;
    overflow: auto;
    z-index: 100;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.title-bar {
    height: 30px;
    background: linear-gradient(to right, #0058E6 0%, #3A93FF 100%);
    display: flex;
    align-items: center;
    padding: 0 8px;
    cursor: move;
}

.title-bar-text {
    color: white;
    font-weight: bold;
    font-size: 13px;
    flex-grow: 1;
}

.title-bar-controls {
    display: flex;
}

.title-bar-controls button {
    width: 22px;
    height: 22px;
    margin-left: 2px;
    border: 1px solid white;
    color: white;
    font-weight: bold;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: rgb(70, 70, 255) 0px -1px 2px 1px inset;
    background-image: radial-gradient(
        circle at 90% 90%,
        rgb(0, 84, 233) 0%,
        rgb(34, 99, 213) 55%,
        rgb(68, 121, 228) 70%,
        rgb(163, 187, 236) 90%,
        white 100%
    );
    touch-action: manipulation;
}

.window-icon {
    display: inline-block;
    width: 20px;
    margin-right: 6px;
}

.minimize {
    color: #fff !important;
}

.maximize {
    color: #fff !important;
}

.close {
    background: linear-gradient(to bottom, #F85050 0%, #BD0000 100%) !important;
}

.window-content {
    padding: 10px;
    height: calc(100% - 30px);
    overflow: auto;
    font-family: 'Lucida Console', monospace;
    font-size: 14px;
    background-color: white;
    line-height: 1.4;
}

/* Context Menu */
#context-menu {
    position: absolute;
    width: 200px;
    background-color: #F1F1F1;
    border: 1px solid #919191;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
}

.context-item {
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

.context-item:hover {
    background-color: #316AC5;
    color: white;
}

/* Start Menu */
#start-menu {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 350px;
    padding-bottom: 50px;
    background-color: #F1F1F1;
    border: 1px solid #919191;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1001;
}

.start-header {
    height: 60px;
    background-color: #4279D6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 30px;
    font-size: 14px;
    font-weight: bold;
}
.start-content {
    padding-top: 10px;
    padding-left: 30px;
    padding-right: 10px;
    line-height: 30px;
}
.mobile-warning {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100001;
    right: 0;
    height: 100%;
    background: rgb(36 34 36);
    color: #fff;
}
/* Start Menu Footer */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
  }
  
  .footer-links a {
    position: relative;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
  }
  
  .footer-links a img {
    margin-bottom: 8px;
  }
  
  .footer-links a span {
    position: absolute;
    bottom: 0;
    font-size: 14px;
    font-weight: bold;
  }
/* Error Message Window */
    @keyframes shake {
        0% { transform: translate(0, 0); }
        25% { transform: translate(-5px, 0); }
        50% { transform: translate(5px, 0); }
        75% { transform: translate(-5px, 0); }
        100% { transform: translate(0, 0); }
    }
  
    .shake {
        animation: shake 0.3s;
    }
  
#error-window {
    height: auto !important;
    width: auto !important;
    min-width: auto !important;
    min-height: auto !important;
}
.error-window-content {
    background-color: #ece9d8;
    width: 500px;
    box-shadow: 4px 4px 0 #000;
  }

  .error-window-header {
    background-color: #000080;
    color: white;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 14px;
  }

  .error-window-body {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 10px;
  }

  .error-window-icon {
    width: 32px;
    height: 32px;
  }

  .error-window-text {
    font-size: 13px;
    color: #000;
  }

  .error-window-footer {
    text-align: center;
    padding: 8px;
    background-color: #ece9d8;
  }

  .error-window-footer button {
    padding: 2px 35px;
    margin-bottom: 10px;
    font-size: 13px;
    border: 1px solid #808080;
    background-color: #d4d0c8;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,0.75);
    cursor: pointer;
  }

  .error-window-footer button:hover {
    background-color: #c0c0c0;
  }

/* Custom Scrollbar for Notepad */
.window-content::-webkit-scrollbar {
    width: 16px;
}

.window-content::-webkit-scrollbar-track {
    background-color: #F1F1F1;
}

.window-content::-webkit-scrollbar-thumb {
    background-color: #C1C1C1;
    border: 1px solid #7A7A7A;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    color: white;
    font-family: 'Tahoma';
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 9998;
}

.loading-screen-window {
    text-align: center;
}

.logo {
    margin-bottom: 20px;
}

.logo .top {
    font-size: 16px;
    font-weight: 300;
    line-height: 16px;
}

.logo .top:after {
    content: "\00a9";
    font-size: 10px;
    position: relative;
    top: -5px;
    margin-left: 2px;
}

.logo .mid {
    font-size: 46px;
    font-weight: 700;
    line-height: 36px;
}

.logo .mid span {
    font-size: 22px;
    vertical-align: top;
    color: #FF6821;
    margin-top: -8px;
}

.logo .bottom {
    font-size: 30px;
    font-weight: 300;
    line-height: 30px;
    margin-left: 5px;
}

.loading-container {
    width: 150px;
    height: 20px;
    border: 2px solid #b2b2b2;
    border-radius: 7px;
    margin: 0 auto;
    padding: 2px 1px;
    overflow: hidden;
    font-size: 0;
}

.loading-box {
    width: 9px;
    height: 100%;
    background: linear-gradient(to bottom, #2838c7 0%, #5979ef 17%, #869ef3 32%, #869ef3 45%, #5979ef 59%, #2838c7 100%);
    display: inline-block;
    margin-right: 2px;
    animation: loader 2s infinite linear;
}

@keyframes loader {
    0% {
        transform: translate(-30px);
    }
    100% {
        transform: translate(150px);
    }
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/welcome-long.png');
    background-size: cover;
    color: white;
    font-family: 'Tahoma';
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    z-index: 9999;
}

.welcome-text {
    font-size: 60px;
    font-family: 'Arial Black';
    font-style: italic;
    position: absolute;
    left: 55%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 2px 5px #3151B5;
}


/* Responsive */
@media (max-width: 768px) {
    .window {
        min-width: auto;
        min-height: auto;
    }
    #error-window {
        margin-right: 10px;
    }
    .error-window-content {
        width: unset;
    }
}