/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

a {
    color: #f5222d;
    text-decoration: none;
}

a:hover {
    color: #ff4d4f;
}

/* 主内容区 */
.main {
    min-height: calc(100vh - 120px);
    padding: 20px 0;
    padding-bottom: 80px;
}

/* 网站统计卡片 */
.site-stats-card {
    background: linear-gradient(135deg, #f5222d 0%, #ff4d4f 50%, #ff7875 100%);
    border-radius: 16px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(245, 34, 45, 0.2);
}

.site-stats-card .stats-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 24px 20px;
}

.site-stats-card .stat-item {
    display: grid;
    place-items: center;
    text-align: center;
}

.site-stats-card .stat-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
}

.site-stats-card .stat-icon {
    width: 24px;
    height: 24px;
    color: #fff;
}

.site-stats-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.site-stats-card .stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.site-stats-card .stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

/* 网站公告栏 */
.announcement-bar {
    background: linear-gradient(135deg, #fff1f0 0%, #fff 100%);
    border: 2px solid #ffccc7;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(245, 34, 45, 0.15);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-bar .announcement-icon {
    width: 24px;
    height: 24px;
    color: #cf1322;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-bar .announcement-content {
    flex: 1;
    color: #cf1322;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    text-align: center;
}

.announcement-bar .announcement-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #cf1322;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.announcement-bar .announcement-close:hover {
    background: rgba(207, 19, 34, 0.1);
}

/* 图片类型筛选栏 */
.filter-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn {
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-btn i {
    font-size: 16px;
}

.filter-btn:hover {
    border-color: #f5222d;
    color: #f5222d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 34, 45, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #f5222d 0%, #ff4d4f 100%);
    border-color: #f5222d;
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 34, 45, 0.3);
}

/* 弹窗公告 */
.popup-announcement {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
}

.popup-announcement .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.popup-announcement .popup-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-announcement .popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 1;
}

.popup-announcement .popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.popup-announcement .popup-header {
    padding: 30px 30px 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.popup-announcement .popup-icon {
    width: 32px;
    height: 32px;
    color: #f5222d;
    display: grid;
    place-items: center;
}

.popup-announcement .popup-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.popup-announcement .popup-body {
    padding: 25px 30px;
    color: #666;
    font-size: 15px;
    line-height: 1.8;
}

.popup-announcement .popup-btn {
    width: calc(100% - 60px);
    margin: 0 30px 30px;
    padding: 14px;
    background: linear-gradient(135deg, #f5222d 0%, #ff4d4f 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(245, 34, 45, 0.3);
}

.popup-announcement .popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 34, 45, 0.4);
}

