/* 汉服预约系统 - 前端样式 */
:root {
    --primary-color: #C41E3A;
    --secondary-color: #D4AF37;
    --bg-color: #F5F0E6;
    --text-color: #4A3728;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-color);
    position: relative;
}

/* 公告栏 */
.announcement-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 15px;
    overflow: hidden;
    position: relative;
}

.announcement-bar marquee {
    display: block;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, var(--primary-color), #8B1428);
    color: var(--white);
    padding: 15px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.header-title-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-title-wrap h1 {
    margin-bottom: 4px;
}

.header-title-wrap p {
    margin: 0;
}

/* 内容区域 */
.content {
    padding: 15px;
    padding-bottom: 100px;
}

/* 内部登录按钮 */
.admin-login-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
}

.admin-login-bottom {
    text-align: center;
    padding: 16px 0 72px;
    transform: translateY(-24px);
    background: var(--bg-color);
}

.admin-login-bottom a {
    display: inline-block;
    background: rgba(196, 30, 58, 0.1);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(196, 30, 58, 0.3);
}

/* 分类标签 */
.filter-tabs {
    display: flex;
    background: var(--white);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tab {
    flex: 1;
    min-width: 60px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    color: #666;
    background: transparent;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-tab.active {
    background: var(--primary-color);
    color: #fff;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* 卡片 */
.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    touch-action: manipulation;
}

.card-clickable {
    transition: transform 0.3s;
    touch-action: manipulation;
    position: relative;
}

.card-clickable:active {
    transform: scale(0.98);
}

.card-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: #eee;
}

.card-info {
    padding: 10px;
}

.card-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

.card-info p {
    font-size: 12px;
    color: #888;
}

/* 联系按钮 */
.contact-btn {
    position: fixed;
    bottom: 80px;
    right: 15px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    cursor: pointer;
    z-index: 100;
    font-size: 24px;
}

.shop-footer {
    margin: 15px 0;
    margin-bottom: 80px;
    background: var(--white);
    border-radius: 12px;
    padding: 20px 15px;
    box-shadow: var(--shadow);
}

.shop-footer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.shop-footer-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.shop-footer-item:last-of-type {
    border-bottom: none;
}

.shop-footer-icon {
    width: 40px;
    height: 40px;
    background: #fff5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    margin-right: 12px;
}

.shop-footer-info {
    flex: 1;
    min-width: 0;
}

.shop-footer-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
}

.shop-footer-value {
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.shop-footer-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-footer-phone {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.shop-footer-copy {
    flex-shrink: 0;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    line-height: 1.4;
}

.shop-footer-copy:active {
    opacity: 0.8;
}

.shop-footer-qrcode {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.shop-footer-qrcode img {
    width: 210px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 8px;
}

.shop-footer-qrcode-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--white);
    display: flex;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    text-decoration: none;
    font-size: 12px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item .icon {
    font-size: 22px;
    margin-bottom: 3px;
}

/* 预约按钮 */
.booking-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

@media (max-width: 320px) {
    .booking-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* 联系弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 200;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 480px;
    border-radius: 20px 20px 0 0;
    padding: 25px;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
}

.contact-info h4 {
    font-size: 14px;
    margin-bottom: 3px;
}

.contact-info p {
    font-size: 13px;
    color: #666;
}

.contact-action {
    margin-left: auto;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    border: none;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: var(--primary-color);
}

/* 日期选择 */
.date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.date-item {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    background: var(--white);
    padding: 2px;
}

.date-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.date-item.selected {
    background: var(--primary-color);
    color: var(--white);
}

.date-item .day {
    font-size: 10px;
    margin-bottom: 3px;
}

/* 档期选择 */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.slot-item {
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    background: var(--white);
    border: 1px solid #ddd;
}

.slot-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
}

.slot-item.selected {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 图片上传 */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: var(--white);
}

.upload-slots {
    display: flex;
    gap: 10px;
    min-height: 120px;
}

.upload-slot {
    flex: 1;
    max-width: 200px;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
    position: relative;
}

.upload-slot:hover {
    border-color: var(--primary-color);
    background: #fff5f5;
}

.upload-slot-icon {
    font-size: 36px;
    color: #ccc;
    line-height: 1;
    user-select: none;
}

.upload-slot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.upload-slot.has-image:hover .upload-slot-actions {
    opacity: 1;
    pointer-events: auto;
}

.upload-slot-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(0,0,0,0.45);
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.slot-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s, background 0.15s;
}

.slot-action:hover {
    transform: scale(1.15);
    background: #fff;
}

.slot-action-del:hover {
    background: #ffe0e0;
}

.upload-slot-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: upload-spin 0.7s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

.upload-slot-pct {
    display: block;
    font-size: 11px;
    color: var(--primary-color);
    text-align: center;
    margin-top: 4px;
}

@keyframes upload-spin {
    to { transform: rotate(360deg); }
}

/* HTTP 上传进度条 */
.upload-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.upload-progress-track {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.2s;
}

.upload-progress-text {
    font-size: 12px;
    color: var(--primary-color);
    white-space: nowrap;
    min-width: 72px;
}

