/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: monospace;
    color: #fff;
}

/* Wallpaper */
.wallpaper {
    position: fixed;
    top: -20px;      /* extend above viewport */
    left: -20px;     /* extend left of viewport */
    width: calc(100% + 40px);  /* extend width */
    height: calc(100% + 40px); /* extend height */
    background: url('assets/desktop-bg.jpg') no-repeat center center/cover;
    filter: blur(1px);
    z-index: -2;
}

/* Desktop content stays above wallpaper */
.desktop {
    position: relative;
    z-index: 0;
    height: 85%;
    display: flex;
    flex-direction: column;
}


/* Window */
.window {
    margin: auto;
    width: 95%;
    /*! max-width: 900px; */
    /*! min-width: 350px; */
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
}

.window-header {
    display: flex;
    align-items: center;
    background: #3a3a3a;
    padding-right: 5px;
    padding-left: 5px;
}

.app-icon {
    height: 28px;
    margin-right: 10px;
}

.window-title {
    flex-grow: 1;
    font-size: 1.1rem;
}

.window-controls {
    height: 40px;
}

/* Window content */
.window-content {
    padding: 15px;
}

/* Taskbar */
.taskbar {
    display: flex;
    justify-content: space-between; /* left & right sides */
    align-items: center;
    background: rgba(40, 40, 40, 0.95);
    border-radius: 10px;
    margin: 8px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /*! height: 50px; */ /* bigger taskbar */
}

/* Left side */
.taskbar-left {
    display: flex;
    align-items: center;
}

.taskbar-apps {
    height: 40px;
}

/* Right side */
.taskbar-right {
    display: flex;
    align-items: center;
}

.taskbar-icons {
    height: 40px;
}

.taskbar-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 8px;
    color: #fff;
    font-size: 12px;
}

.taskbar-clock #taskbar-time {
    font-weight: bold;
    font-size: 14px;
}

.taskbar-clock #taskbar-date {
    font-size: 10px;
    line-height: 1.1;
}


