/* --- Global Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f5f7; /* 默认背景色 */
    color: #333;
    margin: 0;
    padding: 0; /* 移除全局 padding，让 index.php 控制 */
}
.container {
    /* 移除所有硬编码的背景和阴影，由 index.php 动态控制 */
    margin: 0 auto;
}
header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
header h1 { font-size: 24px; margin: 0 0 5px 0; }
header .subtitle { font-size: 14px; color: #888; margin: 0; }

/* --- Frontend: Activity List --- */
.category-group h2 { font-size: 18px; margin: 25px 0 10px 0; color: #555; }
.category-group ul { list-style: none; padding-left: 0; margin: 0; }
.activity-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
    transition: background-color 1.5s ease-out;
}
.activity-item .activity-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}
.activity-thumbnail {
    width: 40px; height: 40px;
    border-radius: 4px;
    margin-left: 10px;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
}
.activity-title { flex-grow: 1; font-weight: 500; }
.toggle-arrow {
    font-size: 12px; color: #999;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.activity-item.expanded .toggle-arrow { transform: rotate(90deg); }
.activity-details {
    display: none;
    padding: 10px 0 0 20px;
    margin-top: 8px;
    border-top: 1px dashed #eee;
}
.activity-item.expanded .activity-details { display: block; }
.activity-description { font-size: 14px; color: #666; line-height: 1.6; margin: 0 0 15px 0; }

.activity-full-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 15px;
}

.activity-link {
    display: inline-block;
    padding: 4px 10px;
    background-color: #eef5ff;
    color: #007bff;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}

/* --- Frontend: Announcement Modal --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-content h2 { margin-top: 0; }
.modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

/* --- Backend: General --- */
.admin-link { color: #007bff; text-decoration: none; }
.admin-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    max-width: 800px;
}
.admin-section h2 { margin-top: 0; }
.admin-section form { display: flex; flex-direction: column; gap: 12px; }
.admin-section input[type="text"],
.admin-section input[type="url"],
.admin-section input[type="number"],
.admin-section input[type="password"],
.admin-section select,
.admin-section textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}
.admin-section button {
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}
.admin-section button:hover { background-color: #0056b3; }
.message {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* --- Backend: Management List --- */
.category-manage-group h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #f7f7f7;
    border-radius: 4px;
}
.category-manage-group ul { list-style: none; padding-left: 0; }
.category-manage-group li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.category-manage-group li.inactive { color: #999; text-decoration: line-through; }
.item-actions { display: flex; gap: 10px; align-items: center; }
.item-actions a {
    text-decoration: none;
    color: #007bff;
    font-size: 14px;
}
.item-actions a.delete-link { color: #dc3545; }
.item-actions a[title="上移"], .item-actions a[title="下移"] {
    font-weight: bold;
    font-size: 18px;
}

/* --- 前台头部公告样式 --- */
.header-notice {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    color: #d46b08;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
}

/* --- 前台分享按钮样式 --- */
.share-btn {
    background-color:#ffc5cc;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 15px;
    flex-shrink: 0;
}
.share-btn:hover {
    background-color: #0056b3;
}

/* --- 分享链接定位高亮效果 --- */
.activity-item.highlight {
    background-color: #fffbe6;
    border-radius: 4px;
}
