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

body {
    /* background:
        url("images/note-svgrepo-com.svg") repeat,
        linear-gradient(135deg, #0000ff 0%, #4e4eff 50%, #8989ff 100%);
    background-size:
        24px 24px,
        100%; */
    height: 100vh;
    max-height: 100%;
    background-color: #efefea;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    overflow: hidden;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Open Sans",
        "Helvetica Neue",
        sans-serif;
}

/* Dark mode styles */
body.dark-mode {
    /* background:
        url("images/note-svgrepo-com.svg") repeat,
        linear-gradient(
            135deg,
            #000013 0%,
            #00003b 25%,
            #000076 50%,
            #0000b0 75%,
            #0000ff 100%
        );
    background-size:
        24px 24px,
        100%; */
    min-height: 100vh;
    /* background-color: #1a1a1e; */
    background-color: #2f2f35;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

body.dark-mode .content {
    /* background-color: #2f2f35; */
    background-color: #1a1a1e;
    color: #ffffff;
}

body.dark-mode #textInput {
    /* background-color: #2f2f35; */
    background-color: #474750;
    color: #ffffff;
}

body.dark-mode #textInput::placeholder {
    color: #aaaaaa;
}
body.dark-mode #textInput:focus {
    color: #ffffff;
}

.wrapper {
    width: 700px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* margin-top: 60px;
    margin-bottom: 60px; */
}

/* Hamburger menu button */
.menu-toggle {
    position: sticky;
    top: 10px;
    left: 14px;
    z-index: 1000;
    background: #8989ff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: #9d9dff;
    transform: scale(1.05);
}

/* Floating menu */
.side-menu {
    position: fixed;
    top: 60px;
    left: 10px;
    z-index: 999;
    pointer-events: none;
}

.side-menu.open {
    pointer-events: auto;
}

body.dark-mode .side-menu {
    color: #ffffff;
}

