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

body {
    font-family: sans-serif;
    min-height: 100vh;

    background-color: #f5e9d4;

    background-image:
        radial-gradient(ellipse at center,
            #fff8e8 0%,
            #f5e9d4 35%,
            #e8d5b0 70%,
            #d4b68a 100%),

        radial-gradient(circle at 15% 15%,
            transparent 30%,
            rgba(180, 120, 60, 0.12) 60%,
            rgba(140, 80, 30, 0.18) 85%,
            rgba(100, 50, 10, 0.22) 100%),
        radial-gradient(circle at 85% 12%,
            transparent 25%,
            rgba(160, 100, 40, 0.15) 55%,
            rgba(120, 60, 20, 0.20) 80%),
        radial-gradient(circle at 10% 88%,
            transparent 35%,
            rgba(170, 110, 50, 0.14) 65%),

        /* 非常轻微的噪点层（模拟纸张纤维/颗粒） */
        radial-gradient(circle,
            rgba(0, 0, 0, 0.03) 1px,
            transparent 1px);

    box-shadow:
        inset 0 0 80px rgba(180, 140, 80, 0.35),
        inset 0 0 160px rgba(140, 90, 40, 0.25),
        inset 0 0 40px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn1 {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn2 {
    from {
        transform: translateX(-50%)translateY(-10px);
    }

    to {
        transform: translateX(-50%)translateY(0);
    }
}

#app {
    display: none;
    padding: 8px;
    height: 100vh;
    height: 100dvh;
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff40;
    animation: fadeIn1 0.3s ease-in-out;
}

#app button {
    padding: 3px 0;
    margin: 5px;
    margin-left: 0;
    font-size: 17px;
    font-weight: 700;
    border: none;
    color: #003176;
    background: linear-gradient(to right, #007694, #6b006b) no-repeat;
    background-size: 0 2px;
    background-position: center bottom;
    transition: all 0.3s ease;
}

#app button:hover {
    background-size: 100% 2px;
    background-position: center bottom;
}

.note {
    display: block;
    text-decoration: none;
    color: #000;
    cursor: default;
    padding: 3px 5px;
    margin: 5px 0;
    border-radius: 8px;
    width: fit-content;
    transition: all 0.3s ease;
    background: #0059ff10;
}

.note:hover {
    background: #075eff40;
    /* color: #003daf; */
}

.noteditor,
.notedisplay {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    padding: 12px 0;
    margin: 0 auto;
    background-color: #fff;
    width: 100vw;
    max-width: 1000px;
    height: 100vh;
    height: 100dvh;
    /* animation: fadeIn2 0.15s ease; */
}

.noteditor .title,
.notedisplay .title {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    padding-right: 6px;
}

.noteditor .title input,
.notedisplay .title h3 {
    display: block;
    flex: 1;
}

.notedisplay .title h3 {
    color: #004dba;
    min-width: calc(100% - 150px);
    overflow-wrap: break-word;
    padding: 0 5px;
}

.noteditor .title button,
.notedisplay .title button {
    display: block;
    width: 40px;
    min-width: 40px;
    height: 25px;
    border: 1px solid #00000020;
    background-color: #e5f1ff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.noteditor .title button:hover,
.notedisplay .title button:hover {
    background-color: #b9d9ff;
}

.noteditor input,
.noteditor textarea {
    outline: none;
    border: 2px solid #002a4550;
    border-radius: 5px;
    margin: 0 5px;
    font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
}

.noteditor input {
    padding: 3px 6px;
}

.noteditor textarea {
    resize: none;
    flex: 1;
    padding: 6px;
    border-radius: 6px;
}

.noteditor input:focus,
.noteditor textarea:focus {
    border: 2px solid #4ba2ea;
}