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

body, html {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
}

.main-content {
    position: relative;
    background-color: var(--option1);
    height: 100%;
    width: calc(100% - 250px); 
    margin-left: 250px;
}

.blank {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    color: var(--black);

}
.blank i{
    font-size: 4rem;
    opacity: .2;
}
.blank h1 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    /* margin-top: -1rem; */
    opacity: .5;
    font-size: 14px;
}

.content {
    display: grid;
    /* align-items: center; */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: min-content;
    gap: 1rem;
    overflow-y: auto;
    height: calc(100vh - 5rem); 
    width: 100%;
    /* background: #000; */
    /* margin-top: 5rem; */
    padding-block: 2rem;
    margin-top: 5.2rem;
    padding-inline: 2rem;
}

.content .note-card {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 10rem;
    aspect-ratio: 16 / 9; 
    background-color: var(--option3);
    border-radius: .5rem;
    border: 1px solid var(--option2);
    margin-inline: auto;
    padding: 10px 10px;
    overflow: hidden;
    transition: .2s ease-out;
    cursor: pointer;
}

.note-card .note-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5rem;
    background: linear-gradient(to top, var(--option3) 40%, transparent);
    z-index: 5;
}

.note-card h3 {
    font-weight: 600;
    color: var(--black-07);
    margin-bottom: .5rem;
    font-size: 16px;
}

.note-card p {
    font-weight: 400;
    color: var(--black-05);
    margin-top: .2rem;
    font-size: 14px;
    line-height: 1.4;
}

.line-card {
    width: 100%;
    height: 1px;
    background-color: var(--option2);
    border-radius: 100rem;
    margin-inline: auto;
    margin-block: .4rem;
}

.line-card-note {
    width: 100%;
    height: 1.5px;
    background-color: var(--option2);
    border-radius: 100rem;
    margin-inline: auto;
    margin-top: -.2rem;
    opacity: .6;
}

.delete-note-card {
    position: absolute;
    bottom: .5rem;
    right: .5rem;
    cursor: pointer;
    padding: 5px;
    opacity: 0;
    pointer-events: none;
    transition: .2s ease-out;
    border: none;
    background-color: transparent;
    color: var(--option4);
}

.delete-note-card:hover {
    color: var(--black);
}

.note-card:hover {
    box-shadow: 0px 4px 10px var(--black-05);
}

.note-card:hover .delete-note-card {
    opacity: 1;
    pointer-events: all;
}

/* Note */
.note {
    position: absolute;
    display: flex;
    flex-direction: column;
    left: 50%;
    top: 51%;
    transform: translateX(-50%) translateY(-50%);
    background-color: var(--option3);
    border: 1px solid var(--option2);
    border-radius: .5rem;
    padding: 15px 20px;
    z-index: 100;
    max-width: 40%;
    width: 100%;
    max-height: 60%;
    height: 100%;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.note.show {
    opacity: 1;
    pointer-events: all;
}

.note .title {
    display: flex;
    justify-content: space-between;
}

.note h3 {
    font-weight: 500;
    font-size: 18px;
    margin: 0;
    color: var(--black);
}

.note .title button {
    border: none;
    background-color: transparent;
    color: var(--option4);
    cursor: pointer;
    transition: .2s ease-out;
}

.note .title button:hover {
    color: var(--black);
}

.note p {
    font-size: 14px;
    margin: 0;
    color: var(--black);
}

.buttons-note {
    position: absolute;
    display: flex;
    justify-content: end;
    align-items: center;
    padding-inline: 1.5rem;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5rem;
    background: linear-gradient(to top, var(--option3) 40%, transparent);
    z-index: 2;
}

.buttons-note button {
    padding: 8px 15px;
    background-color: transparent;
    border: none;
    border-radius: .4rem;
    outline: none;
    color: var(--option4);
    cursor: pointer;
    transition: .2s ease-out;
}

.buttons-note button:hover {
    color: var(--primary);
}

.buttons-note button.save-note {
    background-color: var(--option2);
    color: var(--option4);
    cursor: pointer;
    transition: .2s ease-out;
}

.buttons-note button.save-note.change {
    color: var(--white);
    background-color: var(--primary);
}

.cancel-note {
    margin-right: .5rem;
}

/* Form */
.form {
    position: absolute;
    display: flex;
    flex-direction: column;
    left: 50%;
    top: 51%;
    transform: translateX(-50%) translateY(-50%);
    background-color: var(--white);
    border-radius: .5rem;
    padding: 15px 20px;
    z-index: 1000;
    max-width: 40%;
    width: 100%;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    background-color: var(--option3);
    border: 1px solid var(--option2);
    color: var(--black);
}

.form .form-buttons {
    display: flex;
    justify-content: end;
    gap: 1rem;
}

.form-buttons button {
    padding: 8px 15px;
    background-color: transparent;
    border: none;
    border-radius: .4rem;
    outline: none;
    color: var(--primary);
    cursor: pointer;
}

.form-buttons .submit-btn, .delete-confirm, .ok-btn {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: white;
    transition: .4s ease-in-out;
}

.form-buttons .submit-btn:hover {
    background-color: transparent;
    color: var(--primary);
}

.dark-layer {
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: var(--black-05);
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.dark-layer.show, .form.show {
    opacity: 1;
    pointer-events: all;
    transition: .2s ease-in-out;
}

.blur-layer {
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: var(--black-05);
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: .2s ease-in-out;
}

.blur-layer.show {
    backdrop-filter: blur(10px);
    opacity: 1;
    pointer-events: all;
}

.form.show {
    top: 50%;
}

/* Note Full Editor */
.edit-note-content {
    resize: none;
    max-height: 15rem;
    height: 100%;
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--black);
}

.edit-note-title {
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 18px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--black);
}

.edit-note-title:focus {
    border-bottom: 1px solid var(--black-05);
}

@media (max-width: 1200px) {
    .note {
        max-width: 50%;
    }
    .content {
        margin-top: 5rem;
    }
    .form, .note {
        max-width: 60%;
    }
}

@media (max-width: 800px) {
    .note {
        max-width: 60%;
    }
    .content {
        margin-top: 5rem;
    }
    .form, .note {
        max-width: 65%;
    }
    .delete-note-card {
        opacity: 1;
        pointer-events: all;
    }
}

@media (max-width: 620px) {
    .main-content {
        width: 100%; 
        margin-left: 0;
    }
    .content {
        margin-top: 5rem;
    }
    .blank {
        top: 30%;
    }
    .form, .note {
        max-width: 70%;
    }
}