@font-face {
    font-family: 'Win95';
    src: url('fontwindows.ttf');
}

.icon,
.title-bar {
    touch-action: none;
    -webkit-touch-callout: none;
}

.window {
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    overflow: auto;
    /* Enable scrolling */
}

/* Stile specifico per mantenere la finestra del lettore MP3 rettangolare */
#mp3-player-window {
    width: 400px !important;
    height: 250px !important;
    min-width: 400px !important;
    min-height: 250px !important;
    max-height: 250px !important;
    resize: horizontal !important;
    overflow: hidden !important;
}

iframe {
    overflow: hidden;
}

.resizable {
    width: 150px;
    height: 150px;
    padding: 0.5em;
}

.resizable h3 {
    text-align: center;
    margin: 0;
}

.ui-resizable-helper {
    border: 1px dashed #fff;
    margin: -75px;
    /*Make it visible only on the down bottom and right*/
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-top-width: 0;
    border-left-width: 0;
}

.content1,
.content2,
.content3,
.content4,
.content5 {
    overflow: hidden;
    padding: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 50px);
}

.content2 {
    overflow-y: auto !important;
}

@media (max-width: 768px) {
    .icon {
        width: 60px;
    }

    .icon img {
        width: 60px;
        height: 60px;
    }

    .content1,
    .content2,
    .content3,
    .content4,
    .content5 {
        overflow: hidden;
        padding: 10px;
        width: calc(100% - 20px);
        height: calc(100% - 50px);
    }

    .window {
        max-width: calc(100% - 70px);
        max-height: calc(100% - 100px);
    }

    .start-btn {
        width: 60px;
        height: 40px;
    }

    .clock {
        font-size: 12px;
    }

    .title-bar {
        padding: 8px;
    }

    .fullscreen-btn ,.close-btn {
        background-color: #c0c0c0;
        border: 1px solid #000;
        cursor: pointer;
        padding: 8px 8px;
    }

    .desktop {
        width: 100%;
        height: calc(100vh - 20px);
        background-color: #008080;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        background-repeat: none;
    }

    .fullscreen-btn ,.close-btn {     
        background-color: #c0c0c0;     
        border: 1px solid #000;     
        cursor: pointer;     
        padding: 10px 16px;     
        font-size: 16px;     
        min-width: 40px;     
        min-height: 40px; 
    }
}

body {
    margin: 0;
    padding: 0;
    background-color: #008080;
    font-family: 'MS Sans Serif', sans-serif;
    color: #000;
    overflow: hidden;
    user-select: none;
}

.icon {
    position: absolute;
    text-align: center; /* Align text to the left for better readability */
    width: 100px; /* Increase width for better text visibility */
    cursor: pointer;
    z-index: 0;
    white-space: nowrap; /* Prevent text wrapping */
    text-overflow: ellipsis; /* Add ellipsis for overflowed text */
    overflow: hidden; /* Hide overflowed text */
    padding: 5px; /* Add padding for better spacing */
    transition: background-color 0.3s, transform 0.3s; /* Smooth transition for hover effect */
    display: flex; /* Use flexbox for centering content */
    flex-direction: column; /* Stack icon and text vertically */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    font-size: 14px; /* Font size for icon text */
    color: #000; /* Text color for icon text */
}

.icon img {
    width: 100px;
    height: 100px;
    transition: transform 0.1s;
}

.icon:hover img {
    transform: scale(1.1);
}

.window {
    position: absolute !important;
    top: 50px;
    left: 50px;
    width: 363px;
    height: 335px;
    background-color: #c0c0c0;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    display: none;
    z-index: 20;
    overflow: auto; 
}

.error-window {
    width: 300px;
    height: 150px;
    background-color: #c0c0c0;
    border: 2px solid #ff0000;
    box-shadow: 3px 3px 0 #000;
    display: none;
    z-index: 30;
    overflow: hidden;
}

.title-bar {
    background-color: #000080;
    color: #fff;
    padding: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
}

.file-item:hover {
    background-color: #000080;
    color: #fff;
}

