/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
}

.navbar-nav li {
    margin-left: 20px;
}

.navbar-nav a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}

.navbar-nav a:hover {
    color: #3498db;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-decoration: none;
    text-align: center;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: #2ecc71;
    color: #fff;
}

.btn-success:hover {
    background-color: #27ae60;
}

/* 消息样式 */
.error-messages {
    background-color: #ffebee;
    border-left: 4px solid #e74c3c;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.error-messages ul {
    list-style: none;
}

.error-messages li {
    margin-bottom: 5px;
}

.success-message {
    background-color: #e8f5e8;
    border-left: 4px solid #2ecc71;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #3498db;
}

/* 备忘录列表样式 */
.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.notes-list {
    list-style: none;
}

.note-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.note-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.note-actions {
    display: flex;
    gap: 10px;
}

.note-content {
    color: #666;
    margin-bottom: 10px;
}

.note-meta {
    font-size: 0.85rem;
    color: #999;
}

/* 备忘录编辑页面样式 */
.note-editor-container {
    max-width: 800px;
    margin: 30px auto;
}

.note-editor-header {
    margin-bottom: 20px;
}

.note-editor-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: #999;
    margin-top: 5px;
}

.char-count.warning {
    color: #f39c12;
}

.char-count.error {
    color: #e74c3c;
}

/* 管理员页面样式 */
.admin-container {
    max-width: 1000px;
    margin: 30px auto;
}

.admin-header {
    margin-bottom: 30px;
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.admin-tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s;
}

.admin-tab.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.admin-content {
    display: none;
}

.admin-content.active {
    display: block;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.users-table th {
    background-color: #f5f5f5;
    font-weight: 500;
}

.users-table tr:hover {
    background-color: #f9f9f9;
}

.settings-form .form-group {
    max-width: 500px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    
    .navbar-nav {
        margin-top: 15px;
    }
    
    .navbar-nav li {
        margin: 0 10px;
    }
    
    .notes-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .notes-header .btn {
        margin-top: 10px;
    }
    
    .note-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .note-actions {
        margin-top: 10px;
    }
    
    .admin-tabs {
        overflow-x: auto;
    }
}