/* 主题色与基础变量（中文注释） */
:root { --bg: #ffffff; --fg: #111111; --muted: #666666; --card-bg: #ffffff; --border: #e5e7eb; --shadow: 0 8px 24px rgba(0,0,0,.08); --primary: #2563eb; }
/* 深色模式适配 */
@media (prefers-color-scheme: dark) { :root { --bg: #0b0f17; --fg: #f3f4f6; --muted: #9ca3af; --card-bg: #111827; --border: #1f2937; --shadow: 0 8px 24px rgba(0,0,0,.5); } }
/* 全局盒模型与基础排版 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji"; line-height: 1.6; background: #DB8B58; color: #ffffff; display: flex; flex-direction: column; min-height: 100vh; }

/* Cat Paw Decoration */
.cat-paw-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

/* Ensure content is above decoration */
main {
    position: relative;
    z-index: 2;
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding-top: 120px;
    padding-bottom: 40px;
}

/* Simple Page Header (Text Only) */
.page-header-simple {
    text-align: center;
    padding-top: 0;
    padding-bottom: 30px;
    color: #ffffff;
}

.page-header-simple h1 {
    margin: 0;
    font-size: 2.8rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header-simple p {
    margin-top: 10px;
    font-size: 1.1rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

@media (max-width: 992px) {
    main {
        padding-top: 100px;
    }
}

/* Update card text color since body is now white text */
.card { color: #333; }

/* 页面内容容器宽度 - 增加宽度以容纳4列 */
.container { max-width: 1400px; margin: 0 auto; padding: 24px; }
/* 注册自定义字体 */
@font-face {
    font-family: 'ZiYouFangHuaTi';
    src: url('/assets/ZiYouFangHuaTi.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 页头区域 */
.site-header { 
    border-bottom: none; 
    position: relative;
    padding: 0;
    min-height: auto;
    background: none;
    line-height: 0; /* 消除图片底部间隙 */
}
.header-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* 页面标题文本区 */
.page-header-text {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 20px;
}
.page-header-text h1 { 
    margin: 0; 
    font-size: 28px; 
    color: #ffffff; /* Adapted for green background */
}
.page-header-text p { 
    margin: 8px 0 0; 
    color: rgba(255, 255, 255, 0.9); 
}

/* 状态筛选标签 */
.filter-container { 
    margin-top: 0; 
    margin-bottom: 20px; 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
}
.filter-chip { appearance: none; border: none; color: #fff; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 700; box-shadow: 0 6px 16px rgba(0,0,0,.12); position: relative; transition: transform .2s ease, filter .2s ease; }
.chip-all { background: #9ca3af; color: #fff; }
.chip-limited { background: #f59e0b; }
.chip-permanent { background: #10b981; }
.chip-completed { background: #ef4444; }
.filter-chip.active { border: none; outline: none; color: #000; filter: brightness(1.15); }
.filter-chip:active { transform: scale(.96); }
@keyframes chipPulse { 0% { transform: scale(1); filter: brightness(1); } 20% { transform: scale(.94); filter: brightness(1.1); } 100% { transform: scale(1); filter: brightness(1); } }
.filter-chip.feedback { animation: chipPulse .4s ease; }
/* 移除旧的 h1/p 样式，已在 .page-header-text 中重新定义 */
/* .site-header h1 { margin: 0; font-size: 28px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); } */
/* .site-header p { margin: 8px 0 0; color: rgba(255,255,255,0.9); text-shadow: 0 1px 2px rgba(0,0,0,0.5); } */
/* 头部装饰动图区域：已移除 */
/* .header-decor { ... } */
/* .decor { ... } */
/* 活动列表网格布局 - 使用Flexbox实现居中 */
.grid { 
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px; 
    padding: 20px 0;
}

/* 卡片样式 */
.card { 
    background: var(--card-bg); 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    transition: transform .2s ease, box-shadow .2s ease; 
    display: flex; 
    flex-direction: column; 
    color: #333;
    font-size: 0.9em; /* 稍微减小字体 */
    text-decoration: none; /* 去除下划线 */
    
    /* Flex item sizing */
    flex: 1 1 280px;
    max-width: 360px;
    width: 100%; /* Ensure it fills the flex basis/width */
}
/* 响应式调整已由Flexbox自动处理，无需媒体查询强制列数 */
.card { position: relative; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.12); border-color: var(--primary); }
.card:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .2); }
/* 图片完整展示，不裁剪 */
.card img { width: 100%; height: 180px; object-fit: contain; background: #dddddd; }
/* 内容区与日期、状态徽章定位 */
.card-content { padding: 20px 16px 16px 16px; position: relative; min-height: 150px; display: flex; flex-direction: column; }
.card-content h3 { word-break: break-word; }
.card-meta { margin-top: auto; text-align: right; font-size: 12px; color: var(--muted); }
.badge { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.badge-permanent { background: #10b981; }
.badge-limited { background: #f59e0b; }
.badge-completed { background: #ef4444; }
.card-content h3 { margin: 0 0 6px; font-size: 18px; }
.card-content p { margin: 0; color: var(--muted); font-size: 14px; }

/* Footer */
.simple-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 5px;
    background: #333;
    color: #fff;
    font-size: 0.9rem;
    margin-top: 40px;
}
/* 后台表单样式（简洁复用现有按钮色） */
.admin-form { display: grid; gap: 16px; max-width: 720px; }
.form-row { display: grid; gap: 8px; }
.form-row label { font-weight: 700; color: var(--fg); }
.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="datetime-local"],
.admin-form textarea,
.admin-form select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); color: var(--fg); }
.form-actions { display: flex; gap: 12px; align-items: center; }
.preview { margin-top: 8px; }
.admin-list h2 { margin-top: 24px; }