.file-item img {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.taskbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 40px;
    background-color: #c0c0c0;
    border-top: 2px solid #fff;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.start-btn {
    background-image: url(filesystem/img/w95.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 80px;
    height: 32px;
    cursor: pointer;
    display: inline-block;
    z-index: 1000; /* ensure it's above the taskbar background if needed */
}

.start-menu {
    position: absolute;
    bottom: 40px;
    left: 0;
    background-color: #c0c0c0;
    border: 2px solid #000;
    display: none;
    padding: 10px;
    z-index: 100;
}

.start-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.start-menu li {
    padding: 4px;
    cursor: pointer;
}

.start-menu li:hover {
    background-color: #000080;
    color: #fff;
}

.audio-player {
    width: 100%;
    margin-top: 10px;
}

.ccbb {
    width: 100px !important;
    min-width: fit-content;
}

* {
    font-family: 'Win95', sans-serif;
}

.starlix-window {
    left: calc(100% - 400px);
    right: 0px;
}

.ui-draggable-handle {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.clock {
    margin-left: auto;
    margin-right: 10px;
    padding: 4px 8px;
    background-color: #c0c0c0;
    border: 2px inset #fff;
    font-size: 14px;
    color: #000;
    text-align: center;
    width: auto;
    white-space: nowrap;
}

.content-error {
    padding: 10px;
    text-align: center;
}

.content-error p {
    margin-bottom: 20px;
}

.content-error button {
    background-color: #c0c0c0;
    border: 2px outset #fff;
    padding: 4px 8px;
    cursor: pointer;
}

.bsod-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0000aa;
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    text-align: center;
    font-family: 'MS Sans Serif', sans-serif;
}

.bsod-content {
    max-width: 600px;
    padding: 20px;
}

.bsod-content h1 {
    font-size: 100px;
    margin: 0;
}

.bsod-content h2 {
    font-size: 24px;
    margin: 20px 0;
}

.bsod-content p {
    font-size: 18px;
    margin: 20px 0;
}

.bsod-content button {
    background-color: #ffffff;
    color: #0000aa;
    border: 2px solid #ffffff;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
}

.shutdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #ff0000;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    text-align: center;
    font-family: 'MS Sans Serif', sans-serif;
    animation: flicker 1.5s infinite;
}

@keyframes flicker {
    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0;
    }
}

.shutdown-content {
    max-width: 600px;
    padding: 20px;
}

.shutdown-content h1 {
    font-size: 36px;
    margin: 0;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shutdown-content p {
    font-size: 18px;
    margin: 20px 0;
}

.shutdown-content button {
    background-color: #ff0000;
    color: #ffffff;
    border: 2px solid #ff0000;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    margin-right: 10px;
}

/* fix shit toglila se da problemi */
* {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
}

/* Updated floating heart style to allow for bigger images */
.floating-heart {
    position: absolute;
    pointer-events: none;
    z-index: 9998;
    transition: transform 3s ease-out, opacity 0.5s ease-in-out;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    /* Removed width and height constraints to allow dynamic sizing */
}

.desktop {
    position: relative;
    width: 100%;
    height: calc(100vh - 40px);
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Area di selezione per le icone */
.selection-area {
    position: absolute;
    background-color: rgba(0, 123, 255, 0.3);
    border: 1px solid rgba(0, 123, 255, 0.5);
    pointer-events: none;
    display: none;
    z-index: 9999;
}

.fullscreen {
    position: fixed !important;
    z-index: 9999 !important;
}

#startup-iframe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    border: none;
}

.floating-heart {
    position: absolute;
    pointer-events: none;
    /* Prevents hearts from interfering with clicks */
    color: #ff4081;
    text-shadow: 0 0 5px rgba(255, 64, 129, 0.7);
    z-index: 9998;
    transition: transform 3s ease-out, opacity 0.5s ease-in-out;
}

/* Clippy Styles */
.clippy-container {
    position: absolute;
    width: 120px;
    height: 120px;
    cursor: grab;
    z-index: 1000;
    transition: transform 0.2s ease;
}

.clippy-container:active {
    cursor: grabbing;
}

.clippy-container:hover {
    transform: scale(1.05);
}

.clippy-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clippy-gif {
    width: 100px;
    height: 100px;
    object-fit: contain;
    pointer-events: none;
}

.speech-bubble {
    position: absolute;
    background: #ffffe1;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 10px 15px;
    max-width: 300px;
    min-width: 200px;
    font-size: 12px;
    line-height: 1.4;
    color: #000;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.speech-bubble.left::before {
    left: -12px;
    top: 20px;
    border-width: 6px 12px 6px 0;
    border-color: transparent #000 transparent transparent;
}

.speech-bubble.left::after {
    content: '';
    position: absolute;
    left: -9px;
    top: 22px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 9px 4px 0;
    border-color: transparent #ffffe1 transparent transparent;
}

.speech-bubble.right::before {
    right: -12px;
    top: 20px;
    border-width: 6px 0 6px 12px;
    border-color: transparent transparent transparent #000;
}

.speech-bubble.right::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 22px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 9px;
    border-color: transparent transparent transparent #ffffe1;
}