/* 验证码 */
.captcha-group {
    display: flex;
    gap: 10px;
}

.captcha-group .form-input {
    flex: 1;
}

#captchaImg {
    height: 40px;
    width: 120px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: opacity 0.2s;
    display: block;
}

#captchaImg:hover {
    opacity: 0.85;
}

#captchaImg.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.captcha-img-wrap {
    position: relative;
    display: inline-block;
}

.captcha-placeholder {
    height: 40px;
    width: 120px;
    border-radius: 8px;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    font-size: 13px;
    transition: all 0.2s;
}

.captcha-placeholder:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(78, 128, 206, 0.04);
}

.captcha-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    color: #999;
    pointer-events: none;
}

.captcha-btn {
    padding: 0 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.captcha-btn:disabled {
    background: #ccc;
}

/* 页面标题 */
.page-header {
    background: var(--white);
    padding: 15px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
}

.back-btn {
    font-size: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.header .back-btn {
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
}

.header .page-header-btn {
    /* margin-left: auto; */
}

.page-header-btn {
    padding: 8px 20px;
    background: var(--white);
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
}

/* 二维码区域 */
.qr-section {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 15px;
}

.qr-code {
    width: 180px;
    height: 180px;
    margin: 15px auto;
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 反馈图片 */
.feedback-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.feedback-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 999;
    display: none;
}

.toast.show {
    display: block;
    animation: fadeInOut 2s;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #888;
}

.empty-state .icon {
    font-size: 50px;
    margin-bottom: 15px;
}

/* 物料详情弹窗 - 不可关闭 */
.material-modal {
    background: rgba(0,0,0,0.9);
    overflow-y: auto;
}

.material-modal-content {
    border-radius: 0;
    min-height: 100vh;
    position: relative;
    padding-bottom: 100px;
}

.material-header {
    background: var(--primary-color);
    color: white;
    padding: 20px 15px;
    margin: -25px -25px 20px -25px;
    border-radius: 20px 20px 0 0;
}

.material-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.material-header p {
    opacity: 0.9;
    font-size: 14px;
}

.material-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.material-image-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.material-feedback-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.material-close-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    z-index: 301;
}

/* 二级分类标签 */
.sub-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.sub-category-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    background: #f5f5f5;
    color: #666;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.sub-category-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 物料详情区域标题 */
.detail-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    padding: 10px 0;
    border-bottom: 2px solid var(--primary-color);
}

/* 时段选择弹窗 */
.slots-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
}

.slots-popup.show {
    display: flex;
    align-items: center;
}

.slots-popup-content {
    background: white;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 20px;
    padding: 20px;
    animation: fadeIn 0.25s ease;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.popup-header h3 {
    margin: 0;
}

.close-popup-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.slot-item {
    padding: 12px 8px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: #f5f5f5;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.slot-item:hover {
    background: #e8e8e8;
}

.slot-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #fafafa;
}

.slot-item.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.slot-item .slot-time-text {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

.slot-item .slot-capacity {
    display: block;
    font-size: 10px;
    margin-top: 3px;
    opacity: 0.7;
}

.slot-item.selected .slot-capacity {
    color: #fff;
    opacity: 0.9;
}

.slot-item.past-slot {
    opacity: 0.8;
    border-style: dashed;
}

.slot-item.past-slot:hover {
    background: #e8f5e9;
}

.slot-past-label {
    display: block;
    font-size: 10px;
    margin-top: 3px;
    color: #4CAF50;
    font-weight: 500;
}

.popup-actions {
    display: flex;
    gap: 10px;
}

.popup-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.btn-confirm {
    background: var(--primary-color);
    color: white;
}

/* 验证码显示样式 */
.captcha-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-code {
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 18px;
    letter-spacing: 4px;
    font-weight: bold;
    color: #333;
    user-select: none;
    cursor: pointer;
    border: 1px dashed #ccc;
}

.captcha-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 预约页面 */
.date-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.date-nav button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.date-item.today {
    border: 2px solid var(--primary-color);
}

.date-item.has-selection {
    background: #4CAF50 !important;
    color: white !important;
}

.date-item .selection-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
}

.selected-summary {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.selected-summary h4 {
    margin-bottom: 10px;
    color: #333;
}

.selected-date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.selected-date-item:last-child {
    border-bottom: none;
}

.selected-date-slots {
    color: #666;
    font-size: 13px;
}

.remove-date-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
}

/* 大图查看弹窗 */
.image-viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.95);
    position: relative;
}

.image-viewer-content img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    z-index: 401;
}

/* 缓存标记图片 */
.cache-indicator {
    position: fixed;
    bottom: 66px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.25;
    pointer-events: none;
    z-index: 99;
}
.cache-indicator img {
    height: 20px;
    width: auto;
}

/* 响应式适配：从 320px 到 480px 及以上 */
@media (min-width: 400px) {
    .content {
        padding: 18px 20px;
        padding-bottom: 100px;
    }
}

@media (min-width: 480px) {
    .content {
        padding: 20px 24px;
        padding-bottom: 100px;
    }
}
