* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
    padding: 20px 15px;
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 100px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 10px;
    position: relative;
}

.header h1 {
    color: #4dabf7;
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header h1 i {
    font-size: 1.6rem;
}

.subtitle {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.date-info {
    background-color: #1e1e1e;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    color: #4dabf7;
    margin-top: 5px;
}

.stats {
    display: flex;
    justify-content: space-between;
    background-color: #1e1e1e;
    padding: 12px 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 0.95rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4dabf7;
}

.stat-label {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 3px;
}

.input-section {
    display: flex;
    margin-bottom: 25px;
    background-color: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
}

.item-input {
    flex: 1;
    padding: 15px;
    background-color: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 1rem;
}

.item-input::placeholder {
    color: #777;
}

.add-btn {
    background-color: #4dabf7;
    color: white;
    border: none;
    padding: 0 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-btn:hover {
    background-color: #339af0;
}

.add-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.category-tabs {
    display: flex;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    gap: 8px;
}

.category-tab {
    padding: 10px 18px;
    background-color: #1e1e1e;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.category-tab.active {
    background-color: #4dabf7;
    color: white;
}

.items-list {
    margin-top: 10px;
}

.item {
    display: flex;
    align-items: center;
    padding: 16px 15px;
    background-color: #1e1e1e;
    margin-bottom: 10px;
    border-radius: 12px;
    transition: all 0.2s;
}

.item:hover {
    background-color: #252525;
}

.item.completed {
    opacity: 0.7;
}

.item-checkbox {
    width: 22px;
    height: 22px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #4dabf7;
}

.item-text {
    flex: 1;
    font-size: 1.05rem;
    word-break: break-word;
}

.item.completed .item-text {
    text-decoration: line-through;
    color: #aaa;
}

.item-actions {
    display: flex;
    gap: 10px;
    margin-left: 10px;
}

.item-action {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn:hover {
    color: #4dabf7;
    background-color: rgba(77, 171, 247, 0.1);
}

.delete-btn:hover {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
}

.edit-input {
    flex: 1;
    padding: 10px;
    background-color: #252525;
    border: 1px solid #4dabf7;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1.05rem;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #777;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #333;
}

.empty-state p {
    font-size: 1.1rem;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    border-top: 1px solid #333;
}

.footer-btn {
    background-color: #333;
    color: #e0e0e0;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    margin: 0 5px;
    transition: background-color 0.2s;
}

.footer-btn:hover {
    background-color: #444;
}

.footer-btn:disabled {
    background-color: #222;
    cursor: not-allowed;
    opacity: 0.5;
}

.footer-btn.primary {
    background-color: #4dabf7;
    color: white;
}

.footer-btn.primary:hover {
    background-color: #339af0;
}

.instructions {
    background-color: #1e1e1e;
    padding: 15px;
    border-radius: 12px;
    margin-top: 30px;
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.5;
}

.instructions h3 {
    color: #4dabf7;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Loading 样式 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #e0e0e0;
    padding: 20px 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.loading i {
    font-size: 1.2rem;
    color: #4dabf7;
}

/* Toast 样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4dabf7;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    max-width: 300px;
    text-align: center;
}

.toast.show {
    opacity: 1;
}

.toast.error {
    background-color: #ff6b6b;
}

.toast.success {
    background-color: #51cf66;
}

/* 编辑模式样式 */
.edit-mode {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.edit-mode .edit-input {
    margin-bottom: 8px;
}

.edit-mode .category-select {
    padding: 8px 12px;
    background-color: #252525;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 0.9rem;
}

.edit-mode .edit-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .item {
        padding: 14px 12px;
    }
    
    .footer-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .stats {
        padding: 10px 15px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
}