.dialog-window {
    position: absolute;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    box-shadow: 1px 1px 0 #000;
    z-index: 1001;
    display: none;
    min-width: 250px;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    padding: 1px;
}

.dialog-header {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    padding: 3px 5px 3px 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 11px;
    cursor: move;
    margin: 2px;
    letter-spacing: 0.5px;
}

.dialog-close {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    width: 16px;
    height: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: black;
    margin-left: 2px;
    font-family: Tahoma, sans-serif;
    padding-bottom: 2px;
}

.dialog-close:hover {
    background: #d0d0d0;
}

.dialog-close:active,
.dialog-close.touch-active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 1px 0 0 1px;
}

/* Stili per il feedback touch sui pulsanti */
.dialog-button.touch-active,
.small-button.touch-active {
    background-color: #0078d7;
    color: white;
    transform: scale(0.95);
}

.dialog-content {
    padding: 10px;
    max-height: calc(80vh - 30px);
    overflow-y: auto;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    margin: 2px;
}

.dialog-message {
    margin-bottom: 12px;
    line-height: 1.4;
    color: #000;
    font-size: 11px;
}

.dialog-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dialog-button {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    text-align: left;
    width: 100%;
    position: relative;
}

.dialog-button:hover {
    background: #d0d0d0;
}

.dialog-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 5px 9px 3px 11px;
}

.input-field {
    width: 100%;
    padding: 3px 5px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    margin: 8px 0;
    background: white;
}

.button-row {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 12px;
}

.small-button {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 3px 12px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    min-width: 75px;
    position: relative;
    text-align: center;
}

.small-button:hover {
    background: #d0d0d0;
}

.small-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 4px 11px 2px 13px;
}

.response-text {
    background: white;
    border: 1px inset #c0c0c0;
    padding: 10px;
    margin: 10px 0;
    font-size: 11px;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

.loading-text {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

/* Animazioni Clippy */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.clippy-container.floating {
    animation: float 4s ease-in-out infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.speech-bubble.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.dialog-window.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Calendar Window Styles */
.calendar-window {
    position: absolute;
    width: 380px;
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    z-index: 1000;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
}

.calendar-title-bar {
    background-color: #000080;
    color: white;
    padding: 3px 5px 3px 5px;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-close-btn {
    cursor: pointer;
    font-size: 16px;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    color: white;
    margin-right: 2px;
}

.calendar-tabs {
    display: flex;
    padding: 0 0 0 5px;
    border-bottom: 1px solid #808080;
    background-color: #c0c0c0;
}

.calendar-tab {
    padding: 4px 12px;
    margin: 4px 2px 0 0;
    background-color: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #808080 transparent #ffffff;
    cursor: pointer;
}

.calendar-tab.active {
    background-color: #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
    position: relative;
    z-index: 2;
}

.calendar-content {
    display: flex;
    padding: 10px;
    background-color: #c0c0c0;
}

.calendar-left {
    flex: 1;
    margin-right: 10px;
}

.calendar-right {
    flex: 1;
}

.calendar-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar-select-container {
    display: flex;
    margin-bottom: 10px;
    gap: 5px;
}

#calendar-month-select {
    flex: 1.5;
    background-color: #ffffff;
    border: 1px inset #808080;
    height: 22px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
}

#calendar-year-input {
    flex: 1;
    background-color: #ffffff;
    border: 1px inset #808080;
    height: 20px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
    text-align: right;
    padding-right: 5px;
}

#calendar-days table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 1px inset #808080;
}

#calendar-days th {
    background-color: #c0c0c0;
    text-align: center;
    font-size: 11px;
    font-weight: normal;
    padding: 2px;
}