/* Toast Notification */
.toast {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: rgba(50, 50, 50, 0.95);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    display: flex;
    align-items: flex-start;      /* keep the X aligned to top */
    gap: 10px;
    max-width: 320px;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast-icon-link {
    flex-shrink: 0;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

/* This is the crucial part for Chrome */
.toast-content {
    flex: 1 1 auto;
    min-width: 0;                /* allow content to shrink in a flex row */
}

.toast-content p,
.toast-content a {
    white-space: normal;         /* allow wrapping */
    word-break: break-word;      /* break long words/URLs if needed */
    overflow-wrap: anywhere;     /* most aggressive, Chrome-friendly wrap */
    line-height: 1.3;
    margin: 0;
}

.toast-close {
    background: transparent;
    border: none;
    color: #bbb;
    font-size: 1.2rem;
    line-height: 1;              /* keep glyph centered in the 24x24 box */
    width: 24px;
    height: 24px;
    text-align: center;
    cursor: pointer;
    margin-left: 4px;
    flex: 0 0 auto;              /* don’t let it shrink */
}

.toast-close:hover {
    color: #fff;
}


.terminal {
    font-family: monospace;
    background: #1e1e1e;
    color: #cfcfcf;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.prompt {
    color: #6ac1ff;
    margin-right: 6px;
}

.typed-command {
    color: #cfcfcf;
}

.terminal-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.terminal-os-icon {
    width: 256px;
    /*! height: px; */
    border-radius: 8px;
    margin-top: 4px;
}

.terminal-info p {
    margin: 2px 0;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.terminal-info p.show {
    opacity: 1;
    transform: translateX(0);
}

.highlight {
    color: #6ac1ff;
}

.terminal-prompt span {
    display: inline;      /* remove extra space */
    margin: 0;
    padding: 0;
}

.username { color: #48c222; }     /* blue */
.hostname { color: #d20f14; }     /* orange */
.symbol   { color: #38697a; }     /* grey */
.tilde    { color: #8cff6a; }     /* green */
.typed-command { color: #fe9628; } /* white */

.cursor {
    color: #ffffff;
    animation: blink 1s step-start infinite;
}

/* Blinking animation */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}


.highlight {
    color: #6ba2b6; /* color for labels like OS, Host, Kernel */
}

/* Terminal content scrollable */
.window-content.terminal {
    background: #1e1e1e;
    color: #fe9628;
    padding: 15px;
    display: flex;
    flex-direction: column;

    /* New additions */
    max-height: 73vh;       /* adjust to window size */
    overflow-y: auto;        /* vertical scrolling */
    scrollbar-width: thin;   /* Firefox */
    scrollbar-color: #888 #1e1e1e; /* scrollbar thumb and track color */
}

/* Optional: Custom scrollbar for Webkit browsers */
.window-content.terminal::-webkit-scrollbar {
    width: 8px;
}

.window-content.terminal::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 4px;
}

.window-content.terminal::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

/* Mobile / small screens */
@media (max-width: 768px) {
    .desktop {
        height: 100vh;   /* full viewport height */
        margin: 0;
        padding: 0;
    }

    .window {
        width: 100% !important;
        height: 100vh;      /* full viewport height */
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
    }

    .window-content.terminal {
        flex: 1;            /* take remaining space under header */
        max-height: unset;
        overflow-y: auto;   /* allow scrolling if content too tall */
        padding: 10px;
    }

    .taskbar {
        top: 0;
        bottom: unset;
        left: 0;
        right: 0;
        flex-direction: row-reverse;
        justify-content: flex-end;
        margin: 0;
        border-radius: 0;
        height: 50px;
        padding: 0 10px;
    }

    .taskbar-left {
        display: none;      /* hide apps on mobile */
    }

    .toast {
        top: 60px;          /* below taskbar */
        bottom: unset;
        right: 10px;
        left: 10px;
        max-width: unset;
    }

    .wallpaper {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* Taskbar layout changes for mobile */
    .taskbar-left {
        display: none; /* hide desktop apps */
    }

    .taskbar-right {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: space-between; /* space for clock */
    }

    /* Reorder elements */
    .taskbar-icons:last-of-type { /* icons B */
        order: 1;
        margin-left: 0;
    }

    .taskbar-icons:first-of-type { /* icons A */
        order: 2;
        margin-left: 0;
    }

    .taskbar-clock {
        order: 4;  /* clock on far right */
        margin-left: auto; /* push to right */
    }

    /* Optional: add spacing between icons */
    .taskbar-icons {
        margin: 0 5px;
    }

    .terminal-line {
        flex-direction: column; /* stack vertically */
        align-items: center;    /* center align image + text */
        text-align: left;     /* center the text */
    }

    .terminal-os-image {
        margin-bottom: 10px;    /* space between image and text */
    }
}

/* Hide icons A on very small screens (≤400px) */
@media (max-width: 400px) {
    .taskbar-icons:first-of-type { /* icons A */
        display: none;
    }
}


/* Button styling within the toast */
.toast .chat-open-btn {
    background: linear-gradient(135deg, #40c9ff 0%, #e81cff 100%);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, appearance 0.2s ease;
}

/* Hover effect for the button */
.toast .chat-open-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Focus styles for accessibility */
.toast .chat-open-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(64, 201, 255, 0.6);
}

/* Close button styles */
.toast .toast-close {
    background: transparent;
    border: none;
    color: #bbb;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    margin-left: 8px;
    transition: color 0.2s ease;
}

/* Close hover state */
.toast .toast-close:hover {
    color: #fff;
}

/* unvisited link */
a:link {
    color: #6ba2b6;
}

/* visited link */
a:visited {
    color: #fe9628;
}

/* mouse over link */
a:hover {
    color: #d20f14;
}

/* selected link */
a:active {
    color: #48c222;
}
.windows11logo {
    color:#06b9ff;
}

.endeavour1, .endeavour2, .endeavour3 {
    display: inline-block;
    font-family: monospace;
    white-space: pre;
    line-height: 1.2;
}

.endeavour1{
    color:#ff6969;
}

.endeavour2{
    color:#ac1cee;
}

.endeavour3{
    color:#318fc8;
}

.logo-container {
    font-size: 14px; /* adjust size */
    color: #0f0;     /* green terminal-like */
    background: #000; /* optional: black background */
    padding: 10px;
}

.unraid{
    display: inline-block;
    font-family: monospace;
    white-space: pre;
    line-height: 1.2;
}

.apple{
    display: inline-block;
    font-family: monospace;
    white-space: pre;
    line-height: 1.2;
}

.derpowl{
    display: inline-block;
    font-family: monospace;
    white-space: pre;
    line-height: 1.2;
}

.android{
    display: inline-block;
    font-family: monospace;
    white-space: pre;
    line-height: 1.2;
}
