
/* reset */
* {
    margin: 0;
    padding: 0;
    border: none;
    background-color: transparent;
}

/* variables */
body {
    --window-control-hover: rgba(255, 51, 51, 0.37);
    --desktop-hover: rgba(228, 237, 255, 0.212);
    --desktop-base: rgba(2, 15, 43, 0.753);
    --desktop-primary: rgb(57, 68, 114);
    --desktop-highlight: rgba(182, 195, 255, 0.432);
    --desktop-lowlight: rgba(47, 48, 122, 0.562);
    --text: rgb(255, 255, 255);
}
.light-mode {
    --window-control-hover: #ff8999;
    --desktop-hover: rgba(255, 227, 236, 0.233);
    --desktop-base: rgba(212, 156, 165, 0.761);
    --desktop-primary: #e9b6b9;
    --desktop-highlight: rgb(250, 211, 213);
    --desktop-lowlight: #d17c8896;
    --text: rgb(255, 255, 255);
}

/*/////////// MAIN PAGE //////////*/

/* -------desktop------- */
body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background-color: var(--desktop-primary);
    background-image: url(media/dark-bg.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 100vh;
}
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.desktop {
    display: grid;
    grid-template-columns: repeat(25, 1fr);
    grid-template-rows: repeat(11, 1fr); 
    height: 100vh;
}
button {
    background-color: transparent;
    align-items: center;
    justify-items: center;
    text-decoration: none;
    color: white;
}

/* -------icon styling------- */
.icon img {
    filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.473));
    height: 50px;
    width: 50px;
}
.icon {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    margin-top: 10px;
    width: 80px;
    height: auto;
}
.icon:hover {
    /* outline: 1px solid rgba(180, 209, 212, 0.349);
    background-color: rgba(143, 188, 197, 0.308); */
    background-color: var(--desktop-hover);
    border-radius: 10px;
    transition: background-color 0.2s;
}
.label {
    text-align: center;
    text-shadow: #000000 0px 0px 3px;
    padding-top: 5px;
}
.nowrap {
    white-space: nowrap;
}


/* icon grid positions */
#recycle-icon {
    grid-column-start: 25;
    grid-row-start: 10;
}


/* -------taskbar------- */
.taskbar {
    background-color: var(--desktop-base);
    backdrop-filter: blur(15px);
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.left-align {
    display: flex;
}
.right-align {
    display: inline-flex;
    text-align: center;
    margin-right: 10px;
}

/* color mode toggle */
#color-mode-toggle {
    width: 30px;
    border: none;
    cursor: pointer;
}
#color-mode-toggle:hover {
    background-color: var(--desktop-hover);
    transition: background-color 0.2s;
}
.light-icon {
    display: none;
}
/* start button */
#start-button svg {
    margin: 5px 15px;
}
#start-button:hover,
.task-icon:hover {
    background-color: var(--desktop-hover);
    transition: background-color 0.2s;
}
#start-button:hover #windows-logo path {
    fill: var(--desktop-lowlight);
    transition: fill 0.3s ease;
}
.task-icon, #start {
    background-color: transparent;
    transition: background-color 0.5s
}

/* minimize icons */
#minimized-windows {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.minimize-icon {
    display: flex;
    height: 40px;
    padding: 5px 10px;
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.5s;
}
.minimize-icon:hover {
    background-color: var(--desktop-hover);
    transition: background-color 0.2s;
}


/* date/time display */
#desktop-datetime {
    font-size: .8rem;
    padding: 5px 10px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: .7;
}

/* searchbar */
.search-container {
    position: relative;
    width: 300px;
}
.search-container input {
    width: 100%;
    padding: 15px 40px;
    border: 1px solid #7c7b7b7e;
    background-color: #353535;
    height: 40px;
    font-size: 1rem;
    color: white;
}
.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.699);
    font-size: 1rem;
}
.search-container img {
    height: 30px;
    position: absolute;
    transform: scaleX(-1) translateX(-5px) translateY(7px);
}