#calendar-days td {
    text-align: center;
    width: 14.28%;
    height: 20px;
    cursor: default;
    padding: 2px;
}

#calendar-days td.current-day {
    background-color: #000080;
    color: white;
}

#calendar-days td:hover:not(.current-day):not(:empty) {
    background-color: #c0c0c0;
}

.clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    border: 1px inset #808080;
    padding: 10px;
    height: 180px;
}

.analog-clock {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    background-color: #f8f8f8;
    border: 4px solid #c0c0c0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.clock-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(from 0deg, transparent 0 6deg, #ddd 6deg 7deg, transparent 7deg 30deg, #ddd 30deg 31deg, transparent 31deg 60deg, #ddd 60deg 61deg, transparent 61deg 90deg, #ddd 90deg 91deg, transparent 91deg 120deg, #ddd 120deg 121deg, transparent 121deg 150deg, #ddd 150deg 151deg, transparent 151deg 180deg, #ddd 180deg 181deg, transparent 181deg 210deg, #ddd 210deg 211deg, transparent 211deg 240deg, #ddd 240deg 241deg, transparent 241deg 270deg, #ddd 270deg 271deg, transparent 271deg 300deg, #ddd 300deg 301deg, transparent 301deg 330deg, #ddd 330deg 331deg, transparent 331deg 360deg);
}

.clock-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.clock-face::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background: transparent;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    background: #555;
    border: 1px solid #000;
    border-radius: 50%;
    z-index: 4;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.clock-hour-hand,
.clock-minute-hand,
.clock-second-hand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 50% 0%;
    border-radius: 10px;
}

