/* 笔记页面样式 */

body {
    padding-top: 76px;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
    padding-left: 30px;
    padding-right: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container-fluid {
    padding-left: 20px;
    padding-right: 20px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
    padding: 20px;
}

.card-body {
    padding: 20px;
}

/* 笔记列表样式 */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.list-group-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.note-item {
    display: flex;
    flex-direction: column;
}

.note-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
    line-height: 1.4;
}

.note-preview {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.note-date {
    font-size: 12px;
}

/* 笔记详情样式 */
#noteContent {
    min-height: 400px;
}

.note-detail {
    display: none;
}

.note-detail.active {
    display: block;
}

.note-detail-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.note-detail-content {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #666;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 20px;
}

/* 表单样式 */
.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #2196f3;
    border-color: #2196f3;
}

.btn-primary:hover {
    background-color: #1976d2;
    border-color: #1976d2;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #2196f3;
    border-color: #2196f3;
}

.btn-outline-primary:hover {
    background-color: #2196f3;
    border-color: #2196f3;
}

.btn-outline-danger {
    color: #f44336;
    border-color: #f44336;
}

.btn-outline-danger:hover {
    background-color: #f44336;
    border-color: #f44336;
}

/* 徽章样式 */
.badge {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 20px;
}

/* 加载指示器 */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
}

/* 提示消息样式 */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .navbar {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .navbar .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-header,
    .card-body {
        padding: 15px;
    }
    
    .list-group-item {
        padding: 12px 15px;
    }
    
    .note-detail-title {
        font-size: 20px;
    }
    
    .note-detail-content {
        font-size: 15px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .col-lg-4,
    .col-lg-8 {
        margin-bottom: 20px;
    }
    
    .note-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .note-detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 滚动条样式 */
.list-group {
    max-height: 600px;
    overflow-y: auto;
}

.list-group::-webkit-scrollbar {
    width: 6px;
}

.list-group::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.list-group::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.list-group::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