/* 后台公告预览 */
.preview-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.preview-section h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.announcement-preview {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed #d9d9d9;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.image-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.image-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.image-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* 默认比例 3:4 (75%) */
.image-wrapper::before {
    content: "";
    display: block;
    padding-top: 133.33%; /* 4 / 3 * 100% */
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 标题覆盖层 */
.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px 16px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.image-title {
    font-size: 15px;
    margin: 0;
    color: #fff;
    font-weight: 500;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.image-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.page-link {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #666;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: #f5222d;
    border-color: #f5222d;
    color: #fff;
}

.page-dots {
    padding: 8px 12px;
    color: #999;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    border-top: 1px solid #f0f0f0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #999;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 15px;
    transition: all 0.3s;
    flex: 1;
    max-width: 120px;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s;
}

.nav-item:hover {
    color: #f5222d;
}

.nav-item.active {
    color: #f5222d;
}

.nav-item.active svg {
    stroke: #f5222d;
    fill: rgba(245, 34, 45, 0.1);
}

/* 登录页面 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

/* 后台管理页面 */
.admin-page {
    background: #f0f2f5;
}

.admin-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.admin-header .logo h2 {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.admin-header .logo a {
    text-decoration: none;
    color: inherit;
}

/* 功能导航卡片 - 彩色渐变风格 */
.nav-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.nav-card {
    position: relative;
    border-radius: 16px;
    padding: 35px 20px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    overflow: hidden;
}

/* 所有按钮使用统一的渐变红色背景 */
.nav-card {
    background: linear-gradient(135deg, #f5222d 0%, #ff4d4f 100%);
}

/* 添加装饰性背景图案 */
.nav-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.nav-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.nav-card:hover::before {
    top: -30%;
    right: -30%;
}

.nav-card.active {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.nav-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    line-height: 1;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.nav-card-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.nav-card:hover .nav-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
}

.nav-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-card-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.logout-btn {
    color: #ff4d4f !important;
}

/* 页面标题 */
.page-header {
    background: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.page-header .section-title {
    font-size: 24px;
    color: #333;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.page-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.admin-main {
    padding: 30px 0;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f5222d 0%, #ff4d4f 100%);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(245, 34, 45, 0.3);
    text-align: center;
    color: #fff;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* 内容框 */
.content-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.box-header {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.box-header h3 {
    font-size: 18px;
    color: #333;
}

/* 表格 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #fafafa;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.data-table th {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.thumb-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.text-center {
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
}

.badge-warning {
    background: #fffbe6;
    color: #faad14;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* 表单 */
.form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input[type="url"] {
    padding: 14px 16px;
    font-size: 16px;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 0;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

/* 隐藏默认的文件名显示 */
.form-group input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
    width: 0;
}

.form-group input[type="file"]::file-selector-button {
    display: none;
}

/* 使用 label 包装器来美化 */
.file-input-container {
    position: relative;
    width: 100%;
}

.file-input-container input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 25px 30px;
    border: 2px dashed #d9d9d9;
    border-radius: 12px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

/* 添加脉冲动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.file-input-label .upload-icon {
    font-size: 36px;
    line-height: 1;
    animation: pulse 2s ease-in-out infinite;
}

.file-input-label:hover .upload-icon {
    animation: none;
    transform: scale(1.1);
}

.file-input-label .upload-text {
    text-align: center;
}

.file-input-label .upload-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.file-input-label .upload-hint {
    font-size: 13px;
    color: #999;
}

.file-input-label:hover {
    border-color: #f5222d;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 34, 45, 0.15);
}

.file-input-container input[type="file"]:focus + .file-input-label,
.file-input-container input[type="file"]:hover + .file-input-label {
    border-color: #f5222d;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e6 100%);
    box-shadow: 0 0 0 4px rgba(245, 34, 45, 0.1);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #f5222d;
    box-shadow: 0 0 0 3px rgba(245, 34, 45, 0.1);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #f5222d;
}

/* 表单 Grid 布局 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* 类型选择器样式 - 全新设计 */
.type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.type-selector input[type="radio"] {
    display: none;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 95px;
    position: relative;
    overflow: hidden;
}

/* 选中指示器 */
.type-card::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #f5222d;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.type-card .type-icon {
    font-size: 28px;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 1;
}

.type-card .type-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    z-index: 1;
}

.type-card .type-desc {
    font-size: 11px;
    color: #999;
    z-index: 1;
}

/* 选中状态 */
.type-selector input[type="radio"]:checked + .type-card {
    border-color: #f5222d;
    border-width: 2px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e6 100%);
    box-shadow: 0 2px 8px rgba(245, 34, 45, 0.15);
}

.type-selector input[type="radio"]:checked + .type-card::after {
    opacity: 1;
    transform: scale(1);
}

.type-selector input[type="radio"]:checked + .type-card .type-icon {
    transform: scale(1.1);
}

.type-selector input[type="radio"]:checked + .type-card .type-name {
    color: #f5222d;
    font-weight: 700;
}

/* 悬停效果 */
.type-card:hover {
    border-color: #ff7875;
    background: #fafafa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.type-card:hover .type-icon {
    transform: scale(1.05);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #f5222d;
    color: #fff;
}

.btn-primary:hover {
    background: #ff4d4f;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

.btn-danger:hover {
    background: #ff7875;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* 警告框 */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-stats-card {
        border-radius: 14px;
        margin-bottom: 20px;
    }
    
    .site-stats-card .stats-content {
        padding: 20px 15px;
    }
    
    .site-stats-card .stat-icon-wrapper {
        width: 44px;
        height: 44px;
    }
    
    .site-stats-card .stat-icon {
        width: 22px;
        height: 22px;
    }
    
    .site-stats-card .stat-value {
        font-size: 26px;
    }
    
    .site-stats-card .stat-label {
        font-size: 11px;
    }
    
    .site-stats-card .stat-divider {
        height: 36px;
    }
    
    .announcement-bar {
        padding: 12px 15px;
        gap: 8px;
    }
    
    .announcement-bar .announcement-icon {
        width: 20px;
        height: 20px;
    }
    
    .announcement-bar .announcement-content {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .announcement-bar .announcement-close {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
    
    .popup-announcement .popup-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .popup-announcement .popup-header {
        padding: 25px 20px 15px;
    }
    
    .popup-announcement .popup-icon {
        width: 28px;
        height: 28px;
    }
    
    .popup-announcement .popup-header h3 {
        font-size: 18px;
    }
    
    .popup-announcement .popup-body {
        padding: 20px;
        font-size: 14px;
    }
    
    .popup-announcement .popup-btn {
        width: calc(100% - 40px);
        margin: 0 20px 25px;
        padding: 12px;
        font-size: 15px;
    }
    
    .filter-bar {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .filter-btn {
        padding: 10px 12px;
        font-size: 13px;
        gap: 4px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* 手机端图片卡片优化 */
    .image-card {
        border-radius: 10px;
    }
    
    /* 手机端比例调整为 2:3 (约 150%) */
    .image-wrapper::before {
        padding-top: 150%;
    }
    
    .image-info {
        padding: 40px 12px 12px;
    }
    
    .image-title {
        font-size: 14px;
    }
    
    /* 底部导航栏移动端优化 */
    .bottom-nav {
        padding: 6px 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .nav-item {
        padding: 4px 15px;
        font-size: 11px;
    }
    
    .nav-item svg {
        width: 22px;
        height: 22px;
    }
    
    /* 后台头部优化 */
    .admin-header .container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .admin-header .logo h2 {
        font-size: 18px;
        text-align: center;
    }
    
    .admin-nav {
        gap: 10px;
    }
    
    .nav-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .nav-card {
        padding: 25px 15px;
    }
    
    .nav-card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .nav-card-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .nav-card-title {
        font-size: 16px;
    }
    
    .nav-card-desc {
        font-size: 12px;
    }
    
    .page-header {
        padding: 20px;
    }
    
    .page-header .section-title {
        font-size: 20px;
    }
    
    .page-desc {
        font-size: 13px;
    }
    
    /* 统计卡片优化 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    /* 表格优化 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        font-size: 13px;
        min-width: 800px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    .thumb-img {
        width: 50px;
        height: 50px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* 表单优化 */
    .form {
        padding: 15px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    .form-group input[type="url"] {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    /* 表单 Grid 布局移动端优化 */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 类型选择器移动端优化 */
    .type-selector {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .type-card {
        min-height: 85px;
        padding: 14px 12px;
    }
    
    .type-card .type-icon {
        font-size: 26px;
    }
    
    .type-card .type-name {
        font-size: 14px;
    }
    
    .type-card .type-desc {
        font-size: 11px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* 模态框优化 */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    /* 移动端提示 */
    .mobile-hint {
        display: block !important;
        margin-top: 8px;
        font-size: 12px;
    }
    
    /* 登录页面移动端优化 */
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .pagination {
        flex-wrap: wrap;
    }
    
    .site-stats-card .stats-content {
        padding: 18px 12px;
    }
    
    .site-stats-card .stat-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .site-stats-card .stat-icon {
        width: 20px;
        height: 20px;
    }
    
    .site-stats-card .stat-value {
        font-size: 24px;
    }
    
    .site-stats-card .stat-label {
        font-size: 10px;
    }
    
    .site-stats-card .stat-divider {
        height: 32px;
    }
    
    /* 超小屏幕后台按钮优化 */
    .nav-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .nav-card {
        padding: 20px 15px;
    }
    
    .nav-card-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
    }
    
    .nav-card-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .nav-card-title {
        font-size: 15px;
    }
    
    .nav-card-desc {
        font-size: 11px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
    
    .image-card {
        border-radius: 14px;
    }
    
    .image-wrapper::before {
        padding-top: 133.33%; /* 大屏幕恢复 3:4 */
    }
    
    .image-info {
        padding: 50px 18px 18px;
    }
    
    .image-title {
        font-size: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .stat-card {
        padding: 30px;
    }
    
    .stat-value {
        font-size: 42px;
    }
}

/* 下载设置页面样式 */
.settings-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.settings-form .form-group {
    margin-bottom: 25px;
}

.settings-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

.settings-form input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
}

.settings-form input[type="number"]:focus {
    outline: none;
    border-color: #f5222d;
    box-shadow: 0 0 0 3px rgba(245, 34, 45, 0.1);
}

.settings-form small {
    display: block;
    margin-top: 8px;
    color: #999;
    font-size: 13px;
}

.download-stats {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.download-stats h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