.clock-hour-hand {
    width: 6px;
    height: 38px;
    margin: 0 0 0 -3px;
    background: #222;
    z-index: 3;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.clock-minute-hand {
    width: 4px;
    height: 55px;
    margin: 0 0 0 -2px;
    background: #444;
    z-index: 2;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
}

.clock-second-hand {
    width: 2px;
    height: 65px;
    margin: 0 0 0 -1px;
    background: #d31c1c;
    z-index: 1;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hour-mark {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-align: center;
    width: 20px;
    height: 20px;
    line-height: 20px;
    z-index: 1;
}

.h12 {
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.h3 {
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.h6 {
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.h9 {
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.digital-time {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

#clock-time-input {
    width: 80px;
    text-align: center;
    border: 2px inset #bbb;
    background-color: #fff;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    padding: 3px 2px;
    padding: 2px 5px;
}

.calendar-footer {
    padding: 10px;
    background-color: #c0c0c0;
}

.calendar-timezone {
    font-size: 11px;
    margin-bottom: 10px;
}

.calendar-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.calendar-button {
    padding: 3px 20px;
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
}

.calendar-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* ADD this CSS to your <style> block in the <head> */

.window.fullscreen {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    /* Adjust height to account for the taskbar (assuming it's 40px tall) */
    height: calc(100% - 40px) !important; 
    transition: all 0.2s ease-out;
}

/* Hide the resize handles when in fullscreen */
.window.fullscreen .ui-resizable-handle {
    display: none !important;
} 

.window [class^="content"] {
    flex: 1; /* Fa in modo che questo elemento riempia lo spazio rimanente */
    min-height: 0; /* Necessario per il corretto funzionamento di flex in alcuni browser */
    background: white; /* Esempio di sfondo, puoi cambiarlo*/
    border: 2px inset;
    border-color: #808080 #ffffff #ffffff #808080;
    margin: 0 4px 4px 4px; /* Aggiunge un po' di spazio interno */
    padding: 5px;
    overflow: auto; /* Aggiunge lo scorrimento SOLO al contenuto quando necessario */
}

/* in winstyles.css */
/* Lascia queste regole */
.ui-resizable-handle {
    z-index: 100; /* Dagli uno z-index alto per sicurezza */
    background: transparent; /* Utile per il debug, puoi rimuoverlo */
}
/* ----------  jQuery‑UI RESIZE HANDLES  ---------- */
.window.ui-resizable {
    position: absolute;          /* makes sure handles sit correctly */
    box-sizing: border-box;      /* keeps maths simple when resizing */
}

/* 7 × 7 px handles for pointer devices ----------------------------------- */
.ui-resizable-handle{
    position:absolute;
    width:7px;
    height:7px;
    background:transparent;      /* invisible but still clickable   */
    font-size:0;                 /* hide legacy text nodes          */
    z-index:1100;                /* above window content            */
}

/* edges */
.ui-resizable-n{cursor:n-resize;top:-4px;left:0;width:100%;}
.ui-resizable-s{cursor:s-resize;bottom:-4px;left:0;width:100%;}
.ui-resizable-e{cursor:e-resize;right:-4px;top:0;height:100%;}
.ui-resizable-w{cursor:w-resize;left:-4px;top:0;height:100%;}

/* corners */
.ui-resizable-ne{cursor:ne-resize;right:-4px;top:-4px;}
.ui-resizable-nw{cursor:nw-resize;left:-4px;top:-4px;}
.ui-resizable-se{cursor:se-resize;right:-4px;bottom:-4px;}
.ui-resizable-sw{cursor:sw-resize;left:-4px;bottom:-4px;}

/* ----------  BIGGER HIT‑AREAS ON TOUCH DEVICES  ---------- */
@media (pointer: coarse){
    .ui-resizable-handle{
        width:14px;
        height:14px;
    }
    /* keep full‑edge coverage when we enlarge handles */
    .ui-resizable-e,
    .ui-resizable-w { height:100%; }
    .ui-resizable-n,
    .ui-resizable-s { width:100%; }
}

/* ----------  HIDE HANDLES IN FULLSCREEN MODE  ---------- */
.window.fullscreen .ui-resizable-handle{display:none!important;}

/* Additional styles from index.php */

/* Global mobile scrolling support */
html, body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    html, body {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    /* Gentle mobile window optimizations - no forced sizes */
    .window {
        /* Just set reasonable maximums, no forced dimensions */
        max-width: 95vw;
        max-height: 80vh;
    }
    
    /* Only set initial size for specific windows, allow resizing */
    #text-fileintro-window:not([style*="width"]) {
        width: 350px;
        height: 280px;
    }
    
    #weather-window:not([style*="width"]) {
        width: 300px;
        height: 250px;
    }
    
    /* Compact UI elements */
    .content1, .content2, .content3, .content4, .content5 {
        padding: 8px;
        font-size: 13px;
    }
    
    /* Smaller title bars but not too small */
    .title-bar {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    /* Reasonably sized buttons */
    .fullscreen-btn, .close-btn {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 24px;
    }
}

.window {
    overflow: auto;
    /* Enable scrolling */
}

/* Desktop style with PHP variable placeholder */
.desktop {
    /* Note: Background style needs to be set via PHP variable */
    position: relative;
    width: 100%;
    height: calc(100vh - 40px);
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    /* Enable touch scrolling on mobile */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* On mobile, make desktop larger to accommodate all icons */
@media (max-width: 768px) {
    .desktop {
        /* Make desktop large enough to contain all icons - at least 6x5 grid */
        min-width: 700px !important; /* At least 7 columns of icons */
        min-height: 600px ; /* At least 6 rows of icons */
        width: 700px !important;
        /* Enable smooth touch scrolling */
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        /* Ensure the desktop can be scrolled */
        position: relative !important;
    }
    
    /* Make the body container scrollable */
    body {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Custom scrollbars for better mobile UX */
    .desktop::-webkit-scrollbar {
        width: 8px !important;
        height: 8px !important;
    }
    
    .desktop::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.1) !important;
        border-radius: 4px !important;
    }
    
    .desktop::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.5) !important;
        border-radius: 4px !important;
    }
    
    .desktop::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.7) !important;
    }
}

/* Additional fullscreen styles */
.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    /* Use modern viewport units for better mobile support */
    width: 100dvw !important;
    height: 100dvh !important;
    z-index: 9999 !important;
    /* Override any resize constraints */
    min-width: unset !important;
    min-height: unset !important;
    max-width: none !important;
    max-height: none !important;
}