/* -------window settings------- */
.window {
    visibility: hidden;
    position: absolute;
    top: 100px;
    left: 100px;
    z-index: 10;
    overflow: hidden;
    box-shadow: 0px 0px 20px 1px rgba(0, 0, 0, 0.267);
    transition: 
        opacity 0.5 ease,
        width 0.5 ease,
        height 0.5 ease;
}
.window.open {
    visibility: visible;
}

/* window controls */
.window-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 30px;
    padding: 10px;
}
.window-controls button {
    margin: 0 5px;
    font-size: 1.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    scale: 0.8;
}
.window-controls button:hover {
    color: var(--window-control-hover);
}
/* .minimize-button,
.maximize-button {
    transform: translate(4px, -4px);
} */
.exit-icon {
    height: 20px;
    cursor: pointer;
}
.exit-icon:hover path {
    stroke: var(--window-control-hover);
}
.resizer {
    width: 5px;
    height: 5px;
    border: 2px solid var(--desktop-lowlight);
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
}

/* -------start menu------- */
.start-menu {
    display: none;
    position: absolute;
    bottom: 40px;
    left: 0px;
    height: 500px;
    width: 450px;
    background-color: var(--desktop-base);
    backdrop-filter: blur(15px);
    z-index: 100;
}
.start-menu.open {
    display: block;
}
.start-icon-container {
    display: grid;
    grid-template-areas: 
    "todolist weather weather"
    "calculator weather weather"
    "clock calandar notes";
    margin: 25px;
    gap: 10px;
}
 .start-icon {
    height: 120px;
    width: 100%;
    background-color: var(--desktop-hover);
    filter: drop-shadow(0px 0px 5px rgba(66, 13, 13, 0.301));
    cursor: pointer;
    transition: all 0.7s ease;
}
.start-icon:hover {
    filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.233));
    transition: all 0.7s ease;
}
.start-icon > * {
    position: relative;
    z-index: 2;
}
.start-icon img {
    height: 70px;
    width: 70px;
}
#todolist-icon {
    grid-area: todolist;
}
#mini-weather-icon {
    height: 100%;
    width: 100%;
    grid-area: weather;
}
.mini-weather-display img {
    height: 90px;
}
#calculator-icon {
    grid-area: calculator;
}
#calculator-icon, 
#todolist-icon, 
#clock-icon,
#calander-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

/* boot up screen */
#bootscreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--desktop-primary);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 1s ease;
}
#load-icon {
    position: absolute;
    height: 50px;
    width: 50px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1.5s linear infinite;
 
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 600px) {
    body {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 50px;
        right: 0;
        background-attachment: fixed;
    }
    .desktop {
        grid-template-columns: repeat(11, 1fr);
        grid-template-rows: repeat(22, 1fr);
    }
    .icon {
        width: 60px;
    }
    .icon img {
        height: 40px;
        width: 40px;
    }
    .label {
        font-size: 0.7rem;
    }
    #recycle-icon {
        grid-column-start: 10;
        grid-row-start: 19;
    }
    .taskbar {
        height: 40px;
    }
    #desktop-datetime {
        font-size: 0.6rem;
        padding: 2px 5px;
        height: 30px;
    }
    .minimize-icon {
        height: 30px;
        padding: 2px 5px;
    }
    .start-menu {
        position: fixed;
        height: 310px;
        width: 310px;
        background-color: var(--desktop-base);
        backdrop-filter: blur(15px);
        z-index: 100;
    }
     .start-icon {
        height: 90px;
        width: 80px;
    }
    .start-icon-container {
        margin: 10px;
        gap: 8px;
    }
    .start-icon img {
        height: 55px;
        width: 55px;
    }
    #mini-weather-icon {
        padding: 10px;
    }
    #mini-weather-icon h2{
        font-size: 1.5rem;
    }
    #mini-weather-icon h1{
        font-size: 2.3rem;
    }
    /* all windows */
    .window {
        position: fixed;
        top: 0px;
        left: 0px;
        box-shadow: none;
    }
    .maximize-button {
        display: none !important;
    }
    .resizer {
        display: none !important;
    }
}