/* Tailwind CSS CDN */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* 自定义颜色变量 */
:root {
    --primary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --dark-blue: #2563eb;
    --accent-purple: #8b5cf6;
    --light-purple: #a78bfa;
    --dark-purple: #7c3aed;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --danger-red: #ef4444;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--dark-blue), var(--dark-purple));
}

/* 标签页切换动画 */
.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 任务卡片样式 */
.task-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.task-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.task-card.priority-high {
    border-left-color: var(--danger-red);
}

.task-card.priority-medium {
    border-left-color: var(--warning-yellow);
}

.task-card.priority-low {
    border-left-color: var(--success-green);
}

.task-card.completed {
    opacity: 0.6;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    color: #9ca3af;
}

/* 闹钟卡片样式 */
.alarm-card {
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-purple);
}

.alarm-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
}

.alarm-card.inactive {
    opacity: 0.5;
    border-left-color: #9ca3af;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-blue), #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent-purple), var(--dark-purple));
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--dark-purple), #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* 输入框样式 */
.input-field {
    transition: all 0.3s ease;
}

.input-field:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 复选框样式 */
.custom-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.custom-checkbox:checked {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    border-color: var(--primary-blue);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 模态框动画 */
#reminder-modal {
    transition: opacity 0.3s ease;
}

#reminder-modal.show {
    opacity: 1;
}

/* 图标样式 */
.icon {
    display: inline-block;
    vertical-align: middle;
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

/* 优先级标签 */
.priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.priority-badge-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-badge-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-badge-low {
    background: #d1fae5;
    color: #059669;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .task-card:hover {
        transform: none;
    }
    
    .alarm-card:hover {
        transform: none;
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 成功动画 */
@keyframes success {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-animation {
    animation: success 0.3s ease;
}

/* 时间显示样式 */
.time-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--primary-blue);
    font-size: 1.1em;
}

/* 星期选择器样式 */
.day-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.day-selector label {
    transition: all 0.3s ease;
}

.day-selector label:hover {
    color: var(--primary-blue);
}

.day-selector input[type="checkbox"]:checked + span {
    color: var(--primary-blue);
    font-weight: bold;
}

/* 统计卡片动画 */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
}