/* Hide taskbar when any window is fullscreen */
.fullscreen ~ .taskbar,
body:has(.fullscreen) .taskbar {
    display: none !important;
}

/* Ensure fullscreen windows work properly on mobile */
@media (max-width: 768px) {
    .fullscreen {
        width: 100vw !important;
        height: 100vh !important;
        /* Fallback for older browsers */
        width: 100dvw !important;
        height: 100dvh !important;
    }
}

#startup-iframe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    border: none;
}

/* Updated floating heart style */
.floating-heart {
    position: absolute;
    pointer-events: none; /* Prevents hearts from interfering with clicks */
    color: #ff4081;
    text-shadow: 0 0 5px rgba(255, 64, 129, 0.7);
    z-index: 9998;
    transition: transform 3s ease-out, opacity 0.5s ease-in-out;
}

/* Enhanced Clippy Styles */
.clippy-container {
    position: absolute;
    width: 120px;
    height: 120px;
    cursor: grab;
    z-index: 1000;
    transition: transform 0.2s ease;
}

.clippy-container:active {
    cursor: grabbing;
}

.clippy-container:hover {
    transform: scale(1.05);
}

.clippy-circle {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clippy-gif {
    width: 100px;
    height: 100px;
    object-fit: contain;
    pointer-events: none;
}

/* Enhanced Speech Bubble */
.speech-bubble {
    position: absolute;
    background: #ffffe1;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 10px 15px;
    max-width: 300px;
    min-width: 200px;
    font-size: 12px;
    line-height: 1.4;
    color: #000;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    z-index: 999;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.speech-bubble.left::before {
    left: -12px;
    top: 20px;
    border-width: 6px 12px 6px 0;
    border-color: transparent #000 transparent transparent;
}

.speech-bubble.left::after {
    content: '';
    position: absolute;
    left: -9px;
    top: 22px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 9px 4px 0;
    border-color: transparent #ffffe1 transparent transparent;
}

.speech-bubble.right::before {
    right: -12px;
    top: 20px;
    border-width: 6px 0 6px 12px;
    border-color: transparent transparent transparent #000;
}

.speech-bubble.right::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 22px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 9px;
    border-color: transparent transparent transparent #ffffe1;
}

/* Enhanced Dialog Window */
.dialog-window {
    position: absolute;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    box-shadow: 1px 1px 0 #000;
    z-index: 1001;
    display: none;
    min-width: 250px;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    padding: 1px;
}

.dialog-header {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    padding: 3px 5px 3px 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 11px;
    cursor: move;
    margin: 2px;
    letter-spacing: 0.5px;
}

.dialog-close {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    width: 16px;
    height: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: black;
    margin-left: 2px;
    font-family: Tahoma, sans-serif;
    padding-bottom: 2px;
}

.dialog-close:hover {
    background: #d0d0d0;
}

.dialog-close:active, .dialog-close.touch-active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 1px 0 0 1px;
}

