/* 主题色与基础变量（中文注释） */
: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; }

/* 页面内容容器宽度 - 限制宽度以保持3列最佳视觉效果 */
.container { max-width: 1100px; 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; /* 消除图片底部间隙 */
}

/* 针对 admin.html 中直接在 site-header 使用 container 的情况修复间距 */
.site-header .container {
    line-height: 1.6;
    text-align: center;
}
.site-header .container h1 {
    margin-bottom: 15px;
}
.site-header .container p {
    margin-top: 5px;
    opacity: 0.9;
}

.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 { ... } */
/* 活动列表网格布局 - 使用Grid实现对齐 */
.grid { 
    display: grid;
    grid-template-columns: repeat(auto-fill, 320px);
    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; /* 去除下划线 */
    
    /* Fixed card size */
    width: 100%;       /* 让卡片填满网格单元 */
    max-width: 100%;
}

/* Responsive columns - handled by Grid auto-fill, just ensure container allows centering */
@media (max-width: 700px) {
    .grid {
        grid-template-columns: 1fr; /* 单列铺满 */
        padding: 20px;
    }
}

/* 响应式调整已由Flexbox自动处理，无需媒体查询强制列数 */
/* .card { position: relative; } */
.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: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg);
    color: var(--fg);
}
.admin-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}
.admin-form button:hover { opacity: 0.9; }

/* Card Decoration Schemes (Programmatic alternatives to images) */
.card-deco {
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-deco i {
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .card-deco i {
    transform: scale(1.2) rotate(5deg);
}

/* Common Background Decor (Watermark Icon) */
.card-deco::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 8rem;
    opacity: 0.1;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 1;
}

/* --- Enhanced Gradient Schemes --- */

/* Purple (Music/Singing) - Deep & Vibrant */
.card-deco-gradient-purple {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    position: relative;
}
.card-deco-gradient-purple::after {
    content: '\f130'; /* Microphone icon watermark */
    font-family: "Font Awesome 6 Free";
    position: absolute;
    right: -10%;
    bottom: -20%;
    font-size: 8rem;
    color: rgba(255,255,255,0.1);
    transform: rotate(-15deg);
    font-weight: 900;
}

/* Pink (Love/Charity) - Warm & Soft */
.card-deco-gradient-pink {
    background: linear-gradient(to top, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    position: relative;
}
.card-deco-gradient-pink::after {
    content: '\f004'; /* Heart */
    font-family: "Font Awesome 6 Free";
    position: absolute;
    right: -10%;
    bottom: -20%;
    font-size: 8rem;
    color: rgba(255,255,255,0.15);
    transform: rotate(10deg);
    font-weight: 900;
}

/* Blue (Tech/Camera) - Cool & Crisp */
.card-deco-gradient-blue {
    background: linear-gradient(120deg, #89f7fe 0%, #66a6ff 100%);
    position: relative;
}
.card-deco-gradient-blue::after {
    content: '\f030'; /* Camera */
    font-family: "Font Awesome 6 Free";
    position: absolute;
    right: -10%;
    bottom: -20%;
    font-size: 8rem;
    color: rgba(255,255,255,0.15);
    transform: rotate(-10deg);
    font-weight: 900;
}

/* --- Pattern Schemes --- */

/* Yellow (Fun/Games) - Playful */
.card-deco-pattern-yellow {
    background-color: #f6d365;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.2) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.2) 0%, transparent 20%),
        linear-gradient(120deg, #f6d365 0%, #fda085 100%);
    position: relative;
}
.card-deco-pattern-yellow::after {
    content: '\f11b'; /* Gamepad */
    font-family: "Font Awesome 6 Free";
    position: absolute;
    right: -10%;
    bottom: -15%;
    font-size: 9rem;
    color: rgba(255,255,255,0.2);
    transform: rotate(15deg);
    font-weight: 900;
}

/* Orange (Gifts/Merch) - Festive */
.card-deco-pattern-orange {
    background: linear-gradient(to right, #ffecd2 0%, #fcb69f 100%);
    background-image: 
        repeating-linear-gradient(45deg, rgba(255,255,255,0.1) 0px, rgba(255,255,255,0.1) 20px, transparent 20px, transparent 40px),
        linear-gradient(to right, #ffecd2 0%, #fcb69f 100%);
    position: relative;
}
.card-deco-pattern-orange::after {
    content: '\f06b'; /* Gift */
    font-family: "Font Awesome 6 Free";
    position: absolute;
    right: -5%;
    bottom: -15%;
    font-size: 8rem;
    color: rgba(255,255,255,0.25);
    transform: rotate(-5deg);
    font-weight: 900;
}

/* Fallback Icon Style */
.card-deco-icon {
    background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
    color: #555;
    position: relative;
}


/* Fallback for basic types if still used */
.card-deco-gradient {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}
.card-deco-pattern {
    background-color: #fff8f0;
    background-image: radial-gradient(#C07C59 2px, transparent 2px);
    background-size: 20px 20px;
    color: #C07C59;
}
.card-deco-icon {
    background-color: #C07C59;
    color: rgba(255,255,255,0.9);
}

.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; }