.menu-item {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    width: fit-content;
    margin-bottom: 10px;
    font-size: 16px;
    /* background: rgba(255, 255, 255, 0.2); */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(196, 196, 255, 0.1);
    padding: 4px 16px 4px 4px;
    border-radius: 34px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: scale(0.8) translateX(-20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.menu-item span {
    cursor: pointer;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.language-wrapper {
    cursor: pointer;
}

.language-wrapper label {
    cursor: pointer;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.language-wrapper select {
    min-width: 60px;
    height: 40px;
    padding: 8px 10px;
    border: none;
    border-radius: 24px;
    background: #8989ff;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23fff' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
    padding-right: 28px;
}

.language-wrapper select option {
    font-weight: 600;
}

.language-wrapper select:hover {
    background-color: #9d9dff;
}

.language-wrapper select:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

body.dark-mode .menu-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-item.show {
    opacity: 1;
    transform: scale(1) translateX(0);
}

.menu-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .menu-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Toggle switch styles */
.theme-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 40px;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #8989ff;
    transition: 0.4s;
    border-radius: 34px;
}
.toggle-slider:hover {
    background-color: #9d9dff;
}
.toggle-slider:active {
    transform: scale(0.98);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 32px;
    left: 4px;
    bottom: 4px;
    background-color: #ffffff;
    transition: 0.4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8989ff;
    z-index: 1;
}

.toggle-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    top: 8px;
    left: 8px;
    color: #8989ff;
    transition: opacity 0.4s;
    z-index: 2;
}

.toggle-icon--moon {
    opacity: 0;
}
.custom-prompt {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.custom-prompt[hidden] {
    display: none;
}

.custom-prompt__panel {
    width: min(100%, 360px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(196, 196, 255, 0.1);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1f1f1f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 14px;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-prompt__message {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 0;
}

.custom-prompt__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

.custom-prompt__checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #8989ff;
    flex: 0 0 auto;
}

.custom-prompt__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.custom-prompt__button {
    min-width: 84px;
    border: 1px solid rgba(196, 196, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1f1f1f;
    font-size: 14px;
    line-height: 1;
    padding: 8px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-prompt__button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-prompt__button--primary {
    border-color: rgba(196, 196, 255, 0.2);
    background: rgba(137, 137, 255, 0.9);
    color: #ffffff;
}

.custom-prompt__button--primary:hover {
    background: rgba(157, 157, 255, 0.95);
}

body.dark-mode .custom-prompt__panel {
    background: rgba(26, 26, 30, 0.9);
    color: #ffffff;
}

body.dark-mode .custom-prompt__button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .custom-prompt__button--primary {
    background: rgba(137, 137, 255, 0.9);
}

.theme-toggle input:checked + .toggle-slider {
    background-color: #8989ff;
}

.theme-toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
    color: #7676ff;
}

.theme-toggle input:checked + .toggle-slider .toggle-icon--sun {
    opacity: 0;
}

.theme-toggle input:checked + .toggle-slider .toggle-icon--moon {
    opacity: 1;
    transform: translateX(20px);
}
.input-wrapper {
    /* position:fixed;
    bottom: 30px; */
    display: flex;
    justify-content: space-around;
    /* width: 700px; */
    max-width: 100%;
    margin-top: 1.5em;
}
#textInput {
    height: 44px;
    font-size: 16px;
    max-width: 100%;
    flex-grow: 1;
    border: 2px solid transparent;
    padding: 4px 4px 4px 1rem;
    border-radius: 40px;
    outline: none;
    transition: border-color 0.3s ease;
}

#textInput:focus {
    border-color: #8989ff;
}

.btn {
    border: none;
    padding: 2px;
    vertical-align: middle;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    background-color: #8989ff;
    transition: all 0.3s ease;
}
.btn:hover:not(.disabled) {
    background-color: #9d9dff;
    transform: scale(1.05);
}
.btn:active:not(.disabled) {
    transform: scale(0.95);
}
.btn.disabled {
    cursor: default;
}
.btn.disabled:hover {
    transform: none;
    box-shadow: none;
}
.btn.disabled:active {
    transform: none;
    box-shadow: none;
}

.btn svg {
    vertical-align: middle;
}
.empty-btn,
.minus-btn,
.edit-btn {
    margin: 5px 10px 5px 0;
}

.item-text[contenteditable="true"]:focus {
    /* border-bottom: 2px solid #8989ff; */
    outline: none;
}

.clear-completed-btn {
    display: none;
    margin-left: 0;
    position: absolute;
    right: 5px;
    bottom: 25px;
    z-index: 5;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
}

.new-note-btn {
    display: block;
    margin-left: 0;
    width: 44px;
    height: 44px;
}
.new-note-btn svg {
    padding: 6px;
}

.all-lists-btn {
    display: block;
    margin-left: 0;
    width: 44px;
    height: 44px;
}

.all-lists-btn svg {
    padding: 6px;
}

.all-lists-btn.active {
    background-color: #9d9dff;
}

.lists-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    max-width: 100%;
    height: 100vh;
    padding-bottom: 2em;
}
#lists-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

#lists-container.all-lists-mode {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-items: stretch;
    gap: 14px;
}

#lists-container.all-lists-mode .content {
    display: block !important;
    width: 100%;
    min-width: 0;
    max-height: 32vh;
    min-height: 140px;
    margin: 0;
    cursor: zoom-in;
}

#lists-container.all-lists-mode .all-lists-create-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-height: 32vh;
    min-height: 140px;
    margin: 0;
    padding: 1em;
    border-radius: 24px;
    border: 2px dashed #8989ff;
    background-color: transparent;
    box-shadow: none;
    color: #7676ff;
    cursor: pointer;
    grid-column: 2;
    grid-row: 1;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        background-color 0.2s ease;
}

#lists-container.all-lists-mode .all-lists-create-placeholder:hover,
#lists-container.all-lists-mode .all-lists-create-placeholder:focus-visible {
    border-color: #6e6eff;
    color: #5f5fff;
    background-color: rgba(137, 137, 255, 0.08);
    transform: translateY(-1px);
    outline: none;
}

.all-lists-create-placeholder__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.all-lists-create-placeholder__icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.all-lists-create-placeholder__icon svg {
    width: 40px;
    height: 40px;
}
.all-lists-create-placeholder__inner span {
    font-size: 12px;
}
.all-lists-create-placeholder__icon svg path,
.all-lists-create-placeholder__icon svg line {
    fill: currentColor;
    stroke: currentColor;
}

body.all-lists-view .wrapper {
    width: min(980px, 96vw);
}

body.all-lists-view .input-wrapper,
body.all-lists-view .slider-nav,
body.all-lists-view .pagination-dots {
    display: none !important;
}

body.all-lists-view #lists-container.all-lists-mode .list-title {
    pointer-events: none;
    font-size: 12px;
    margin-bottom: 6px;
    padding: 4px 0;
}

body.all-lists-view #lists-container.all-lists-mode .item {
    margin-bottom: 0.25em;
}

body.all-lists-view #lists-container.all-lists-mode .item-text {
    font-size: 14px;
    line-height: 1.2;
}

body.all-lists-view #lists-container.all-lists-mode .item-text.long-text {
    font-size: 13px;
}

