body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
}

#noteInput-box {
    width: 50vw;
    min-width: 300px;
    height: 100px;
    margin: 80px auto 130px;
    position: relative;
}

#addBtn {
    display: block;
    position: absolute;
    right: 0;
    height: 35%;
    width: 10%;
    max-width: 50px;
    min-width: 40px;
    padding: 0;
}

#noteInput {
    display: block;
    resize: vertical;
    line-height: 1.5;
    width: 98%;
    margin: 0 auto;
    height: 100%;
    max-height: 140px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

#notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Default: Three columns */
    gap: 10px;
    width: 50vw;
    min-width: 300px;
    margin: auto;
    font-size: .85em;
}

.note {
    background-color: #fff;
    padding: 10px;
    line-height: 1.8;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: pre-wrap;
    position: relative;
}

/* When the viewport width is less than 800px */
@media (max-width: 800px) {
    #notes {
        grid-template-columns: repeat(2, 1fr);
        /* Two columns */
    }
}

/* When the viewport width is less than 600px */
@media (max-width: 600px) {
    #notes {
        grid-template-columns: 1fr;
        /* Single column */
    }
}

.note-content {
    word-break: break-word;
    /* To prevent overflow */
}

.note-actions {
    text-align: right;
    display: none;
    /* Hide buttons by default */
    position: absolute;
    right: 10px;
    top: 10px;
}

.note:hover .note-actions {
    display: block;
    /* Show buttons on hover */
}

.note-actions button {
    background: none;
    color: #555;
    opacity: .3;
    font-size: 10px;

}

.note-actions {
    background: none;
    color: #ccc;
}

button {
    background-color: #a7c350;
    color: #fff;
    padding: 10px 20px;
    margin: 10px 0;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: .3s;
    opacity: .7;
}

button:hover {
    opacity: 1;
}

.note-actions button {
    display: inline;
    margin: 0 2px;
    padding: 2px;
}

/* 时间的CSS样式 */
.note-date {
    color: #aaa;
    font-size: 0.8em;
    position: absolute;
    left: 10px;
    top: 10px;
}

/* CSS 部分 */
/* 模态框样式 */
.modal {
    display: none;
    /* 默认隐藏模态框 */
    position: fixed;
    /* 固定位置 */
    z-index: 1;
    /* 置于顶层 */
    left: 0;
    top: 0;
    width: 100%;
    /* 宽度100% */
    height: 100%;
    /* 高度100% */
    overflow: auto;
    /* 开启滚动条 */
    background-color: rgb(0, 0, 0);
    /* 背景颜色 */
    background-color: rgba(0, 0, 0, 0.4);
    /* 背景颜色，带有透明度 */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    /* 15% 顶部外边距, 自动左右外边距 */
    padding: 20px;
    border: 1px solid #888;
    width: 60vw;
    /* 宽度80% */
    border-radius: 8px;
    min-width: 300px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Textarea 样式 */
textarea {
    width: 100%;
    /* 宽度100% */
    height: 200px;
    /* 高度200px */
    line-height: 1.5;
}

a {
    color: #75a99c;
    text-decoration: none;
    /* 移除下划线 */
    background-color: transparent;
    /* 背景透明 */
    transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
    /* 平滑的颜色和背景颜色过渡效果 */
}

a:hover,
a:focus {
    color: #0B6FA4;
    /* 鼠标悬停时的颜色 */
    background-color: #D9EEFF;
    /* 鼠标悬停时的背景颜色 */
    outline: none;
    /* 移除焦点时的轮廓线 */
}

a:active {
    color: #03396C;
    /* 链接被点击时的颜色 */
    background-color: #CCE6FF;
    /* 链接被点击时的背景颜色 */
}

.note-content {
    margin: 30px 0 10px;
}

.rightnav {
    position: fixed;
    right: 20px;
    top: 20px;
}

.rightnav button {
    color: #aaa;
    background: none;
    padding: 0;
    margin: 0 5px;
    opacity: .2;
}

.rightnav button:hover {
    color: #555;
    opacity: .9;
}

label {
    font-family: Arial, sans-serif;
    font-size: .8em;
    transition: .3s;
    color: #aaa;
    cursor: pointer;
    opacity: .2;
}

label:hover {
    color: #a7c350;
    opacity: .9;
}

input[type="checkbox"] {
    width: auto;
    min-width: auto;
    padding: 5px 0 0;
    margin: 0;
    box-shadow: none;
    accent-color: #a7c350;
    opacity: .3;
}

#overwriteCheckbox {
    vertical-align: middle;
    margin: 0 0 0 5px;
}

#tip{
    margin: 10px 0;
    text-align: right;
    font-size: .5em;
    color: #cacaca;
}