/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* 左侧边栏 */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo i {
    font-size: 24px;
    margin-right: 10px;
    color: #3498db;
}

.logo h2 {
    font-size: 20px;
    font-weight: 600;
}

.menu ul {
    list-style: none;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #3498db;
}

.menu-item.active {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: #3498db;
}

.menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* 时间显示区域 */
.time-display {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    padding: 15px;
}

.current-time {
    font-size: 32px;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.current-date {
    font-size: 18px;
    color: white;
    font-weight: bold;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 筛选选项卡 */
.filter-tabs {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab:hover {
    background: rgba(52, 152, 219, 0.1);
}

.tab.active {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* 添加待办事项区域 */
.add-todo-section {
    margin-bottom: 30px;
}

.add-todo-form {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#newTodoInput {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 16px;
}

#newTodoInput::placeholder {
    color: #999;
}

.add-btn {
    padding: 15px 20px;
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 16px;
}

.add-btn:hover {
    background: #2980b9;
}

/* 待办事项列表 */
.todo-list-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.todo-list {
    max-height: 600px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.todo-item:hover {
    background: #f8f9fa;
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-item.completed {
    opacity: 0.7;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #666;
}

.todo-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.todo-checkbox:hover {
    border-color: #3498db;
}

.todo-checkbox.completed {
    background: #3498db;
    border-color: #3498db;
}

.todo-checkbox.completed::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.todo-content {
    flex: 1;
    margin-right: 15px;
}

.todo-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    word-break: break-word;
}

.todo-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    word-break: break-word;
}

.todo-meta {
    font-size: 12px;
    color: #999;
}

.todo-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.edit-btn {
    background: #f39c12;
    color: white;
}

.edit-btn:hover {
    background: #e67e22;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background: #c0392b;
}

/* 加载状态 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.loading-spinner i {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
}

.empty-state span {
    font-size: 14px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px;
    }
    
    .logo {
        padding: 0 0 20px;
        margin-bottom: 15px;
    }
    
    .menu ul {
        display: flex;
        gap: 10px;
    }
    
    .menu-item {
        flex: 1;
        justify-content: center;
        padding: 10px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .menu-item.active {
        border-left-color: transparent;
        border-bottom-color: #3498db;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .filter-tabs {
        margin-bottom: 20px;
    }
    
    .tab {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .todo-item {
        padding: 15px;
    }
    
    .todo-actions {
        gap: 5px;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
}

/* 滚动条样式 */
.todo-list::-webkit-scrollbar {
    width: 6px;
}

.todo-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.todo-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.todo-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 