/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@100;300;400;500;700;800&display=swap');
:root {
    --vh: 1vh;

    /* Thema-kleuren uit de niet-werkende versie */
    --color-background-primary: #0C1428;
    --color-background-secondary: #182036;
    --color-accent-primary: #5ccbff;

    --color-text-primary: #FFFFFF;
    --color-text-primary-opacity: #FFFFFF80;
    --color-text-secondary: #FFFFFF;
    --color-text-danger: rgba(87, 0, 0, 1);

    --color-background-overlay-dark: rgba(0,0,0,0.5);
    --color-background-overlay-medium: rgba(0,0,0,0.4);
    --color-background-overlay-light: rgba(0,0,0,0.2);
    --color-background-overlay-slight: rgba(0,0,0,0.3);
    --color-background-dark-alpha: #090f1bd4;
    --color-background-app-button: #3f495ebd;
    --color-background-app-info: #3f495ebd;
    --color-background-shutdown: #000000;

    --color-border-primary: #ccc;
    --color-border-secondary: #465168;
    --color-border-profile: #313a50;
}

/* Global */
html {
    background: var(--color-background-primary);
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    filter: brightness(1);
}

html.hash-mode {
    display: none;
}

html.hash-mode #age{
    display: block;
}

body {
    margin: 0;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
}

body.age {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

body.age > #age {
  transform: scale(1.5);
}


#desktop {
    position: relative;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    filter: brightness(1); /* standaard helderheid */
}

.app-window-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    box-sizing: border-box;
}

.resize-handle {
    position: absolute;
    z-index: 10;
}

.resize-n, .resize-s {
    height: 6px;
    left: 0;
    right: 0;
    cursor: ns-resize;
}

.resize-e, .resize-w {
    width: 6px;
    top: 0;
    bottom: 0;
    cursor: ew-resize;
}

.resize-n {
    top: 0;
}
.resize-s {
    bottom: 0;
}
.resize-e {
    right: 0;
}
.resize-w {
    left: 0;
}

.resize-ne, .resize-se, .resize-sw, .resize-nw {
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
}

.resize-ne {
    top: 0;
    right: 0;
    cursor: nesw-resize;
}

.resize-se {
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
}

.resize-sw {
    bottom: 0;
    left: 0;
    cursor: nesw-resize;
}

.resize-nw {
    top: 0;
    left: 0;
    cursor: nwse-resize;
}


/* About Me App */

        #aboutme-window-content {
            margin-top: 20px;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            width: 100%;
            flex-grow: 1; 
            overflow-y: auto;
            overflow-x: hidden;
            box-sizing: border-box;
        }

        #aboutme-cards-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            width: 100%;
            max-width: 1000px;
            padding: 20px;
            box-sizing: border-box;
            place-items: center;
        }

        .aboutme-card {
            background-color: var(--color-background-secondary);
            width: 100%;
            max-width: 300px;
            height: 15vh;
            padding: 20px;
            border-radius: 25px;
            box-sizing: border-box;
            transition: all 0.2s ease;
            border: none;
        }

        .aboutme-card:hover {
            cursor: pointer;
            transform: scale(1.05);
            filter: brightness(1.1);
        }

        #aboutme-bio-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding-left: 15%;
            padding-right: 15%;
        }

        .more-button {
            border: none;
            margin-left: 20px;
            font-size: 1.8vh;
            border-radius: 50px;
            padding: 3px 10px;
            color: var(--color-text-primary);
            background: var(--color-background-app-button);
            transition: all 0.2s ease;
        }

        .more-button:hover {
            cursor: pointer;
            transform: scale(1.05);
            filter: brightness(1.1);
        }

        #age-tab-top-bar {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            height: 8%;
            width: 100%;
            padding-left: 50px;
            padding-top: 5px;
        }

        #close-age-tab {
            height: 50px;
            aspect-ratio: 1;
            border: none;
            border-radius: 50px;
            background-color: var(--color-background-app-button);
            color: var(--color-text-primary);
            transition: all 0.2s ease;
        }

        #close-age-tab:hover {
            cursor: pointer;
            transform: scale(1.05);
            filter: brightness(1.1);
        }

        #birthday-countdown-container {
            display: flex;
            flex-direction: row;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
            margin-bottom: 20px;
            color: var(--color-text-primary);
            box-sizing: border-box;
        }

        .countdown-box {
            background-color: var(--color-background-secondary); 
            padding: 20px 30px;
            border-radius: 15px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 7vw;
        }

        .countdown-value {
            font-size: 3rem;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .countdown-label {
            font-size: 13px;
            font-family: "M PLUS Rounded 1c", sans-serif;
            text-transform: uppercase;
            color: var(--color-text-secondary);
        }

        #age {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
        }
        
        .big-content-title {
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-size: 45px;
            font-weight: bold;
            margin-bottom: 30px;
            color: var(--color-text-primary);
        }
