/* Shadcn UI 风格的 CSS */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.5rem;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 3rem);
}

/* 内容区域 */
.content-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* 表格样式 */
.todo-table-container {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 待办项样式 */
.todo-item {
    transition: all 0.2s ease;
}

.todo-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.todo-number {
    font-weight: 600;
    color: hsl(var(--primary));
    text-align: center;
}

.todo-content {
    white-space: pre-line;
}

.todo-content, .todo-execution {
    padding: 0.75rem 1rem;
}

.todo-content[contenteditable="true"],
.todo-execution[contenteditable="true"] {
    border-bottom: 1px dashed #e2e8f0;
    outline: none;
}

.todo-content:focus,
.todo-execution:focus {
    border-bottom-color: hsl(var(--primary));
}

/* 状态徽章 */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-incomplete {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.status-incomplete:hover {
    background-color: #FEE2E2;
}

.status-complete {
    background-color: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.status-complete:hover {
    background-color: #D1FAE5;
}

/* 按钮样式 */
.btn-primary, .btn-success, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.btn-success {
    background-color: #10B981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background-color: hsl(var(--secondary) / 0.8);
}

/* 表单输入 */
.form-input {
    width: 100%;
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--input));
    background-color: transparent;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3);
}

/* 模态框 */
.modal-backdrop {
    transition: opacity 0.2s ease;
}

.modal-container {
    transform: translateY(0);
    transition: transform 0.2s ease;
}

.modal-backdrop.hidden .modal-container {
    transform: translateY(10px);
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.toast-success {
    background-color: #10B981;
    color: white;
}

.toast-error {
    background-color: #EF4444;
    color: white;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .app-container {
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .content-area {
        padding: 0.75rem;
    }
    
    .todo-content, .todo-execution {
        padding: 0.5rem 0.75rem;
    }
    
    .btn-primary, .btn-success, .btn-secondary {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}
