@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root[data-ui="default"] {
    --container-active: var(--container-color);
    --accent-active: var(--accent-color);
}
:root[data-ui="glass"] {
    --container-active: var(--container-glass);
    --accent-active: var(--accent-glass);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    outline: none;
    border: none;
}

body[data-theme="lumen"] {
    --background-color: #ffd0d0;
    --container-color: #fcfcfc;
    --container-glass: #fcfcfc66;
    --accent-color: #c9edfd;
    --accent-glass: #c9edfd66;
    --text-color: #443e3e;
    --border-color: none;
}
body[data-theme="aether"] {
    --background-color: #FFD9DA;
    --container-color: #FFF8F4;
    --container-glass: #FFF8F466;
    --accent-color: #FBE4C9;
    --accent-glass: #FBE4C966;
    --text-color: #3E2E2A;
    --border-color: none;
}
body[data-theme="blossom"] {
    --background-color: #ffb9cb;
    --container-color: #ffd7e1;
    --container-glass: #ffd7e166;
    --accent-color: #eeb8cd;
    --accent-glass: #eeb8cd66;
    --text-color: #79264c;
    --border-color: none;
}
body[data-theme="verdance"] {
    --background-color: #b2ffc5;
    --container-color: #f1fdf5;
    --container-glass: #f1fdf566;
    --accent-color: #c7e6bf;
    --accent-glass: #eeb8cd66;
    --text-color: #1c6826;
    --border-color: none;
}
body[data-theme="halo"] {
    --background-color: #fffab2;
    --container-color: #fffde7;
    --container-glass: #fffde766;
    --accent-color: #fff59e;
    --accent-glass: #fff59e66;
    --text-color: #706f1d;
    --border-color: none;
}
body[data-theme="obsidian"] {
    --background-color: #121417;
    --container-color: #1E2025;
    --container-glass: #1E202566;
    --accent-color: #2E3138;
    --accent-glass: #2E313866;
    --text-color: #c3cad3;
    --border-color: none;
}
body[data-theme="nyx"] {
    --background-color: #151c27;
    --container-color: #1a2236;
    --container-glass: #1a223666;
    --accent-color: #273147;
    --accent-glass: #27314766;
    --text-color: #b3bece;
    --border-color: none;
}
body[data-theme="ember"] {
    --background-color: #271515;
    --container-color: #361a1a;
    --container-glass: #361a1a66;
    --accent-color: #46281c;
    --accent-glass: #46281c66;
    --text-color: #e08e8e;
    --border-color: none;
}
body[data-theme="grave"] {
    --background-color: #161616;
    --container-color: #1f1f1f;
    --container-glass: #1f1f1f66;
    --accent-color: #2b2b2b;
    --accent-glass: #2b2b2b66;
    --text-color: #a7a7a7;
    --border-color: none;
}
body[data-theme="eclipse"] {
    --background-color: #170d1d;
    --container-color: #1a0f27;
    --container-glass: #1a0f2766;
    --accent-color: #2e1c3d;
    --accent-glass: #2e1c3d66;
    --text-color: #b486da;
    --border-color: none;
}

body[data-border="sharp"] {
    --border-radius: 0px;
}
body[data-border="rounded"] {
    --border-radius: 6px;
}
body[data-border="bubble"] {
    --border-radius: 20px;
}

body[data-spacing="compact"] {
    --gap: 0.2rem;
}
body[data-spacing="comfortable"] {
    --gap: 0.5rem;
}
body[data-spacing="spaced"] {
    --gap: 0.75rem;
}

body[data-ui="default"] {
    --container-active: var(--container-color);
    --accent-active: var(--accent-color);
    --shadow: none;
    --blur: none;
    --border: none;
}
body[data-ui="glass"] {
    --container-active: var(--container-glass);
    --accent-active: var(--accent-glass);
    --shadow: 1px 1px 3px var(--accent-color);
    --blur: blur(3px);
    --border: 2px solid var(--accent-active);
}
body[data-ui="minimalist"] {
    --container-active: none;
    --accent-active: var(--accent-color);
    --shadow: none;
    --blur: none;
    --border: none;
}

body, html {
    font-size: var(--font-size);
    height: 100vh;
    background: var(--background-color);
}

.container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 1rem;
    gap: var(--gap);
}

.sidebar {
    display: flex;
    flex-direction: column;
    width: 250px;
    height: 100%;
    background-color: var(--container-active);
    border-radius: var(--border-radius);
    backdrop-filter: var(--blur);
    box-shadow: var(--shadow);
    border: var(--border);
}

.title {
    display: flex;
    align-items: center;
    margin: 1rem;
    padding: 0 0 0.5rem 0;
    border-bottom: dashed 3px var(--accent-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.subtitle {
    display: flex;
    align-items: center;
    margin: 0 0 var(--gap) 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.sidebar .sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    flex: 1;

}

.sidebar button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 1rem;
    margin-top: var(--gap);
    background-color: transparent;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 90%;
}

.sidebar button.active {
    background-color: var(--accent-active);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
}

.sidebar button .text {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-color);
}

.sidebar button span {
    color: var(--text-color);
}