/* Projects App */
        #projects-window-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            width: 100%;
            padding: 40px;
            box-sizing: border-box;
            place-items: center;
        }

        #projects-title-container {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .repo-card {
            background: var(--color-background-secondary);
            border-radius: 15px;
            width: 100%;
            height: 100%;
            padding: 20px;
            box-sizing: border-box;
        }


/* Skills App */
        #skills-window-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            max-height: 90%;
        }

        hr {
            color: var(--color-background-app-button);
            width: 75%;
            opacity: 0.5;
            margin-top: 20px;
            margin-bottom: 20px;
        }

        .skills-bar {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            background-color: var(--color-background-secondary);
            width: 70%;
            height: 4vh;
            border-radius: 35px;
            padding: 1vh;
            margin-bottom: 10px;
            transition: all 0.2s ease;
        }

        .skills-bar:hover {
            cursor: pointer;
            transform: scale(1.03);
            filter: brightness(1.1);
        }

        .skills-bar-fill {
            display: flex;
            justify-content: center;
            align-items: center;
            animation: slide 2s forwards;
            background: var(--color-accent-primary);
            width: 0%;
            height: 100%;
            border-radius: 50px;
            transform-origin: left;
        }

        .w-95 { --target-width: 95%; }
        .w-90 { --target-width: 90%; }
        .w-80 { --target-width: 80%; }
        .w-70 { --target-width: 70%; }
        .w-60 { --target-width: 60%; }
        .w-50 { --target-width: 50%; }
        .w-40 { --target-width: 40%; }
        .w-30 { --target-width: 30%; }
        .w-20 { --target-width: 20%; }
        .w-1 { --target-width: 5%; }

        @keyframes slide {
            to {
                width: var(--target-width);
            }
        }

        .skills-bar-text {
            position: fixed;
            z-index: 500; 
            left: 50%;
            transform: translateX(-50%);
            font-size: 2.5vh;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            color: var(--color-text-primary);
        }

/* Contact App */

        #contact-window-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            box-sizing: border-box;
        }

        #contact-form-container {
            margin-top: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            background: var(--color-background-secondary);
            padding: 20px;
            border-radius: 15px;
            width: 70%;
            box-sizing: border-box;
        }

        #contact-form {
            display: flex;
            text-align: center;
            align-items: center;
            flex-direction: column;
            width: 100%;
            box-sizing: border-box;
        }

        .contact-input {
            margin-top: 15px;
            margin-bottom: 15px;
            border: none;
            border-radius: 10px;
            height: 4vh;
            background: var(--color-background-app-button);
            outline: none;
            padding-left: 20px;
            padding-right: 20px;
            color: var(--color-text-primary);
            font-size: 1.5vh;
            transition: all 0.2s ease;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            width: 90%;
        }

        .contact-textfield {
            margin-top: 15px;
            margin-bottom: 15px;
            border: none;
            border-radius: 10px;
            height: 15vh;
            background: var(--color-background-app-button);
            outline: none;
            padding: 20px;
            color: var(--color-text-primary);
            font-size: 1.5vh;
            transition: all 0.2s ease;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            width: 90%;
        }

        .contact-input:focus, .contact-textfield:focus {
            box-shadow: inset 0 0 0 2px var(--color-text-primary);
        }

        .send-button {
            margin: 15px 0;
            border: none;
            border-radius: 10px;
            height: 5vh;
            background: var(--color-accent-primary);
            outline: none;
            color: var(--color-text-primary);
            font-size: 2vh;
            transition: all 0.2s ease;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            width: 50%;
        }

        .send-button:hover {
            cursor: pointer;
            transform: scale(1.05);
            filter: brightness(1.1);
        }

