/* 基础重置和变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-light: #6366f1;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --background: #f8fafc;
    --card-bg: white;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 移动优先基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px 0;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* 输入组件 */
.input-row {
    margin-bottom: 16px;
}

.input-row input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.input-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.button-row {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 14px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 群组区域 */
.group-section {
    margin-bottom: 32px;
}



.info-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.info-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.group-id {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    font-family: monospace;
}

/* 任务区域 */
.task-section {
    flex: 1;
}

.add-task {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.task-stats {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* 任务列表 */
.task-list {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.task-item:last-child {
    border-bottom: none;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-checkbox.checked {
    background: var(--success-color);
    border-color: var(--success-color);
    position: relative;
}

.task-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-text {
    font-size: 16px;
    line-height: 1.4;
    word-wrap: break-word;
}

.task-text.completed {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit {
    background: #f59e0b;
    color: white;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

/* 空状态 */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

/* 底部 */
.footer {
    margin-top: 32px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 平板样式 */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
        padding: 24px;
    }
    
    .header h1 {
        font-size: 32px;
    }
    
    .input-group input,
    .btn-primary,
    .btn-secondary {
        font-size: 16px;
    }
}

/* 桌面样式 */
@media (min-width: 1024px) {
    .container {
        max-width: 800px;
        padding: 32px;
    }
    
    .task-item {
        padding: 20px 24px;
    }
}
