* {
    box-sizing: border-box;
}

body {
    background-color: rgb(14, 18, 24);
    font-family: Consolas, "Courier New", monospace;
    margin: 0px;
    color: rgb(214, 222, 230);
}

.headerborder {
    height: 2px;
    width: 100%;
    padding: 1px 0px;
    border: 0px;
    margin: 0px;
    background-color: rgb(64, 76, 90);
}

h1 {
    color: rgb(214, 222, 230);
    margin-bottom: 0px;
    margin-top: 0px;
    margin-left: 20px;
    font-weight: bold;
    padding: 0px;
    width: 100%;
}

.header {
    background-color: rgb(34, 42, 54);
    width: 100%;
    margin: 0px;
    padding: 0px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 20;
}

.main {
    position: relative;
    top: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.box1 {
    border-radius: 20px;
    padding: 5px;
    width: 300px;
    height: 150px;
    font-size: 20px;
    background-color: rgba(34, 42, 54, 0.5);
    text-align: center;
    color: rgb(214, 222, 230);
    background-image: url('https://static.vecteezy.com/system/resources/previews/067/525/681/non_2x/abstract-dark-blue-dotted-grid-pattern-with-white-crosshairs-modern-futuristic-background-for-data-science-mapping-interface-design-engineering-and-digital-measurement-visualization-vector.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    transition: all 0.3s ease;
    background-blend-mode: screen;
    position: relative;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.box1::after , .box1::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: conic-gradient(from var(--angle), red, orange, yellow, green, rgb(0, 132, 255), rgb(248, 4, 248), red);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    padding: 5px;
    border-radius: 20px;
    animation: rotate 3s linear infinite;
}

.box1::before {
    filter: blur(1.2rem);
    opacity: 0.7;
}

@keyframes rotate {
    from {
        --angle: 0deg;
    }
    to {
        --angle: 360deg;
    }
}

    .box1:hover {
        box-shadow: 4px 4px 30px 20px rgb(64, 76, 90);
        font-size: 21px;
        width: 320px;
        height: 170px;
        padding: 15px;
        background-size: 101%;
    }

.sidebar {
    width: 5vw;
    min-width: 40px;
    background-color: rgb(34, 42, 54);
    border: 4px solid rgb(64, 76, 90);
    position: fixed;
    top: 44px;      /* sits just under the header */
    bottom: 0;      /* replaces height: 100vh, which caused page overflow */
    left: -4px;
    z-index: 10;
    transition: width 0.4s ease;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-content: center;
    white-space: nowrap;
    text-align: center;
}

.sidebar-content {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.sidebar:hover {
    width: 15vw;
    min-width: 160px;
    color: rgb(214, 222, 230);
}

    .sidebar:hover .sidebar-content {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

.sidebarlist {
    list-style: none;
    padding: 20px 0px;
    font-size: 22px;
    font-weight: 700;
    color: rgb(214, 222, 230);
    width: 100%;
}

.sidebarlist:hover {
    background-color: rgba(64, 76, 90, 0.5);
}
.sidebarlistend {
    list-style: none;
    padding: 20px 0px;
    font-size: 22px;
    font-weight: 700;
    color: rgb(214, 222, 230);
    width: 100%;
}

    .sidebarlist a {
        color: rgb(214, 222, 230);
        text-decoration: none;
    }

#sidebarheader {
    font-size: x-large;
    padding: 10px;
}

/* Login: centred in the viewport below the fixed header (no more top:200px hacks) */
.loginpage {
    min-height: 100vh;
    padding-top: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.box2 {
    border: 5px solid rgb(64, 76, 90);
    border-radius: 20px;
    padding: 20px 5px;
    width: 300px;
    max-width: 90vw;
    min-height: 300px;   /* grows if the error message needs room */
    font-size: 20px;
    box-shadow: 4px 4px 17px rgb(64, 76, 90);
    background-color: rgba(34, 42, 54, 0.5);
    text-align: center;
    color: rgb(214, 222, 230);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loginform {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

input {
    padding: 7px;
    margin: 10px;
    border: 4px solid rgb(64, 76, 90);
    border-radius: 10px;
    outline: none;
    background-color: azure;
    color: rgb(14, 18, 24);
    font-family: inherit;
    width: 90%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    input:focus {
        transform: translateY(-2px);
        box-shadow: 0px 6px 7px rgba(0, 0, 0, 0.7);
        outline: none;
    }

button {
    padding: 7px;
    margin: 10px;
    width: 60%;
    border: 4px solid rgba(34, 42, 54, 0.5);
    border-radius: 10px;
    background-color: rgb(64, 76, 90);
    color: rgb(214, 222, 230);
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    button:hover {
        transform: scale(1.1);
        box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.7);
    }

    button:focus-visible {
        outline: 2px solid rgb(214, 222, 230);
        outline-offset: 2px;
    }

.error {
    margin: 0;
    font-size: 14px;
    color: rgb(255, 120, 120);
}
.todobox {
    position: relative;
    top: 100px;
    left: 300px;
    height: 200px;
    width: 300px;
    background-color: rgba(34, 42, 54, 0.5);
    border: 3px solid rgb(64, 76, 90);
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.todobox::before {
    content: "";
    position: absolute;
    top: 0;
    left: -30px;
    width: 6px;
    height: 100%;
    background-color: rgb(64, 76, 90);
    border-radius: 3px;
}

.todobox:hover {
    transform: perspective(1000px) rotateY(20deg);
    box-shadow: 20px 0px 20px rgba(0, 0, 0, 0.7);
}

.todobox:hover::before {
    transform: perspective(1000px) rotateY(0deg);
}

.todopage {
    width: 80%;
}

.ptodo {
    padding: 10px;
    text-align: center;
    font-size: 18px;
    width: 100%;
}