/* Websites App */

        #websites-window-content {
            display: flex;
            flex-direction: column;
            height: 100%;
            width: 100%;
            position: relative;
            overflow: hidden;
            box-sizing: border-box;
        }

        #web-searchbar-container {
            padding: 20px;
            padding-bottom: 10px;
            z-index: 2;
        }

        #web-searchbar {
            width: 100%;
            height: 45px;
            background: var(--color-background-secondary);
            border-radius: 50px;
            outline: none;
            border: none;
            font-size: clamp(14px, 2vh, 20px);
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            color: var(--color-text-primary);
            padding: 0 20px;
            box-sizing: border-box;
        }

        #web-searchbar:focus {
            box-shadow: inset 0 0 0 2px var(--color-text-primary);
        }

        #web-results-container {
            position: absolute;
            top: 80px; /* Adjust based on actual height of search bar + padding */
            width: 100%;
            display: flex;
            justify-content: center;
            z-index: 3;
            pointer-events: none; /* So iframe behind can still be interacted if needed */
        }

        #websites-list {
            list-style: none;
            margin: 0;
            padding: 0;
            width: 92%;
            max-height: 200px;
            overflow-y: auto;
            background: var(--color-background-secondary);
            border-radius: 15px;
            pointer-events: auto; /* Re-enable interaction */
        }

        #websites-list li {
            padding: 8px 12px;
            cursor: pointer;
            font-size: 1.7vh;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            color: var(--color-text-primary);
            border-radius: 15px;
        }

        #websites-list li:hover,
        #websites-list li.selected {
            background-color: var(--color-accent-primary);
        }

        #iframe-container {
            margin-top: 10px;
            flex: 1;
            width: 100%;
            padding: 10px 20px 20px 20px;
            box-sizing: border-box;
        }

        #web-viewer {
            width: 100%;
            height: 100%;
            border-radius: 15px;
            border: none;
            background: white;
        }

/* Gallery App & Documents App */ 
        #gallery-grid, #documents-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            width: 100%;
            padding: 40px;
            box-sizing: border-box;
            place-items: center;
        }


