:root {
    --header-color: #E60073;
    --button-color: #C062C7;
    --notebox-color: #D78FEE;
    --background-color: #FFF0F6;
    --pop-up-background: rgba(0,0,0,0.2);
    --pop-up-box-color: rgba(245, 224, 255, 0.9);
    --text-color: #333;
    --border-color: #D3D3D3;
    --footer-text-color: rgba(51, 51, 51, 0.3);
}

html, body {
height: 100%;
}
body {
    font-family: Trebuchet MS, Arial, sans-serif;
    display: flex;
    height: 100vh;
    margin: 5px;
    background-color: var(--background-color);
    justify-content: flex-start;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}
h1 {
    color: var(--header-color);
    font-size: 48px;
}
.newNoteBTN {
    width: 150px;
    height: 50px;
    border-radius: 8px;
    background-color: var(--button-color);
    color: var(--text-color);
    font-size: 16px;
    text-align: center;
    line-height: 50px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
#newNoteBTN:hover {
    background-color: var(--header-color);
    transform: scale(1.1);
}
.noteBox {
    display: none;
    color: var(--text-color);
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--pop-up-background);
    padding-top: 60px;
}
.noteBoxContent {
    background-color: var(--pop-up-box-color);
    justify-content: center;
    margin: 3% auto;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}
.noteBoxContent h2 {
    text-align: center;
}
.noteInput {
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    margin-bottom: 10px;
}
.noteInput.noteContent {
    font-family: 'Trebuchet MS';
    min-height: 15vh;       /* start size */
    max-height: 60vh;       /* grow until this */
    overflow-y: auto;       /* show scrollbar only after max-height */
}
.noteContent{
    resize: none;
}
.buttonContainer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.noteBoxButton {
    width: 48%;
    height: 40px;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.saveNoteBox {
    background-color: #C062C7;
    color: #333;
}
.saveNoteBox:hover {
    background-color: #f9a1ff;
}
.closeNoteBox {
    background-color: #888;
    color: #FFF5EA;
}
.closeNoteBox:hover {
    background-color: #666;
}
.noteContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, 200px);
    gap: 10px;
    max-width: 1000px;
    width: 100%;
    margin-top: 20px;
    justify-content: center;
    flex: 1 0 auto;
}
.note {
    background-color: var(--notebox-color);
    border: 1px solid #D3D3D3;
    border-radius: 5px;
    padding: 10px;
    color: var(--text-color);
    word-wrap: break-word;
    height: 150px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.note:hover {
    transform: scale(1.05);
}
.note h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.note p {
    margin: 0;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}
.note-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.note:hover .note-actions {
    opacity: 1;
    visibility: visible;
}
.note-action-btn {
    width: 60px;
    height: 25px;
    border-radius: 3px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.delete-btn {
    background-color: var(--header-color);
    color: #FFF5EA;
}
.delete-btn:hover {
    background-color: #CC3333;
}
.deleteBox {
    display: none;
    color: var(--text-color);
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    padding-top: 60px;
}
.deleteBoxContent {
    background-color: var(--pop-up-box-color);
    margin: 3% auto;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.deleteBoxContent p {
    margin: 0 0 20px 0;
    font-size: 16px;
    text-align: center;
}
.deleteBoxButton {
    width: 100px;
    height: 40px;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.confirmDelete {
    background-color: var(--header-color);
    color: var(--text-color);
}
.confirmDelete:hover {
    background-color: #CC3333;
}
.cancelDelete {
    background-color: #888;
    color: var(--text-color);
}
.cancelDelete:hover {
    background-color: #666;
}

footer {
color: var(--footer-text-color);
margin-top: auto;
padding: 1rem;
text-align: center;
}