*{
    margin: 0;padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;}
body{
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}
.backgroundPic{
    background-image: url(2.jpg);
    background-position: center;
    background-size: cover;
    position: absolute;
    height: 100vh;width: 100vw;
    z-index: -999;
    cursor: default;
}
.frostGlass{
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25);
    color: color-contrast(white vs black);
}
.frostGlass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;

    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.25),
        rgba(255,255,255,0.05)
    );

    pointer-events: none;
}
.zIsland{
    height: 35px;
    width: clamp(150px, 200px, 230px);
    background-color: black;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 12px 12px;
    margin: auto;
    top: 0%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: default;
    font-size: .6rem;
    transition: .3s;
    user-select: none;
    overflow: hidden;
    z-index: 999999;
    padding: 15px 10px;
}
.zIsland:hover{
    width: clamp(150px, 230px, 250px);
}
.zIsland.active{
    width: clamp(150px, 230px, 250px);
}
.menuBar{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 25px;
    top: 0;
    border-bottom: solid .7px;
    padding: 10px 30px;
    color: white;
    background-color: rgba(0, 0, 0, 0.3);
}
.menuRight{
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: .7rem;
}
.menuBar span, .menuBar i{
    cursor: pointer;
}
.menuLeft{
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: .7rem;
}
.toggle{
    display: flex;
    flex-direction: column;
    font-size: .3rem;
}
.time{
    display: flex;
}
.batteryPercentage{
    position: absolute;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    bottom: -150%;
    width: auto;
    border-radius: 8px;
    text-align: center;
    padding: 5px;
    transition: .3s;
    opacity: 0;
}
.batteryPercentage.showBattery{
    opacity: 1;
}



.clock{
    display: flex;
    padding: 15px 30px;
    position: absolute;
    margin: 5px;
    border-radius: 12px;
    top: 50%;
    transform: translateY(-50%);
    user-select: none;
    line-height: 1;
    font-size: clamp(2rem, 2.5rem,3rem);
    color: white;
    align-items: center;
}
.taskbar{
    position: absolute;
    width: clamp(40%, auto,85%);
    border-radius: 3rem;
    padding:  10px 25px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 7%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    cursor: pointer;
}
.app{
    transition: .1s;
    padding: 5px;
    border-radius: 50%;
}
.app.clicked{
    animation: bounce 1.5s;
}
@keyframes bounce {
    0%{
        transform: translateY(0);
    }
    25% {
        transform: translateY(-20px);
    }
    50% {
        transform: translateY(-10px);
    }
    75% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0);
    }
}
.apk {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 0%) scale(0.8);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                opacity 0.4s ease;
    max-width: 90vw;
    min-width: 0;
    padding: 0;
    pointer-events: none; /* prevent clicks when closed */
}

.apk.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    min-width: 40vw;
    padding: 30px;
    pointer-events: auto;
}