/* Settings App */
        #settings-content-container {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            /* Remove or change align-items to flex-start */
            align-items: flex-start; /* Change this from center to flex-start */
            max-width: 100%;
            width: 100%;
            height: 100%;
            border-bottom-left-radius: 25px;
            border-bottom-right-radius: 25px;
            padding: 30px;
            gap: 30px;
            box-sizing: border-box;
        }

        #settings-sidebar {
            background: var(--color-background-secondary);
            width: 30%;
            height: 100%;
            border-radius: 25px;
            margin: 0;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            animation: close 0.3s;
        }

        .sidebar-text {
            font-size: 4vh;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            color: var(--color-text-primary);
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .sidebar-item {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            width: 100%;
            height: 10%;
            background: var(--color-background-secondary);
            border: solid 0px var(--color-background-secondary);
            padding-left: 5px;
            font-size: 2.3vh;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            color: var(--color-text-primary);
            transition: all 0.2s ease;
            border-radius: 10px;
            padding-left: 15px;
        }

        .sidebar-item:hover {
            cursor: pointer;
            transform: translateX(5px);
            filter: brightness(1.2);
            box-shadow: 0 6px 16px var(--color-background-overlay-dark);
        }

        #settings-content {
            display: none;
            flex: 1;
            background: var(--color-background-secondary);
            height: 100%;
            max-height: 64vh;
            border-radius: 25px;
            margin: 0;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
            padding-left: 30px;
            padding-right: 30px;
            animation: open 0.3s;
            overflow-y: scroll;
            box-sizing: border-box;
        }

        #settings-content.fullscreen {
            max-height: 90vh;
        }

        #checkupdates-button {
            margin-left: 30px;
            margin-top: 20px;
            margin-bottom: 10px;
        }

        .settings-top-bar {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: flex-start;
            width: 100%;
            gap: 20px;
            margin-bottom: 20px;
        }

        .content-title {
            font-size: 2.5vh;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            color: var(--color-text-primary);
            transition: all 0.3s ease;
        }

        .app-content-text {
            font-size: 2vh;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            color: var(--color-text-primary);
            margin-left: 20px;
            margin-top: 0;
        }

        .info-grid {
            display: grid;
            grid-template-columns: max-content 1fr;
            gap: 8px 0px;
            padding: 10px 0;
        }

        .infolabel {
            font-weight: bold;
            text-align: right;
        }

        .infovalue {
            word-break: break-word;
        }


        .settings-content-range {
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            color: var(--color-text-secondary);
            margin-left: 20px;
            accent-color: var(--color-accent-primary);
        }

        .settings-content-number {
            font-size: 2vh;
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: bold;
            color: var(--color-text-primary);
            background: var(--color-background-app-button);
            border: none;
            border-radius: 15px;
            height: 30px;
            width: 35px;
            margin-left: 20px;
            margin-right: 5px;
            padding-left: 10px;
            outline: solid 1px var(--color-background-app-button);
        }

        input[type=number]::-webkit-inner-spin-button,
        input[type=number]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        input[type=number] {
            appearance: textfield;
            -moz-appearance: textfield;
        }

        input[type=number] {
            appearance: textfield;
        }

        .settings-content-number:focus {
            outline: 2px solid var(--color-border-secondary);
        }

        .fa-volume-high {
            font-size: 2vh;
        }

        .fa-address-card {
            font-size: 2vh;
        }

        #battery-percentage {
            margin: 0
        }

        #funmode-switch {
            margin-bottom: 25px;
        }

        .switch {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            aspect-ratio: 2 / 1;
            transition: scale 0.3s ease;
            position: relative;
            margin-left: 20px;
        }

        .switch:hover {
            cursor: pointer;
            scale: 1.1;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
            position: absolute;
        }

        .slider {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: var(--color-border-primary);
            border-radius: 999px;
            transition: all 0.5s ease;
        }

        .slider::before {
            content: "";
            height: 90%;
            aspect-ratio: 1;
            background-color: var(--color-text-primary);
            border-radius: 50%;
            transition: all 0.5s ease;
        }

        input:checked + .slider::before {
            transform: translateX(125%);
        }

        input:checked + .slider {
            background-color: var(--color-accent-primary);
        }

        .input-field {
            display: flex;
            flex-direction: row;
            margin-bottom: 10px;
            align-items: center;
        }

        .reset-button {
            margin-left: 20px;
            margin-top: 20px;
            margin-bottom: 10px;
            border: none;
            border-radius: 50px;
            height: 4vh;
            width: 30vh;
            font-size: 2vh;
            color: var(--color-text-primary);
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            background-color: var(--color-background-app-button);
            transition: all 0.2s ease;
        }

        .reset-button:hover {
            transform: scale(1.05);
            filter: brightness(1.1);
            cursor: pointer;
        }

        #battery-level-text {
            margin-bottom: 5px;
        }

        #airplane-mode-switch {
            height: 25px;
            margin-bottom: 20px;
        }

        #oslogo-switch {
            height: 25px;
            margin-bottom: 20px;
        }

        #network-select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            margin-left: 20px;
            margin-bottom: 20px;
            border: none;
            padding-left: 10px;
            border-radius: 50px;
            height: 30px;
            width: 90px;
            font-size: 14px;
            color: var(--color-text-primary);
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            background-color: var(--color-background-app-button);
            outline: solid 1px var(--color-background-app-button);
            transition: all 0.2s ease;
        }

        #network-select:hover {
            transform: scale(1.1);
            filter: brightness(1.1);
            cursor: pointer;
        }

        #network-select:focus {
            outline: 2px solid var(--color-border-secondary);
        }

        #update-info {
            display: flex;
            flex-direction: column;
            gap: 10px;
            background: var(--color-background-app-info);
            padding: 20px;
            width: auto;
            margin-left: 20px;
            margin-bottom: 10px;
            border-radius: 20px;
            margin-right: 20px !important;
        }

        #commit-info {
            display: flex;
            flex-direction: column;
            gap: 10px;
            background: var(--color-background-app-info);
            padding: 20px;
            width: auto;
            margin-left: 20px;
            border-radius: 20px;
            margin-right: 20px !important;
        }

        #battery-input {
            margin-top: 10px;
        }

        #background-select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            margin-left: 20px;
            margin-bottom: 20px;
            border: none;
            padding-left: 10px;
            border-radius: 50px;
            height: 30px;
            width: 170px;
            font-size: 14px;
            color: var(--color-text-primary);
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            background-color: var(--color-background-app-button);
            outline: solid 1px var(--color-background-app-button);
            transition: all 0.2s ease;
        }

        #background-select:hover {
            transform: scale(1.1);
            filter: brightness(1.1);
            cursor: pointer;
        }

        #background-select:focus {
            outline: 2px solid var(--color-border-secondary);
        }

        #theme-select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            margin-left: 20px;
            margin-bottom: 20px;
            border: none;
            padding-left: 10px;
            border-radius: 50px;
            height: 30px;
            width: 80px;
            font-size: 14px;
            color: var(--color-text-primary);
            font-family: "M PLUS Rounded 1c", sans-serif;
            font-weight: 500;
            background-color: var(--color-background-app-button);
            outline: solid 1px var(--color-background-app-button);
            transition: all 0.2s ease;
        }

        #theme-select:hover {
            transform: scale(1.1);
            filter: brightness(1.1);
            cursor: pointer;
        }

        #theme-select:focus {
            outline: 2px solid var(--color-border-secondary);
        }


#no-connection {
    font-size: 25px;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

