/* 便签贴功能样式 */

/* 便签图标 */
.notes-icon {
    position: absolute;
    left: -120px; /* 调整位置，使其更靠近搜索框 */
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px; /* 增加宽度 */
    height: 50px; /* 增加高度 */
    background: #FF6B6B; /* 更鲜艳的背景色 */
    border: none;
    border-radius: 12px; /* 更圆润的边角 */
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4); /* 更明显的阴影 */
    z-index: 10;
    font-size: 16px; /* 增大字体 */
    font-weight: bold;
    gap: 8px; /* 增加间距 */
}

.notes-icon:hover {
    transform: translateY(-52%) scale(1.05); /* 增加缩放效果 */
    background: #E65A5A; /* hover 颜色 */
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.6); /* 更明显的 hover 阴影 */
}

.notes-icon i {
    font-size: 22px; /* 增大图标字体 */
}

/* 便签文字 */
.notes-text {
    font-size: 14px; /* 增大文字字体 */
    font-weight: bold;
    margin-left: 5px; /* 调整间距 */
}

/* 便签数量徽章 */
.notes-count {
    position: absolute;
    top: -10px; /* 调整位置 */
    right: -10px; /* 调整位置 */
    background: #3498db; /* 更醒目的背景色 */
    color: white;
    border-radius: 50%;
    width: 24px; /* 增加宽度 */
    height: 24px; /* 增加高度 */
    font-size: 14px; /* 增大字体 */
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.5); /* 增加阴影 */
}

/* 便签图标响应式设计 */
@media (max-width: 768px) {
    .notes-icon {
        left: -100px; /* 调整响应式位置 */
        width: 80px; /* 调整响应式宽度 */
        height: 40px; /* 调整响应式高度 */
    }
    
    .notes-icon i {
        font-size: 18px; /* 调整响应式图标字体 */
    }
    
    .notes-text {
        font-size: 12px; /* 调整响应式文字字体 */
    }
    
    .notes-count {
        width: 20px; /* 调整响应式宽度 */
        height: 20px; /* 调整响应式高度 */
        font-size: 12px; /* 调整响应式字体 */
        top: -8px;
        right: -8px;
    }
}

@media (max-width: 480px) {
    .notes-icon {
        left: -85px; /* 调整响应式位置 */
        width: 70px; /* 调整响应式宽度 */
        height: 35px; /* 调整响应式高度 */
        font-size: 12px; /* 调整响应式字体 */
    }
    
    .notes-icon i {
        font-size: 14px; /* 调整响应式图标字体 */
    }
    
    .notes-text {
        font-size: 10px; /* 调整响应式文字字体 */
    }
}

/* 便签面板 */
.notes-panel {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
    border: 1px solid #e1e8ed;
}

/* 固定状态的便签面板 */
.notes-panel.pinned {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #87CEEB;
}

.notes-header {
    background: #87CEEB;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #6BB6FF;
}

.notes-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.notes-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 图钉按钮特殊样式 */
#pin-notes-btn {
    position: relative;
    transition: all 0.3s ease;
}

#pin-notes-btn.pinned {
    background: rgba(255, 255, 255, 0.3);
    color: #ff6b6b;
    transform: rotate(45deg);
}

#pin-notes-btn.pinned:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(45deg) scale(1.1);
}

.notes-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

/* 便签项 */
.note-item {
    background: #f8f9fa;
    border: 1px solid #87CEEB;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.note-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.3);
    border-color: #6BB6FF;
}

.note-item[data-guest="true"] {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-color: #f39c12;
}

.note-content p {
    margin: 0 0 8px 0;
    line-height: 1.5;
    color: #2c3e50;
    word-wrap: break-word;
}

.note-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.note-actions .btn-icon {
    color: #6c757d;
    font-size: 12px;
    padding: 4px;
}

.note-actions .btn-icon:hover {
    background: rgba(108, 117, 125, 0.1);
}

.note-complete:hover {
    color: #28a745;
}

.note-edit:hover {
    color: #007bff;
}

.note-delete:hover {
    color: #dc3545;
}

.note-move {
    margin-left: auto;
    display: flex;
    gap: 2px;
}

.note-up:hover,
.note-down:hover {
    color: #6f42c1;
}

/* 空状态 */
.empty-notes {
    text-align: center;
    color: #6c757d;
    padding: 30px 20px;
    font-style: italic;
}

.empty-notes.error {
    color: #dc3545;
    font-weight: bold;
}

.empty-notes a {
    color: #87CEEB;
    text-decoration: none;
}

.empty-notes a:hover {
    color: #6BB6FF;
    text-decoration: underline;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: #87CEEB;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #6BB6FF;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

/* 颜色选择器样式 */
.color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.color-picker input[type="radio"] {
    display: none;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: inline-block;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #87CEEB;
}

.color-picker input[type="radio"]:checked + .color-option {
    border-color: #87CEEB;
    border-width: 3px;
    transform: scale(1.05);
}

.color-picker input[type="radio"]:checked + .color-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #87CEEB;
    font-weight: bold;
    font-size: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #87CEEB;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.2);
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: #87CEEB;
    color: white;
    border: 1px solid #6BB6FF;
}

.btn-primary:hover {
    background: #6BB6FF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 全部便签模态框 */
.all-notes-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #87CEEB;
    background: white;
    border-bottom: 2px solid #87CEEB;
}

.tab-btn:hover:not(.active) {
    background: #e9ecef;
}

.tab-content {
    max-height: 60vh;
    overflow-y: auto;
}

.tab-pane {
    display: none;
    padding: 20px;
}

.tab-pane.active {
    display: block;
}

/* 全部便签项 */
.note-item-full {
    background: white;
    border: 1px solid #87CEEB;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.note-item-full:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.3);
    border-color: #6BB6FF;
}

.note-item-full .note-content {
    flex: 1;
    margin-right: 15px;
}

.note-item-full .note-content p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.note-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
}

.note-item-full .note-actions {
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
    border: none;
}

.note-restore:hover {
    color: #17a2b8;
}

/* 消息提示 */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.toast-message.show {
    transform: translateX(0);
}

.toast-message.success {
    background: #28a745;
}

.toast-message.error {
    background: #dc3545;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .notes-panel {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .all-notes-modal .modal-content {
        max-width: none;
        width: 95%;
    }
    
    .note-item-full {
        flex-direction: column;
        align-items: stretch;
    }
    
    .note-item-full .note-content {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .note-item-full .note-actions {
        justify-content: flex-end;
    }
    
    .toast-message {
        left: 10px;
        right: 10px;
        transform: translateY(-100%);
    }
    
    .toast-message.show {
        transform: translateY(0);
    }
}

/* 滚动条样式 */
.notes-content::-webkit-scrollbar,
.tab-content::-webkit-scrollbar {
    width: 6px;
}

.notes-content::-webkit-scrollbar-track,
.tab-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.notes-content::-webkit-scrollbar-thumb,
.tab-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notes-content::-webkit-scrollbar-thumb:hover,
.tab-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
.note-item {
    animation: noteSlideIn 0.3s ease;
}

@keyframes noteSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #87CEEB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}