/* 记事本图标样式 */
.notepad-trigger {
    position: fixed;
    left: 0;
    top: 100px;
    background: white;
    padding: 10px;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.3s ease;
}

.notepad-trigger:hover {
    transform: translateX(3px);
}

.notepad-trigger i {
    color: #4a90e2;
    font-size: 20px;
}

/* 记事本主体样式 */
.notepad-container {
    position: fixed;
    left: -350px;
    top: 0;
    min-width: 280px; /* 最小宽度 */
    width: 350px; /* 默认宽度 */
    height: 100vh;
    background: white;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notepad-container.show {
    transform: translateX(350px);
}

/* 添加拖动条样式 */
.notepad-resizer {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
}

.notepad-resizer:hover,
.notepad-resizer.resizing {
    background: rgba(74, 144, 226, 0.1);
}

/* 拖动时禁用文本选择 */
.notepad-container.resizing {
    user-select: none;
    transition: none;
}

.notepad-container.resizing * {
    pointer-events: none;
}

/* 记事本头部 */
.notepad-header {
    padding: 15px;
    background: #4a90e2;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notepad-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.notepad-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.notepad-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notepad-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* 关闭按钮特殊样式 */
.close-notepad-btn {
    padding: 5px;
    margin-left: 5px;
}

.close-notepad-btn:hover {
    background: rgba(255,0,0,0.2);
}

/* 确保按钮图标对齐 */
.notepad-btn i {
    font-size: 14px;
}

/* 标签页样式 */
.notepad-tabs {
    display: flex;
    padding: 10px 10px 0;
    background: #f5f6fa;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

/* 自定义滚动条样式 */
.notepad-tabs::-webkit-scrollbar {
    height: 4px;
}

.notepad-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.notepad-tabs::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 2px;
}

/* 修改标签页样式 */
.notepad-tab {
    padding: 8px 30px 8px 15px;
    background: #e8e9ec;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    position: relative;
    min-width: 100px;
    max-width: 160px;
    flex-shrink: 0;
    margin-right: 2px;
    transition: all 0.2s ease;
}

/* 添加激活状态样式 */
.notepad-tab.active {
    background: white;
    border-bottom-color: white;
    margin-bottom: -1px;
    z-index: 1;
}

.notepad-tab:hover {
    background: #f8f9fa;
}

.notepad-tab.active:hover {
    background: white;
}

/* 标签页内容样式 */
.notepad-tab-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 5px;
    color: #666;
}

.notepad-tab.active .notepad-tab-title {
    color: #4a90e2;
    font-weight: 500;
}

/* 关闭按钮样式 */
.notepad-tab .close-tab {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background: transparent;
    opacity: 0.5;
    transition: all 0.2s;
}

.notepad-tab:hover .close-tab {
    opacity: 1;
    background: rgba(0,0,0,0.1);
}

.notepad-tab .close-tab:hover {
    background: rgba(0,0,0,0.2);
}

/* 内容区域 */
.notepad-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.note-editor {
    width: 100%;
    height: 100%;
    padding: 15px;
    padding-bottom: 35px; /* 增加底部padding */
    border: none;
    resize: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.note-editor:focus {
    outline: none;
}

/* 新建按钮 */
.new-note-btn {
    padding: 8px 12px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.new-note-btn:hover {
    background: #357abd;
}

/* 添加徽章样式 */
.notepad-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    font-size: 12px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    pointer-events: none;
}

.notepad-badge.show {
    opacity: 1;
    transform: scale(1);
}

/* 添加字符计数器样式 */
.char-counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    font-size: 12px;
    color: #999;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    pointer-events: none;
    user-select: none;
} 