/* 新年断舍离 AI 清理官 - 样式表 */
:root {
    --primary-color: #dc3545;
    --secondary-color: #198754;
    --accent-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #fdfcfb 0%, #f5f7fa 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
}

/* 标题样式 */
.display-4 {
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.card-header {
    border-bottom: none;
    padding: 1.5rem;
    font-size: 1.25rem;
}

/* 表单样式 */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* 按钮样式 */
.btn {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.btn-danger {
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
}

.btn-danger:hover {
    background: linear-gradient(45deg, #c82333, #e63946);
    transform: translateY(-2px);
}

/* 清理结果样式 */
.cleanup-result {
    background: var(--light-bg);
    border-radius: 15px;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.result-emoji {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    width: 40px;
    text-align: center;
}

.result-title {
    font-weight: 600;
    color: var(--dark-bg);
    font-size: 1.1rem;
}

.result-reason {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--accent-color);
}

.result-suggestion {
    color: var(--secondary-color);
    font-weight: 500;
    background: rgba(25, 135, 84, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .result-item {
        padding: 1rem;
    }
}

/* 滚动条样式 */
.cleanup-result::-webkit-scrollbar {
    width: 8px;
}

.cleanup-result::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cleanup-result::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.cleanup-result::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 分享按钮特效 */
.btn-info {
    background: linear-gradient(45deg, #17a2b8, #20c997);
}

.btn-info:hover {
    background: linear-gradient(45deg, #138496, #1ba87e);
}

/* 页脚样式 */
footer {
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
}

footer a:hover {
    text-decoration: underline;
}

/* 新增动画效果 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 微交互效果 */
.btn:active {
    transform: scale(0.98);
}

.form-control:invalid {
    animation: shake 0.5s ease;
}

/* 节日特效 */
.festival-effect {
    position: relative;
    overflow: hidden;
}

.festival-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 215, 0, 0.1) 50%,
        transparent 70%
    );
    animation: float 3s infinite linear;
    z-index: 0;
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

/* 节日装饰 */
.holiday-decoration {
    position: relative;
}

.holiday-decoration::after {
    content: '🎊';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
    animation: float 2s infinite ease-in-out;
}

/* 加载进度条 */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    background-size: 300% 100%;
    animation: progress-animation 2s infinite linear;
}

@keyframes progress-animation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

/* 手机端优化 */
@media (max-width: 576px) {
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .card-header {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* 打印样式 */
@media print {
    .btn, #copy-btn, #share-btn, #reset-btn {
        display: none !important;
    }
    
    .cleanup-result {
        max-height: none;
        overflow: visible;
    }
    
    .result-item {
        break-inside: avoid;
    }
}