/* 基础重置和变量 */
:root {
    --primary-color: #0078d4;
    --primary-dark: #106ebe;
    --secondary-color: #107c10;
    --danger-color: #d13438;
    --warning-color: #ffb900;
    --light-color: #f8f9fa;
    --dark-color: #323130;
    --gray-color: #605e5c;
    --border-radius: 4px;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: 
        linear-gradient(135deg, #667eea 0%, #764ba2 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%230078d4" width="1200" height="800"/><path fill="%230068c4" d="M0 0h1200v800H0z"/><circle fill="%230058b4" cx="600" cy="400" r="200"/></svg>');
    background-blend-mode: overlay;
    min-height: 100vh;
}

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

/* 卡片设计 */
.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

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

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-links a:hover {
    background: var(--primary-color);
    color: white;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d1d1;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

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

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.table th {
    background: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.table tr:hover {
    background: #f8f9fa;
}

/* 记事卡片 */
.note-card {
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.note-card.public {
    border-left-color: var(--secondary-color);
}

.note-card.private {
    border-left-color: var(--warning-color);
}

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

.note-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.note-meta {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin: 5px 0;
}

.note-content {
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
    white-space: pre-wrap;
}

.note-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .note-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .note-actions {
        flex-wrap: wrap;
    }
    
    .card {
        padding: 20px;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 状态提示 */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-success {
    background: #dff6dd;
    border-color: var(--secondary-color);
    color: #107c10;
}

.alert-error {
    background: #fde7e9;
    border-color: var(--danger-color);
    color: #d13438;
}

.alert-warning {
    background: #fff4ce;
    border-color: var(--warning-color);
    color: #817400;
}

/* 单列布局专用 */
.single-column {
    max-width: 800px;
    margin: 0 auto;
}

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

.page-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}