/* Stili per il feedback touch sui pulsanti */
.dialog-button.touch-active, .small-button.touch-active {
    background-color: #0078d7;
    color: white;
    transform: scale(0.95);
}

.dialog-content {
    padding: 10px;
    max-height: calc(80vh - 30px);
    overflow-y: auto;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    margin: 2px;
}

.dialog-message {
    margin-bottom: 12px;
    line-height: 1.4;
    color: #000;
    font-size: 11px;
}

.dialog-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dialog-button {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    text-align: left;
    width: 100%;
    position: relative;
}

.dialog-button:hover {
    background: #d0d0d0;
}

.dialog-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 5px 9px 3px 11px;
}

.input-field {
    width: 100%;
    padding: 3px 5px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    margin: 8px 0;
    background: white;
}

/* WinAmp Player Styles */
.winamp-container {
    background-color: #272727;
    color: #00ff00;
    padding: 5px;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
}

.winamp-player {
    border: 2px inset #555;
    background-color: #272727;
    padding: 8px;
}

.song-info {
    color: #00ff00;
    font-size: 11px;
    margin-bottom: 5px;
}

.visualization-container {
    background-color: #000;
    border: 1px solid #444;
    height: 40px;
    margin: 5px 0;
    position: relative;
}

#waveform-display {
    width: 100%;
    height: 100%;
}

.progress-container {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

#progress-bar {
    flex-grow: 1;
    height: 10px;
    background-color: #222;
    border: 1px solid #444;
    margin: 0 5px;
    position: relative;
}

#progress-fill {
    height: 100%;
    background-color: #00aa00;
    width: 0%;
}

.controls-container {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.player-btn {
    min-width: 30px;
    height: 22px;
    background-color: #444;
    border: 1px outset #666;
    color: #00ff00;
    margin: 0 2px;
    cursor: pointer;
    font-family: monospace;
    font-weight: bold;
}

.player-btn:active {
    border-style: inset;
}

.button-row {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 12px;
}

.small-button {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 3px 12px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    min-width: 75px;
    position: relative;
    text-align: center;
}

.small-button:hover {
    background: #d0d0d0;
}

.small-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 4px 11px 2px 13px;
}

.response-text {
    background: white;
    border: 1px inset #c0c0c0;
    padding: 10px;
    margin: 10px 0;
    font-size: 11px;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

.loading-text {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

/* Enhanced Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.clippy-container.floating {
    animation: float 4s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.speech-bubble.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.dialog-window.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Enhanced Calendar Window Styles */
.calendar-window {
    position: absolute;
    width: 380px;
    min-width: 320px;
    min-height: 250px;
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    z-index: 1000;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
    resize: both;
    overflow: auto;
}

.calendar-title-bar {
    background-color: #000080;
    color: white;
    padding: 3px 5px 3px 5px;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.button-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.calendar-tabs {
    display: flex;
    padding: 0 0 0 5px;
    border-bottom: 1px solid #808080;
    background-color: #c0c0c0;
}

.calendar-tab {
    padding: 4px 12px;
    margin: 4px 2px 0 0;
    background-color: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #808080 transparent #ffffff;
    cursor: pointer;
}

.calendar-tab.active {
    background-color: #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
    position: relative;
    z-index: 2;
}

.calendar-content {
    display: flex;
    padding: 10px;
    background-color: #c0c0c0;
}

.calendar-left {
    flex: 1;
    margin-right: 10px;
}

.calendar-right {
    flex: 1;
}

.calendar-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar-select-container {
    display: flex;
    margin-bottom: 10px;
    gap: 5px;
}

#calendar-month-select {
    flex: 1.5;
    background-color: #ffffff;
    border: 1px inset #808080;
    height: 22px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
}

#calendar-year-input {
    flex: 1;
    background-color: #ffffff;
    border: 1px inset #808080;
    height: 20px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
    text-align: right;
    padding-right: 5px;
}

#calendar-days table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 1px inset #808080;
}

#calendar-days th {
    background-color: #c0c0c0;
    text-align: center;
    font-size: 11px;
    font-weight: normal;
    padding: 2px;
}

