* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-bottom: 80px; /* 为底部导航留出空间 */
}

/* 顶部导航栏 */
.header {
    background: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    color: #5cb3f5;
    font-size: 18px;
    font-weight: bold;
}

.header-actions {
    display: flex;
    gap: 16px;
}

.header-actions i {
    color: #666;
    font-size: 18px;
    cursor: pointer;
}

/* 主要内容区域 */
.main-content {
    padding: 20px 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* 输入区域 */
.input-section {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.input-container textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    color: #333;
    background: transparent;
    min-height: 80px;
}

.input-container textarea::placeholder {
    color: #999;
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.voice-btn, .image-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #5cb3f5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
}

.image-btn {
    background: #e0e0e0;
    color: #666;
    margin-left: 8px;
}

.send-btn {
    background: #5cb3f5;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 24px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

/* 本周总结 */
.weekly-summary {
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.date {
    font-size: 14px;
    color: #666;
}

.view-more {
    color: #5cb3f5;
    text-decoration: none;
    font-size: 14px;
}

.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag {
    background: #f0f8ff;
    color: #5cb3f5;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.tag.work {
    background: #fff3e0;
    color: #ff9800;
}

.tag.health {
    background: #e8f5e8;
    color: #4caf50;
}

.tag.reading {
    background: #f3e5f5;
    color: #9c27b0;
}

.summary-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 今日任务 */
.daily-tasks {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.time {
    font-size: 14px;
    color: #666;
}

.task-action {
    color: #5cb3f5;
    font-size: 12px;
    background: #f0f8ff;
    padding: 2px 8px;
    border-radius: 8px;
}

.task-content {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
}

.task-tags {
    display: flex;
    gap: 8px;
}

.task-tags .tag {
    background: #f5f5f5;
    color: #666;
    font-size: 12px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
    color: #999;
    font-size: 12px;
}

.nav-item.active {
    color: #5cb3f5;
}

.nav-item i {
    font-size: 20px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .main-content {
        padding: 16px 12px;
    }
    
    .input-section {
        padding: 12px;
    }
    
    .summary-card, .task-item {
        padding: 12px;
    }
    
    .tags {
        gap: 6px;
    }
    
    .task-tags {
        gap: 6px;
    }
}

/* 动画效果 */
.task-item, .summary-card, .input-section {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-item:hover, .summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.send-btn:hover, .voice-btn:hover, .image-btn:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.nav-item:hover {
    color: #5cb3f5;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.close-modal {
    cursor: pointer;
    font-size: 24px;
    color: #999;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.form-group {
    margin-bottom: 16px;
    padding: 0 24px;
}

.form-group:first-child {
    margin-top: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #5cb3f5;
    box-shadow: 0 0 0 2px rgba(92, 179, 245, 0.2);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

.form-actions {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.btn-primary {
    background: #5cb3f5;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #4a9eda;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
}

/* 添加展开/收起按钮样式 */
.toggle-btn {
    margin-left: 8px;
    cursor: pointer;
    color: #999;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.toggle-btn:hover {
    color: #5cb3f5;
}

/* 任务详情区域样式 */
.task-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.decomposed-tasks {
    font-size: 14px;
}

.decomposed-task {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.decomposed-task i {
    margin-top: 6px;
}

.decomposed-task span {
    margin-left: 8px;
    color: #333;
}

/* 用户状态样式 */
.user-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-email {
    color: #666;
    font-size: 14px;
}

.logout-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.auth-actions {
    display: flex;
    gap: 8px;
}

.login-btn, .register-btn {
    background: #5cb3f5;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-btn:hover, .register-btn:hover {
    background: #4a9eda;
}

.register-btn {
    background: #28a745;
}

.register-btn:hover {
    background: #218838;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close-modal:hover {
    color: #666;
}

.form-group {
    margin-bottom: 20px;
    padding: 0 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #5cb3f5;
    box-shadow: 0 0 0 2px rgba(92, 179, 245, 0.2);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

.form-actions {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary {
    background: #5cb3f5;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #4a9eda;
}

.btn-secondary {
    background: transparent;
    color: #5cb3f5;
    border: 1px solid #5cb3f5;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5cb3f5;
    color: white;
}