#shutdown {
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 0; left: 0; right: 0; bottom: 0;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform 1s ease, opacity 1s ease;
    background-color: var(--color-background-shutdown);
    z-index: 10;
    text-align: center;
}

.oslogo {
    width: 200px;
    aspect-ratio: 1;
    background: url('../assets/logo-transparent.png');
    background-position: center center;
    background-size: cover;
}

#shutdown-text {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 25px;
    font-weight: 500;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: var(--color-text-primary);
    z-index: 11x;
}

#startup {
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 0; left: 0; right: 0; bottom: 0;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform 0.5s ease, opacity 0.5s ease;
    background-color: var(--color-background-shutdown);
    z-index: 30;
    text-align: center;
}

#startup.fade {
    opacity: 0;
}

#startup-text {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 25px;
    font-weight: 500;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: var(--color-text-primary);
    z-index: 31x;
    margin-bottom: 60px;
}

.loading-bar {
    width: 250px;
    height: 30px;
    background-color: var(--color-background-shutdown);
    border: solid 5px;
    border-color: var(--color-text-primary);
    border-radius: 30px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.loading-fill {
    height: 20px;
    background-color: var(--color-text-primary);
    border-radius: 100px;
    animation: fill 2s linear forwards;
    margin: 5px;
}

#login {
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 0; left: 0; right: 0; bottom: 0;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform 1s ease, opacity 1s ease;
    background-color: var(--color-background-primary);
    z-index: 20;
}

#login.slide-up {
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    transform: translateY(-110%);
    box-shadow: 0 10px 40px var(--color-background-overlay-dark);
}

#login.slide-down {
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    transform: translateY(0);
    box-shadow: 0 10px 40px var(--color-background-overlay-dark);
}

#login.fade {
    opacity: 0;
}

#login-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    background-image: url("../assets/wall.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.3;
    z-index: 22;
    border-radius: 40px;
}

.profile-picture {
    width: 200px;
    aspect-ratio: 1;
    background-image: url("../assets/profile.png");
    background-size: 220px;
    background-position: center center;
    margin-bottom: 0px;
    z-index: 23;
    border-radius: 150px;
    border: solid 7px;
    border-color: var(--color-border-profile);
}

#username {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 25px;
    font-weight: 500;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: var(--color-text-primary);
    z-index: 23;
    margin-top: 10px;
}

.start-button {
    width: 150px;
    aspect-ratio: 4;
    background-color: var(--color-background-dark-alpha);
    border-radius: 25px;
    cursor: pointer;
    z-index: 23;
    transition: all 0.2s ease;
    border: solid 2px;
    border-color: var(--color-background-overlay-slight);
}

.start-button:hover {
    filter: brightness(1.2);
    scale: 1.15;
    box-shadow: 0 6px 16px var(--color-background-overlay-dark);
}

.power-button {
    position: absolute;
    background-color: var(--color-background-dark-alpha);
    width: 60px;
    aspect-ratio: 1;
    border: none;
    border-radius: 30px;
    right: 20px;
    bottom: 20px;
    transition: all 0.2s ease;
    z-index: 23;
}

.power-button:hover {
    cursor: pointer;
    filter: brightness(1.2);
    scale: 1.15;
}

#shutdown-window, #restart-window, #logout-window{
    animation: fly-in 0.2s forwards;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 20px;
    position: absolute;
    right: 30px;
    bottom: 100px;
    width: 250px;
    height: 100px;
    border-radius: 25px;
    background-color: var(--color-background-dark-alpha);
    z-index: 200;
}

#shutdown-window.out, #restart-window.out, #logout-window.out {
    animation: fly-out 0.2s forwards;
}

.alert-text {
    color: var(--color-text-primary);
    font-size: 18px;
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 500;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin: 0;
}

.confirm-button {
    margin-top: 10px;
    margin-right: 10px;
    height: 30px;
    width: 50px;
    border: none;
    border-radius: 15px;
    background-color: var(--color-background-app-button);
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--color-text-secondary);
}

.confirm-button:hover {
    scale: 1.1;
    cursor: pointer;
}

#main-content {
    width: 100%;
    height: 100%;
    background-image: url("../assets/wall.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    transition: all 1s ease;
}

.app {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 1;
}

.icon {
    aspect-ratio: 1;
    border-radius: 20px;
    transition: all 0.1s ease-out;
    cursor: pointer;
    border: none;
    background: none;
}

.app-name {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 500;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: var(--color-text-primary);
    margin-top: 5px;
}

