@import url('https://fonts.font.im/css2?family=Noto+Sans+SC:wght@400;700&family=ZCOOL+KuaiLe&display=swap');

:root {
    --note-shadow: 0 5px 15px rgba(0,0,0,0.08);
    --note-shadow-active: 0 8px 25px rgba(0,0,0,0.12);
    --header-font: 'ZCOOL KuaiLe', cursive;
    --body-font: 'Noto Sans SC', sans-serif;
}

body {
    font-family: var(--body-font);
    background-color: #ffffff;
    background-image:
        linear-gradient(to right, #f0f0f0 1px, transparent 1px),
        linear-gradient(to bottom, #f0f0f0 1px, transparent 1px);
    background-size: 24px 24px;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    color: #444;
    overflow-x: hidden;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
}

header h1 {
    font-family: var(--header-font);
    font-size: 3.5rem;
    margin: 0;
    color: #333;
    text-shadow: 1px 1px 0px #fff;
}

header p {
    font-size: 1rem;
    margin-top: 5px;
    color: #888;
}

#notes-wall {
    position: relative;
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    flex-grow: 1;
    min-height: 60vh;
}

.note {
    position: absolute;
    padding: 15px;
    border-radius: 14px;
    box-shadow: var(--note-shadow);
    width: 220px;
    min-height: 80px;
    word-wrap: break-word;
    transition: transform 0.2s cubic-bezier(.68,-0.55,.27,1.55), box-shadow 0.2s;
    cursor: grab;
    font-size: 1rem;
    line-height: 1.5;
    border: none;
    background: var(--note-gradient, linear-gradient(135deg, #ffe7d9 0%, #ffd6e0 100%));
    color: #333;
    backdrop-filter: blur(1px);
    overflow: hidden;
    opacity: 0;
    animation: noteFadeIn 0.7s cubic-bezier(.68,-0.55,.27,1.55) forwards;
}

@keyframes noteFadeIn {
    0% { opacity: 0; transform: scale(0.7) translateY(40px); }
    60% { opacity: 1; transform: scale(1.08) translateY(-8px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
    /* 渐变色方案 */
    .note-color-1 {
        --note-gradient: linear-gradient(135deg, #ffe7d9 0%, #ffd6e0 100%);
    }
    .note-color-2 {
        --note-gradient: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    }
    .note-color-3 {
        --note-gradient: linear-gradient(135deg, #f9f9d2 0%, #f6d365 100%);
    }
    .note-color-4 {
        --note-gradient: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    }
    .note-color-5 {
        --note-gradient: linear-gradient(135deg, #fcdffb 0%, #c2e9fb 100%);
    }

.note:active {
    cursor: grabbing;
    transform: scale(1.05) !important;
    box-shadow: var(--note-shadow-active);
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#add-note-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: 90%;
    max-width: 450px;
}

#add-note-form {
    display: flex;
    gap: 10px;
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

#add-note-form:focus-within {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

#note-input {
    border: 2px solid #e0c3fc;
    background: rgba(255,255,255,0.85);
    padding: 12px 15px;
    font-size: 1rem;
    width: 100%;
    font-family: var(--body-font);
    outline: none;
    color: #333;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(160,160,255,0.10);
    transition: border 0.3s, box-shadow 0.3s, transform 0.2s;
    backdrop-filter: blur(2px);
}

#note-input:focus {
    border: 2px solid #8ec5fc;
    box-shadow: 0 4px 16px rgba(102,166,255,0.18);
    transform: scale(1.03);
}

#note-input::placeholder {
    color: #b8b8d1;
    font-style: italic;
    opacity: 0.8;
}

#add-note-form button {
    background: linear-gradient(135deg, #89f7fe, #66a6ff);
    color: #fff;
    border: none;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(.68,-0.55,.27,1.55);
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(102, 166, 255, 0.4);
    overflow: hidden;
    position: relative;
}

#add-note-form button:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 166, 255, 0.5);
}

#add-note-form button:active {
    animation: btnRipple 0.4s;
}

@keyframes btnRipple {
    0% { box-shadow: 0 0 0 0 rgba(102,166,255,0.3); }
    70% { box-shadow: 0 0 0 12px rgba(102,166,255,0.1); }
    100% { box-shadow: 0 0 0 0 rgba(102,166,255,0.0); }
}

#add-note-form button svg {
    width: 24px;
    height: 24px;
}

/* Loading Spinner 样式 */
#loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading-spinner .spinner {
    width: 64px;
    height: 64px;
    border: 6px solid #e0c3fc;
    border-top: 6px solid #8ec5fc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    background: transparent;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 输入框更高级美化 */
#note-input {
    border: 2.5px solid #e0c3fc;
    background: rgba(255,255,255,0.92);
    padding: 14px 18px 14px 44px;
    font-size: 1.08rem;
    width: 100%;
    font-family: var(--body-font);
    outline: none;
    color: #333;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(160,160,255,0.13);
    transition: border 0.3s, box-shadow 0.3s, transform 0.2s;
    backdrop-filter: blur(3px);
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" fill="%238ec5fc" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/></svg>');
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 22px 22px;
}

#note-input:focus {
    border: 2.5px solid #8ec5fc;
    box-shadow: 0 8px 32px rgba(102,166,255,0.18);
    transform: scale(1.04);
}

#note-input::placeholder {
    color: #b8b8d1;
    font-style: italic;
    opacity: 0.7;
    letter-spacing: 1px;
}

