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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

.hidden {
    display: none !important;
}

/* 登录页面样式 */
.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-top: 100px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
    font-size: 2em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ff4757;
    color: white;
}

.btn-danger:hover {
    background: #ff3838;
}

.btn-success {
    background: #2ed573;
    color: white;
}

.btn-success:hover {
    background: #26d467;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.message.error {
    background: #ffe6e6;
    color: #d63031;
    display: block;
}

.message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

/* 主页面样式 */
header {
    background: white;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: white;
    font-size: 1.8em;
}

.todo-form {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.todo-form input,
.todo-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    font-family: inherit;
    resize: vertical;
}

.todo-form input:focus,
.todo-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.todo-form textarea {
    min-height: 80px;
}

.todos-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.todo-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

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

.todo-item.completed {
    opacity: 0.7;
}

.todo-item.completed .todo-title {
    text-decoration: line-through;
    color: #999;
}

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

.todo-title {
    font-size: 1.2em;
    font-weight: 500;
    color: #333;
    flex: 1;
    word-break: break-word;
}

.todo-description {
    color: #666;
    margin-bottom: 15px;
    word-break: break-word;
    white-space: pre-wrap;
}

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

.todo-actions button {
    padding: 8px 16px;
    font-size: 14px;
}

.todo-date {
    font-size: 0.85em;
    color: #999;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .login-box {
        padding: 30px 20px;
        margin-top: 50px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .todo-header {
        flex-direction: column;
        gap: 10px;
    }

    .todo-actions {
        width: 100%;
    }

    .todo-actions button {
        flex: 1;
    }
}