#logo-large {
    position: absolute;
    width: 300px;
    aspect-ratio: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url("../assets/logo-gray-transparent.png");
    background-position: center center;
    background-size: cover;
    z-index: 0;
    opacity: 40%;
}
#logo-large.hidden {
    display: none;
}

.top-bar {
    width: 100vw;
    height: 40px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.infobox {
    display: flex;
    flex-direction: row;
    height: 70%;
    justify-content: center;
    align-items: center;
    background-color: var(--color-background-overlay-medium);
    border-radius: 25px;
    width: auto;
    gap: 10px;
    padding-left: 20px;
    padding-right: 20px;
    margin-right: 10px;
}
.top-bar-text {
    color: var(--color-text-primary);
    font-size: 14px;
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 500;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
#battery {
    margin-right: 15px;
}

#app-window-container {
    position: fixed;
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0; bottom: 0; left: 0; right: 0;
    z-index: 100;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    padding-top: 7vh;
}

#app-window-container.visible {
    opacity: 1;
    pointer-events: none;
}

.app-window {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 80vw;
    height: 80vh;
    background-color: var(--color-background-primary);
    border-radius: 25px;
    transform: translateY(100%) perspective(200px) rotateX(15deg);
    opacity: 0;
    transition: all 0.5s ease;
    overflow: hidden;
    min-height: 250px;
    min-width: 500px;
    user-select: none;
}

.app-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.app-window.closing {
    transform: translateY(100%) perspective(200px) rotateX(15deg);
    opacity: 0;
}

.app-window.focused {
    outline: 2px solid var(--color-text-primary-opacity);
}

.app-window.fullscreen {
    transition: all 0.3s ease;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    margin: 0;
    border-radius: 0 !important;
}


.app-window-top-bar {
    width: 100%;
    height: 6vh !important;
    border-top-right-radius: 25px;
    border-top-left-radius: 25px;
    background-color: var(--color-background-dark-alpha);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    transition: all 0.3s ease;
    flex-shrink: 0; 
}