.apk .control{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: start;
    width: 100%;
    border-bottom: solid .7px;
    padding: 5px;
    gap: 10px;
    top: -2px;
    left: -2px;
}
.control span{
    font-size: .4rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.close, .minimize, .drag{
    padding: 5px;
    position: relative;
    border-radius: 50%;
}
.close{
    background-color: red;
}
.minimize{
    background-color: yellow;
}
.drag{
    background-color: green;
}
strong{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.apps{
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.gridApp{
    max-width: 30vw;
}
.gridApp .app{
    border: solid;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gridApp .power{
    position: absolute;
    bottom: 5%;
    right: 20px;
    scale: .7;
}
.settingsApp {
    position: absolute;
    padding: 10px;
    border-radius: 8px;
    width: clamp(30%,40%,60%);
    height: clamp(30%,60%,80%);
    font-size: .6rem;
    transition: .3s;
    overflow: hidden; /* remove this line */
    display: flex;
    flex-direction: column;
}
p{
    line-height: 2;
}
.settingsApp li{
    list-style: none;
}
.hideLi{
    display: none;
}
.messageApp{
    height: 70vh;
    width: 40vw;
    overflow: hidden;
}
.messageApp ul{
    overflow-x: hidden;
    overflow-y: auto;
    height: 50vh;
}
.messageApp li{
    padding: 10px 0;
    white-space: nowrap;
    list-style:circle;
}
.messageApp li:hover{
    background-color: rgba(0, 0, 0, 0.3);
}
.modeContainer {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5px;
    flex: 1;          /* take full height inside settingsApp */
    min-height: 0;    /* allow children to shrink properly */
    overflow: auto;
}
.modeName{
    border: solid;
    margin: 5px 0;
    cursor: pointer;
    padding: 5px;
}
.modeContainer .personPlug {
    height: 100%;
    min-height: 0;    /* critical for scroll inside flex/grid */
    padding-right: 8px;
    display: flex;
}
.modeName li{
    padding: 5px;
}
.modePlugs{
    border: solid;
    margin: 5px 0;
    padding: 5px;
}
.wallpaperDemo{
    display: inline;
}
.wallpaperDemo img{
    width: 100px;
    cursor: pointer;
    margin: 5px;
}
.imgSelected{
    border: solid 1px black;
    border-radius: 2px;
    scale: 1.111;
    transition: .1s;
}
.slide{
    animation: slide 3s ease-in-out alternate;
}
@keyframes slide {
    0% {
        transform: translateX(140px);
    }
    100% {
        transform: translateX(0);
    }
}
.slideMusic{
    animation: slideMusic 7s ease-in-out alternate;
}
@keyframes slideMusic {
    0% {
        transform: translateX(250px);
    }
    100% {
        transform: translateX(-250px);
    }
}

.settingsApp button{
    line-height: 1;
    font-size: .5rem;
    border-radius: 12px;
    cursor: pointer;
    padding: 5px;
    backdrop-filter: blur(12px) saturate(190%);
}
.selectedLi{
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: 800;
}
.browserApp {
    position: absolute;
    width: 90vw;
    height: 80vh;
    border-radius: 5px;
    padding: 15px;
}
.weatherApp{
    position: absolute;
    border-radius: 10px;
    padding: 20px;
    width: 100vw;
    height: 95vh;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.weatherApp iframe{
    border: none;
    height: 200px;
    width: 100%;
    height: 90%;
    border-radius: 8px;
    position: relative;
}
.calculatorApp{
    position: absolute;
    border-radius: 10px;
    padding: 20px;
    width: 100vw;
    height: 95vh;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.calculatorApp iframe{
    border: none;
    height: 200px;
    width: 100%;
    height: 90%;
    border-radius: 8px;
    position: relative;
}
.bootScreen {
    position: fixed;
    inset: 0;
    background: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 999999999;
    transition: opacity 0.8s ease;
}
.bootScreen.hide {
    opacity: 0;
    pointer-events: none;
}
.bootLogo {
    font-size: 5rem;
    font-weight: 200;
    pointer-events: none;
    color: white;
    letter-spacing: 0.2em;
    font-family: -apple-system, sans-serif;
}
.bootBar {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}
.bootFill {
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 2px;
    animation: bootLoad 2.5s ease forwards;
}
@keyframes bootLoad {
    0%   { width: 0%; }
    60%  { width: 70%; }
    85%  { width: 90%; }
    100% { width: 100%; }
}




@media (max-width: 700px) {
    .settingsApp {
        width: 90vw;
        height: 80vh;
    }

}



@media (max-width: 500px) {
    .gridApp {
        max-width: 90vw;
        grid-template-columns: repeat(2, 1fr);
    }
    .taskbar{
        width: 80vw;
        gap: 5px;
    }
    .app{
        scale: .7;
    }
    .menuBar{
        display: none;
    }
    .zIsland{
    height: 25px;
    width: clamp(100px, 160px, 200px);
    background-color: black;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.3rem;
    margin: auto;
    top: 3%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: default;
    font-size: .6rem;
    transition: .3s;
    user-select: none;
    overflow: hidden;
    z-index: 999999;
    padding: 15px 10px;
}
}



        .musicContainer {
        --bg: #f5f2ed;
        --surface: #faf8f5;
        --border: rgba(0,0,0,0.1);
        --border-strong: rgba(0,0,0,0.2);
        --text: #1a1814;
        --muted: #9a9690;
        --accent: #2c2c2a;
        --hover: rgba(0,0,0,0.04);
        --playing: #3d3a35;
        background: var(--surface) !important;
        padding: 28px 28px 120px !important;
        height: 70vh;
        width: 40vw;
        min-width: 340px;
        max-width: 540px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        }

        /* Header */
        .header-row {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        margin-bottom: 20px;
        }

        .musicContainer .header-row span {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.6rem;
        font-weight: 300;
        letter-spacing: 0.08em;
        color: var(--text);
        }

        .header-row .track-count {
        font-size: 0.65rem;
        color: var(--muted);
        letter-spacing: 0.12em;
        }

        /* Search */
        .searchMusic {
        position: relative;
        margin-bottom: 14px;
        }

        .searchMusic input {
        width: 100%;
        background: transparent;
        border: none;
        border-bottom: 1px solid var(--border-strong);
        border-radius: 0;
        padding: 8px 28px 8px 0;
        font-family: 'DM Mono', monospace;
        font-size: 0.72rem;
        color: var(--text);
        letter-spacing: 0.06em;
        outline: none;
        transition: border-color 0.2s;
        }

        .searchMusic input::placeholder {
        color: var(--muted);
        font-style: normal;
        }

        .searchMusic input:focus {
        border-bottom-color: var(--accent);
        }

        .search-hint {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.6rem;
        color: var(--muted);
        letter-spacing: 0.05em;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s;
        }

        .searchMusic input:focus ~ .search-hint { opacity: 1; }

        /* Import */
        .importMusic {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.62rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--muted);
        cursor: pointer;
        border: 1px solid var(--border-strong);
        border-radius: 1px;
        padding: 4px 10px;
        margin-bottom: 14px;
        transition: color 0.2s, border-color 0.2s;
        width: fit-content;
        }

        .importMusic:hover { color: var(--text); border-color: var(--accent); }

        /* List */
        ul#musicLists {
        flex: 1;
        list-style: none;
        overflow-y: auto;
        padding: 0;
        scrollbar-width: thin;
        scrollbar-color: var(--border-strong) transparent;
        }

        ul#musicLists::-webkit-scrollbar { width: 2px; }
        ul#musicLists::-webkit-scrollbar-thumb { background: var(--border-strong); }

        ul#musicLists li {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 8px;
        border-radius: 1px;
        cursor: pointer;
        transition: background 0.15s;
        font-size: 0.7rem;
        color: var(--text);
        letter-spacing: 0.03em;
        border-bottom: 1px solid transparent;
        }

        ul#musicLists li:hover { background: var(--hover); }

        ul#musicLists li.active {
        color: var(--playing);
        border-bottom-color: var(--border);
        }

        ul#musicLists li .li-icon {
        font-size: 0.55rem;
        color: var(--muted);
        width: 14px;
        text-align: center;
        flex-shrink: 0;
        }

        ul#musicLists li.active .li-icon { color: var(--playing); }

        ul#musicLists li .li-title {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        }

        ul#musicLists li .li-src {
        font-size: 0.58rem;
        color: var(--muted);
        flex-shrink: 0;
        }

        .empty-state {
        padding: 32px 0;
        text-align: center;
        color: var(--muted);
        font-size: 0.65rem;
        letter-spacing: 0.08em;
        font-style: italic;
        font-family: 'Cormorant Garamond', serif;
        }

        /* Player */
        .musicContainer {
        position: relative;
        }
        .musicPlayer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--border-strong);
        padding: 14px 28px 18px;
        display: grid;
        grid-template-columns: 52px 1fr auto;
        gap: 12px;
        align-items: center;
        border-radius: 0 0 2px 2px;
        }

        .musicIcon {
        width: 52px;
        height: 52px;
        border: 1px solid var(--border-strong);
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: var(--bg);
        font-size: 1.2rem;
        color: var(--muted);
        position: relative;
        }

        .musicIcon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        }

        .musicIcon.spinning { animation: spin 4s linear infinite; }
        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

        .musicName {
        padding: 0;
        min-width: 0;
        }

        .musicName .track-title {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1rem;
        font-weight: 300;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        margin-bottom: 2px;
        }

        .musicName .track-sub {
        font-size: 0.6rem;
        color: var(--muted);
        letter-spacing: 0.08em;
        }

        /* Progress bar */
        .progress-wrap {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 2px;
        }

        .progress-bar {
        flex: 1;
        height: 1px;
        background: var(--border-strong);
        position: relative;
        cursor: pointer;
        }

        .progress-fill {
        height: 100%;
        background: var(--accent);
        width: 0%;
        transition: width 0.5s linear;
        pointer-events: none;
        }

        .prog-time {
        font-size: 0.58rem;
        color: var(--muted);
        flex-shrink: 0;
        letter-spacing: 0.04em;
        }

        .musicController {
        display: flex;
        align-items: center;
        gap: 16px;
        }

        .musicController button {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--muted);
        font-size: 0.75rem;
        padding: 4px;
        transition: color 0.15s, transform 0.1s;
        line-height: 1;
        }

        .musicController button:hover { color: var(--text); }
        .musicController button:active { transform: scale(0.92); }

        .musicController button.play-pause {
        width: 32px;
        height: 32px;
        border: 1px solid var(--border-strong);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        }

        .musicController button.play-pause:hover {
        border-color: var(--accent);
        color: var(--accent);
        }

        /* hidden YT player */
        #ytframe { position: absolute; top: -9999px; left: -9999px; width: 1px; height: 1px; }

        /* Loading indicator */
        .loading { animation: blink 1s ease-in-out infinite; }
        @keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

        @media (max-width: 600px) {
        .musicContainer { width: 88vw; height: 80vh; padding: 20px 16px 120px; }
        .musicPlayer { padding: 12px 16px 16px; }
        }