#calendar-days td {
    text-align: center;
    width: 14.28%;
    height: 20px;
    cursor: default;
    padding: 2px;
}

#calendar-days td.current-day {
    background-color: #000080;
    color: white;
}

#calendar-days td:hover:not(.current-day):not(:empty) {
    background-color: #c0c0c0;
}

.clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    border: 1px inset #808080;
    padding: 10px;
    height: 180px;
}

.analog-clock {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    background-color: #f8f8f8;
    border: 4px solid #c0c0c0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.clock-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(from 0deg, transparent 0 6deg, #ddd 6deg 7deg, transparent 7deg 30deg, #ddd 30deg 31deg, transparent 31deg 60deg, #ddd 60deg 61deg, transparent 61deg 90deg, #ddd 90deg 91deg, transparent 91deg 120deg, #ddd 120deg 121deg, transparent 121deg 150deg, #ddd 150deg 151deg, transparent 151deg 180deg, #ddd 180deg 181deg, transparent 181deg 210deg, #ddd 210deg 211deg, transparent 211deg 240deg, #ddd 240deg 241deg, transparent 241deg 270deg, #ddd 270deg 271deg, transparent 271deg 300deg, #ddd 300deg 301deg, transparent 301deg 330deg, #ddd 330deg 331deg, transparent 331deg 360deg);
}

.clock-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.clock-face::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background: transparent;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    background: #555;
    border: 1px solid #000;
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.clock-hour-hand, .clock-minute-hand, .clock-second-hand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center bottom;
    border-radius: 2px;
}

.clock-hour-hand {
    width: 6px;
    height: 40px;
    margin-left: -3px;
    margin-top: -40px;
    background: #222;
    z-index: 3;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.clock-minute-hand {
    width: 4px;
    height: 55px;
    margin-left: -2px;
    margin-top: -55px;
    background: #444;
    z-index: 2;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
}

.clock-second-hand {
    width: 2px;
    height: 65px;
    margin-left: -1px;
    margin-top: -65px;
    background: #d31c1c;
    z-index: 4;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.hour-mark {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-align: center;
    width: 20px;
    height: 20px;
    line-height: 20px;
    z-index: 1;
}

.h12 {
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.h3 {
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.h6 {
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.h9 {
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.digital-time {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

#clock-time-input {
    width: 80px;
    text-align: center;
    border: 2px inset #bbb;
    background-color: #fff;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    padding: 3px 2px;
    padding: 2px 5px;
}

.calendar-footer {
    padding: 10px;
    background-color: #c0c0c0;
}

.calendar-timezone {
    font-size: 11px;
    margin-bottom: 10px;
}

.calendar-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.calendar-button {
    padding: 3px 20px;
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
}

.calendar-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* Weather styles */
.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.weather-header h3 {
    margin: 0;
    font-size: 18px;
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    border: 1px solid #888;
    padding: 3px 5px;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 12px;
    margin-right: 5px;
}

.search-bar button {
    border: 1px solid #888;
    background: #c0c0c0;
    padding: 2px 5px;
    cursor: pointer;
}

.current-weather {
    display: flex;
    padding: 15px;
    align-items: center;
    border-bottom: 1px solid #ccc;
}

.weather-icon {
    font-size: 48px;
    margin-right: 20px;
}

.weather-details {
    flex: 1;
}

.temperature {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.description {
    font-size: 16px;
    margin-bottom: 10px;
}

.additional-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

.forecast-title {
    font-weight: bold;
    padding: 10px;
    background-color: #e0e0e0;
    border-bottom: 1px solid #ccc;
}

.forecast {
    display: flex;
    justify-content: space-between;
    padding: 15px;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
}

.day-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.day-icon {
    font-size: 24px;
    margin: 5px 0;
}

.day-temp {
    font-size: 14px;
}

.loading, .error {
    padding: 20px;
    text-align: center;
    font-size: 16px;
}

.error {
    color: #d00;
}
