* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

body {
    background-color: #f8f9fa;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.app-header h1 {
    color: #212529;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-header h1 i {
    color: #28a745;
    font-size: 24px;
}

.add-btn {
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.add-btn:hover {
    background-color: #218838;
}

.note-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.note-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #28a745;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.note-item.done {
    border-left-color: #6c757d;
    background-color: #f9f9f9;
    opacity: 0.85;
}

.note-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.note-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 12px;
}

.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #adb5bd;
    transition: color 0.2s ease;
}

.action-btn.edit:hover {
    color: #28a745;
}

.action-btn.delete:hover {
    color: #dc3545;
}

.action-btn.done:hover {
    color: #007bff;
}

.note-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
    padding-right: 60px;
    word-break: break-all;
}

.note-content {
    font-size: 14px;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 16px;
    max-height: 160px;
    overflow-y: auto;
    word-break: break-all;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #adb5bd;
}

.empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: #adb5bd;
}

.empty-tip i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #dee2e6;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    padding: 24px;
    position: relative;
    animation: modalFade 0.3s ease-in-out;
}

@keyframes modalFade {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    color: #adb5bd;
    cursor: pointer;
}

.close-modal:hover {
    color: #212529;
}

.form-item {
    margin-bottom: 20px;
}

.form-item label {
    display: block;
    font-size: 15px;
    color: #212529;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-item input, .form-item textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    color: #495057;
    transition: border-color 0.2s ease;
}

.form-item input:focus, .form-item textarea:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.submit-btn {
    width: 100%;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background-color: #218838;
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .note-list {
        grid-template-columns: 1fr;
    }
    .add-btn {
        width: 100%;
        justify-content: center;
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: #ced4da;
    border-radius: 3px;
}