.app-window.fullscreen .app-window-top-bar {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.app-title {
    position: absolute;
    font-size: 3vh;
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 500;
    color: var(--color-text-primary);
    left: 30px;
}

.close-button {
    height: 100%;
    aspect-ratio: 1.2;
    border: none;
    border-top-right-radius: 25px;
    background: none;
    justify-content: center;
    align-items: center;
    display: flex;
}

.fullscreen .close-button  {
    border-top-right-radius: 0px !important;
}

.close-button:hover {
    background: var(--color-text-danger);
    cursor: pointer;
}

.minimize-button {
    height: 100%;
    aspect-ratio: 1.2;
    border: none;
    background: none;
    justify-content: center;
    align-items: center;
    display: flex;
}

.minimize-button:hover {
    background: var(--color-background-overlay-dark);
    cursor: pointer;
}

.fullscreen-button {
    height: 100%;
    aspect-ratio: 1.2;
    border: none;
    background: none;
    justify-content: center;
    align-items: center;
    display: flex;
}

.fullscreen-button:hover {
    background: var(--color-background-overlay-dark);
    cursor: pointer;
}

.fa-xmark {
    font-size: 3vh;
    color: var(--color-text-primary);
}

.button-icon {
    color: var(--color-text-primary);
    font-size: 2.6vh;
}

/* Mobile/Tablet */

@media (max-width: 730px) {
    body.age > #age {
        transform: scale(0.75);
    }

    .app-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 20px;
    }

    .app {
        width: 90px;
        height: 100px;
    }

    .fullscreen-button {
        display: none;
    }

    .app-window {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100vw;
        height: 100vh;
        margin: 0;
        overflow: hidden;
        border-radius: 0px;
    }

    .app-window.focused {
        outline: none;
    }

    .app-window-top-bar {
        border-radius: 0px;
    }

    .close-button {
        border-radius: 0px;
    }

    .icon {
        width: 80px;
        aspect-ratio: 1;
    }

    .top-bar {
        justify-content: center;
    }

    .taskbar-container {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        width: 100%;
        height: 100px;
        bottom: 0;
    }

    .taskbar {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 75px;
        width: 100%;
        background-color: var(--color-background-overlay-medium);
        border-radius: 20px;
        margin-left: 10px; margin-right: 10px;
    }
    #homebutton {
        height: 80%;
        aspect-ratio: 1;
        background-image: url("../assets/logo-transparent.png");
        background-position: center center;
        background-size: cover;
        z-index: 2;
        transition: all 0.1s;
    }
    #homebutton:hover {
        transform: translate(0px, -5px) scale(1.1);
        cursor: pointer;
    }

    #start-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        bottom: 100px;
        left: 10px; right: 10px;
        height: auto;
        background-color: var(--color-background-primary);
        border-radius: 20px;
        padding-bottom: 20px;
        padding-top: 10px;
        opacity: 0;
        transform: translateY(20px);
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 9999 !important;
    }

    #start-menu.active {
        opacity: 1;
        transform: translateY(0px);
        pointer-events: auto;
        z-index: 9999 !important;
    }

    .start-menu-logo {
        display: none;
    }

    .start-menu-button {
        padding-left: 25px;;
        text-align: left;
        font-size: 14px;
        font-family: "M PLUS Rounded 1c", sans-serif;
        font-weight: 500;
        color: var(--color-text-primary);
        width: 100%;
        border: none;
        height: 40px;
        background-color: rgba(0,0,0,0);
        transition: all 0.2s ease;
    }

    .start-menu-button:hover {
        cursor: pointer;
        background-color: var(--color-background-overlay-light);
    }

    .start-menu-button i {
        margin-right: 10px;
    }

    .searchbar {
        display: none;
    }
    #search-icon {
        display: none;
    }
    .hideicon {
        display: none;
    }
    .tb-icon {
        display: none;
    }

    /* Apps */

        #settings-sidebar {
            width: 100%;
        }

        #settings-sidebar.hidden {
            display: none;
        }

        #settings-content {
            display: none;
            width: 100%;
            max-height: 82vh !important;
        }

        #settings-content.active {
            display: flex;
            animation: open 0.3s;
        }

        .back-button {
            height: 35px;
            aspect-ratio: 1;
            border: none;
            border-radius: 50%;
            background-color: var(--color-background-overlay-light);
            color: var(--color-text-primary);
        }

        .back-button:hover {
            cursor: pointer;
            transform: scale(1.1);
            filter: brightness(1.2);
            box-shadow: 0 6px 16px var(--color-background-overlay-dark);
        }

        .content-title {
            font-size: 17px;
        }

        #no-connection {
            font-size: 13.8px;
        }

        #aboutme-window-content {
            overflow: scroll;
        }

        #aboutme-cards-container {
            display: flex;
            flex-direction: column;
        }
        #aboutme-bio-container {
            padding-left: 5%;
            padding-right: 5%;
        }

        .aboutme-card {
            max-width: 90%;
            width: 90%;
            height: auto;
        }

        .big-content-title {
            font-size: 6vw;
        }

        #birthday-countdown-container {
            flex-direction: column;
        }

        .countdown-box {
            width: 50vw;
        }

        .skills-bar {
            width: 90%;
            height: 35px;
        }

        #contact-form-container {
            width: 90%;
        }

        .app-window-content {
            overflow-y: scroll;
            -webkit-overflow-scrolling: touch;
            max-height: none;
            overflow-y: auto;
            touch-action: auto;
            height: auto;
            flex-grow: 1;
        }

}

@media (max-width: 350px) {
    .app {
        width: 80px;
        height: 90px;
    }

    .icon {
        width: 60px;
        aspect-ratio: 1;
    }

    #no-connection {
            font-size: 11px;
        }

}

@media (max-width: 320px) {
    .app {
        width: 70px;
        height: 80px;
    }

    .icon {
        width: 50px;
        aspect-ratio: 1;
    }

    .app-name {
        font-size: 12px;
    }

    .top-bar-text {
        font-size: 10px;
    }
}

/* Tablet/Laptop/PC */