.sidebar .settings-button {
    margin-top: auto;
    margin-bottom: 0.5rem;
}

.content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    background-color: var(--container-active);
    border-radius: var(--border-radius);
    color: var(--text-color);
    backdrop-filter: var(--blur);
    box-shadow: var(--shadow);
    border: var(--border);
    padding-bottom: 1rem;
}

.settings {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    max-height: 100%;
    overflow-y: scroll;
}

.settings .setting {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0 1rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: var(--container-active);
    backdrop-filter: var(--blur);
    box-shadow: var(--shadow);
    border: var(--border);
    border-radius: var(--border-radius)
}

.settings .setting select {
    appearance: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--border-radius);
    box-shadow: inset 1px 1px 2px var(--accent-active);
    padding: 0.25rem;
    font-size: 0.8rem;
    width: auto;
}

.settings .setting select option {
    background-color: var(--background-color);
    color: var(--text-color);
    border: none;
    font-size: 0.7rem;
}

.settings .setting input[type="range"] {
    appearance: none;
    height: 2px;
    background-color: var(--accent-color);
    cursor: pointer;
}

.settings .setting input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    height: 6px;
    width: 4px;
    background-color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.data-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 0.5rem;
    margin: 0 1rem;
}

.delete-data-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    width: fit-content;
    background-color: var(--accent-active);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    cursor: pointer;
    border: var(--border);
}

.update-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    width: fit-content;
    background-color: var(--accent-active);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    cursor: pointer;
    border: var(--border);
}

.create-note-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
    width: 100px;
    padding: 0.25rem;
    background-color: var(--accent-active);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    cursor: pointer;
    border: var(--border);
}

.note-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    margin: 1rem 1rem 0 1rem;
    gap: var(--gap);
    max-height: 100%;
    overflow-y: scroll;
    padding-right: 0.5rem;
}

.note-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--accent-active);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: var(--blur);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
    border: var(--border);
}

.note-card.expanded {
    max-height: 1000px;
}

.note-card.expanded .note-actions {
    margin-top: 0.25rem;
    height: 50px;
    opacity: 1;
    visibility: visible;
}

.note-card .note-name {
    margin: 0;
}

.note-card .favourited-icon {
    position: absolute;
    right: 0;
    margin-right: 0.5rem;
    display: none;
}

.note-card.favourited .favourited-icon {
    display: flex;
    font-variation-settings:
    'FILL' 1;
    color: #ff3333;
}

.favourite-note-btn.favourited {
    display: flex;
    font-variation-settings:
    'FILL' 1;
    color: #ff3333;
}

.note-content {
    font-size: 0.8rem;
    height: 100%;
    width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    max-height: 3em;
    overflow: hidden;
    transition: all 0.2s ease;
}

.note-card.expanded .note-content {
    max-height: 1000px;
}

.note-actions {
    margin-top: 0.25rem;
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    opacity: 0;
    height: 0px;
    visibility: hidden;
    transition: all 0.2s ease;
}

.note-actions .note-action-btn {
    display: flex;
    align-items: center;
    background-color: transparent;
    padding: 0.25rem;
    cursor: pointer;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal {
    display: flex;
    flex-direction: column;
    background: var(--container-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow);
    border: var(--border);
}

.modal input {
    color: var(--text-color);
    background-color: var(--accent-active);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    border: var(--border);
    font-size: 0.9rem;
}

.modal textarea {
    color: var(--text-color);
    background-color: var(--accent-active);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    resize: vertical;
    max-height: 350px;
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    border: var(--border);
    font-size: 0.9rem;
}

.modal-actions {
  margin-top: var(--gap);
  display: flex;
  justify-content: flex-end;
  gap: var(--gap);
}

.modal-actions button {
    background-color: var(--accent-active);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    border: var(--border);
    cursor: pointer;
}

.hidden {
  display: none;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    width: 4px;
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--accent-glass);
    border-radius: var(--border-radius);
}

@media (max-width: 728px) {
    .container {
        position: relative;
        flex-direction: column;
        padding: 1rem;
    }

    .sidebar {
        position: fixed;
        bottom: 0.5rem;
        left: 0;
        right: 0;
        width: calc(100% - 2rem);
        margin: 0 auto;
        height: auto;
        flex-direction: row;
        padding: 0.5rem;
        border-radius: var(--border-radius);
        border: var(--border);
        box-shadow: var(--shadow);
        z-index: 100;
        align-items: center;

    }

    .sidebar .sidebar-actions {
        display: flex;
        flex-direction: row;
        gap: var(--gap);
        width: 50%;
        height: 100%;
        justify-content: space-between;
    }

    .sidebar button {
        margin: 0;
        padding: 0.5rem;
        
        height: auto;
        justify-content: center;
        border-radius: var(--border-radius);
    }

    .sidebar button .text,
    .sidebar .title,
    .sidebar .subtitle,
    .sidebar-extras {
        display: none;
    }

    .sidebar .settings-button {
        margin: 0;
    }

    .create-note-btn {
        align-self: center;
    }

    .content {
        max-height: 90%;
    }
}