body.all-lists-view #lists-container.all-lists-mode .item .btn,
body.all-lists-view #lists-container.all-lists-mode .delete-list-btn,
body.all-lists-view #lists-container.all-lists-mode .clear-completed-btn,
body.all-lists-view #lists-container.all-lists-mode .drop-indicator {
    display: none !important;
}

body.all-lists-view #lists-container.all-lists-mode .content * {
    pointer-events: none;
}

body.all-lists-view #lists-container.all-lists-mode .content .list-title {
    pointer-events: auto;
    cursor: pointer;
}

.content {
    min-height: 200px;
    max-width: 100%;
    max-height: 70vh;
    overflow-y: scroll;
    flex: 1;
    background-color: #ffffdd;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    padding: 1em;
    border-radius: 24px;
}

.slider-nav {
    background-color: #8989ff80;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 0 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.slider-nav:hover:not(.disabled) {
    background-color: #9d9dff;
    transform: scale(1.05);
}

.slider-nav:active:not(.disabled) {
    transform: scale(0.95);
}

.slider-nav.disabled {
    opacity: 0;
    cursor: default;
}

body.dark-mode .slider-nav {
    background-color: #8989ff80;
}

body.dark-mode #lists-container.all-lists-mode .all-lists-create-placeholder {
    border-color: #a8a8ff;
    color: #b6b6ff;
    background-color: rgba(255, 255, 255, 0.02);
}

body.dark-mode
    #lists-container.all-lists-mode
    .all-lists-create-placeholder:hover,
body.dark-mode
    #lists-container.all-lists-mode
    .all-lists-create-placeholder:focus-visible {
    border-color: #c1c1ff;
    color: #d0d0ff;
    background-color: rgba(168, 168, 255, 0.12);
}

.pagination-dots {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    min-height: 20px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #8989ff80;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    transform: scale(1.2);
    background-color: #8989ff;
}

.dot.active {
    transform: scale(1.4);
    background-color: #8989ff;
}

/* body.dark-mode .dot {
    background-color: #ffffff;
}

body.dark-mode .dot.active {
    background-color: #ffffff;
} */

.delete-list-btn {
    position: absolute;
    top: 25px;
    right: 5px;
    background-color: #8989ff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.delete-list-btn:hover {
    background-color: #9d9dff;
    transform: scale(1.05);
}

/* .content {
    position: relative;
} */

.list-title {
    width: 100%;
    color: #dfdfe4;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    border: none;
    background: transparent;
    padding: 8px 0;
    margin-bottom: 10px;
    border-bottom: 2px solid transparent;
    outline: none;
    color: inherit;
    transition: border-bottom-color 0.3s ease;
}

.list-title::placeholder {
    color: rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.list-title:focus {
    border-bottom-color: #8989ff;
}

body.dark-mode .list-title {
    color: #ffffff;
}

body.dark-mode .list-title::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.item {
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 0.4em;
    /* cursor: grab; */
}

.item.dragging {
    opacity: 0.35;
    cursor: grab;
}

.drop-indicator {
    width: 100%;
    height: 0;
    margin: 0.2em 0 0.6em;
    border-top: 2px solid #8989ff;
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(137, 137, 255, 0.45);
    pointer-events: none;
}

.item-text {
    position: relative;
    display: inline-block;
    overflow-wrap: anywhere;
    font-size: 24px;
    line-height: 1.1;
}

.item-text.long-text {
    font-size: 20px;
}

.item.strikethrough .item-text {
    text-decoration: line-through;
    -webkit-text-decoration: line-through;
    -moz-text-decoration: line-through;
    animation: strikethrough 0.2s ease-out forwards;
}

@keyframes strikethrough {
    from {
        text-decoration: none;
        -webkit-text-decoration: none;
        -moz-text-decoration: none;
    }
    to {
        text-decoration: line-through;
        -webkit-text-decoration: line-through;
        -moz-text-decoration: line-through;
    }
}
@media only screen and (max-width: 768px) {
    .lists-slider-container {
        max-width: 90%;
    }
    /* .input-wrapper {
    max-width: 90%;
} */

    .slider-nav {
        display: none !important;
    }

    #lists-container {
        touch-action: pan-y;
        user-select: none;
    }

    #lists-container.all-lists-mode {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    #lists-container.all-lists-mode .content {
        max-height: 28vh;
        min-height: 120px;
    }

    #lists-container.all-lists-mode .all-lists-create-placeholder {
        max-height: 28vh;
        min-height: 120px;
    }
}
@media only screen and (min-width: 769px) {
}