@media (min-width: 730px) {
    .app-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 70%;
        gap: 20px;
        padding-left: 20px;
    }

    .icon:hover {
        transform: scale(1.1);
        filter: brightness(1.2);
        box-shadow: 0 6px 16px var(--color-background-overlay-dark);
    }

    .taskbar-container {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        width: 100%;
        height: 100px;
        bottom: 0;
    }

    .taskbar {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-direction: row;
        height: 75px;
        width: 100%;
        background-color: var(--color-background-overlay-medium);
        border-radius: 20px;
        gap: 20px;
        margin-left: 30px;
        margin-right: 30px;
    }

    .tb-icon {
        height: 80%;
        aspect-ratio: 1;
        border-radius: 15px;
        transition: all 0.1s ease-out;
        border: none;
        background: none;
    }
    .tb-icon:hover {
        transform: translate(0px, -5px) scale(1.1);
        filter: brightness(1.2);
        box-shadow: 0 6px 16px var(--color-background-overlay-dark);
        cursor: pointer;
    }

    #homebutton {
        margin-left: 20px;
        height: 80%;
        aspect-ratio: 1;
        background-color: rgba(0, 0, 0, 0);
        border: none;
        background-image: url("../assets/logo-transparent.png");
        background-position: center center;
        background-size: cover;
        z-index: 2;
        transition: all 0.1s;
    }
    #homebutton:hover {
        transform: translate(0px, -5px) scale(1.1);
        filter: brightness(1.2);
        cursor: pointer;
    }

    #start-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        bottom: 100px;
        margin-left: 30px;
        width: 300px;
        height: auto;
        background-color: var(--color-background-dark-alpha);
        border-radius: 20px;
        padding-bottom: 20px;
        padding-top: 10px;
        opacity: 0;
        transform: translateY(20px);
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 5;
    }

    #start-menu.active {
        opacity: 1;
        transform: translateY(0px);
        pointer-events: auto;
    }

    .start-menu-logo {
        width: 100px;
        aspect-ratio: 1;
        background: url('../assets/logo-transparent.png');
        background-position: center center;
        background-size: cover;
        margin: 0;
        margin-bottom: 20px;
    }

    .start-menu-button {
        padding-left: 25px;;
        text-align: left;
        font-size: 14px;
        font-family: "M PLUS Rounded 1c", sans-serif;
        font-weight: 500;
        color: var(--color-text-primary);
        width: 100%;
        border: none;
        height: 40px;
        background-color: rgba(0,0,0,0);
        transition: all 0.2s ease;
    }

    .start-menu-button:hover {
        cursor: pointer;
        background-color: var(--color-background-overlay-light);
    }

    .start-menu-button i {
        margin-right: 10px;
    }

    .searchbar {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 150px;
        height: 60%;
        background-color: var(--color-background-app-button);
        border-radius: 25px;
        padding-left: 20px;
        padding-right: 20px;
        border: none;
        outline: none;
        color: var(--color-text-primary);
        font-size: 15px;
        transition: all 0.5s;
    }
    .searchbar:focus {
        box-shadow: inset 0 0 0 2px var(--color-text-primary);
    }
    .app {
        width: 110px;
        height: 120px;
    }

    .icon {
        width: 90px;
        aspect-ratio: 1;
    }

    /* Apps */
    #settings-content {
        display: flex;
    }

    .back-button {
            display: none;
        }
}

/* Spacings Fix */

@media (max-width: 800px) {
    #skills-sm {
        display: none;
    }
}

@media (max-width: 885px) {
    #websites-sm {
        display: none;
    }
}

@media (max-width: 885px) {
    #gallery-sm {
        display: none;
    }
}

@media (max-width: 975px) {
    #gallery-sm {
        display: none;
    }
}

@media (max-width: 1052px) {
    #github-sm {
        display: none;
    }
}

@media (max-width: 1140px) {
    #contact-sm {
        display: none;
    }
}

/* Icons */

#github, #github-sm{
    background-image: url('../assets/github.jpg');
    background-position: center center;
    background-size: cover;
}

#aboutme, #aboutme-sm {
    background-image: url('../assets/aboutme.png');
    background-position: center center;
    background-size: cover;
}

#projects, #projects-sm {
    background-image: url('../assets/projects.png');
    background-position: center center;
    background-size: cover;
}

#skills, #skills-sm {
    background-image: url('../assets/skills.png');
    background-position: center center;
    background-size: cover;
}

#websites, #websites-sm {
    background-image: url('../assets/websites.png');
    background-position: center center;
    background-size: cover;
}

#contact, #contact-sm {
    background-image: url('../assets/contact.png');
    background-position: center center;
    background-size: cover;
}

#gallery, #gallery-sm {
    background-image: url('../assets/gallery.png');
    background-position: center center;
    background-size: cover;
}

#documents, #documents-sm {
    background-image: url('../assets/documents.png');
    background-position: center center;
    background-size: cover;
}

#settings, #settings-sm {
    background-image: url('../assets/settings.png');
    background-position: center center;
    background-size: cover;
}

/* Animations */

@keyframes fill {
  from {
    width: 10%;
  }
  to {
    width: 100%;
  }
}

@keyframes open {
            from {
                transform: translateX(100px);
            }
            to {
                transform: translateX(0);
            }
        }

@keyframes close {
            from {
                transform: translateX(-100px);
            }
            to {
                transform: translateX(0);
            }
        }

@keyframes fly-in {
  from {
    transform: translateX(500px);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fly-out {
  from {
    transform: translateX(0px);
  }
  to {
    transform: translateX(500px);
  }
}