* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f4f5f7;
    color: #111827;
    font-size: 14px;
}

/* 旋转动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

img {
    display: block;
    max-width: 100%;
}

button {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
}

.app {
    max-width: 414px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #f4f5f7;
    position: relative;
}

/* 头部 */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background-color: #ffffff;
    position: relative;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.header-icon {
    position: absolute;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: all 0.2s;
}

.header-icon:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.header-back {
    position: absolute;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: all 0.2s;
}

.header-back:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.app-main {
    padding: 16px 12px 80px;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card {
    border-radius: 18px;
    background-color: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.card-inner {
    border-radius: 18px;
    overflow: hidden;
}


.card-image-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--card-image);
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    opacity: 0.6;
    z-index: 0;
}

.card-image {
    position: relative;
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    z-index: 1;
    margin: 0 auto;
    display: block;
}

.card-image-wrapper .card-like,
.card-image-wrapper .card-member-id,
.card-image-wrapper .card-image-badge,
.card-image-wrapper .card-vip-badge {
    z-index: 2;
}

.card-like {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-like i {
    font-size: 16px;
    color: #9ca3af;
}

.card-like.is-active i {
    color: #f97373;
}

.card-image-badge {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 4px 10px;
    border-radius: 12px;
    background-color: rgba(17, 24, 39, 0.88);
    color: #f9fafb;
    font-size: 12px;
}

.card-member-id {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 6px 12px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card-vip-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #f472b6, #c084fc);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(252, 231, 243, 0.4);
    z-index: 2;
}

/* 不同等级的徽章样式 */
.card-vip-badge.badge-free {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.4);
}

.card-vip-badge.badge-vip {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.card-vip-badge.badge-svip {
    background: linear-gradient(135deg, #f472b6, #c084fc);
    box-shadow: 0 2px 8px rgba(244, 114, 182, 0.4);
}

/* 无权限访问时的模糊效果 */
.card-image-wrapper.locked .card-image {
    filter: blur(20px);
}

.card-image-wrapper.locked::before,
.swiper-slide.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* 升级会员解锁提示 */
.card-unlock-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card-unlock-tip i {
    font-size: 32px;
    color: #f472b6;
}

.card-unlock-tip-text {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-align: center;
    white-space: nowrap;
}

.card-content {
    padding: 16px 20px;
}

/* 个人信息网格样式 */
.card-info {
    padding: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 8px;
    max-width: 350px;
    margin: 0 auto;
}

.info-item-full {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border-radius: 12px;
    background-color: #f9fafb;
}

.info-full-text {
    font-size: 14px;
    color: #0f172a;
    font-weight: 600;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
}

.info-label {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    color: #111827;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.card-meta-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

.card-tag {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #fbbf24;
    color: #78350f;
    font-size: 12px;
}

.card-desc {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
}

.app-tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    max-width: 414px;
    width: 100%;
    height: 60px;
    padding: 4px 8px 8px;
    background-color: #ffffff;
    box-shadow: 0 -1px 12px rgba(15, 23, 42, 0.12);
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    z-index: 1000;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #9ca3af;
    font-size: 11px;
}

.tab-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background-color: transparent;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-item.is-active {
    color: #f97373;
}

.tab-item.is-active .tab-icon {
    background: linear-gradient(135deg, #fecaca, #f97373);
    border-color: #fee2e2;
}

.tab-item.is-active .tab-text {
    font-weight: 600;
}

.tab-icon i {
    font-size: 16px;
}

/* 搜索弹窗样式 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.search-modal.active {
    display: flex;
}

.search-modal.is-active {
    display: flex;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.search-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.search-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.search-modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.search-modal-body {
    padding: 20px;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f9fafb;
    border-radius: 12px;
    border: 2px solid #f3f4f6;
    transition: border-color 0.2s;
}

.search-input-group:focus-within {
    border-color: #f97373;
}

.search-input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #111827;
    outline: none;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    padding: 12px;
    margin: 2px;
    border-radius: 10px;
    background-color: #f97373;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #f87171;
}

.search-btn i {
    font-size: 20px;
}

/* 公告弹窗样式 */
#announcementContent {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}

#announcementContent p {
    margin-bottom: 12px;
}

#announcementContent img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

#announcementContent a {
    color: #f97373;
    text-decoration: none;
}

#announcementContent a:hover {
    text-decoration: underline;
}

#announcementContent ul,
#announcementContent ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

#announcementContent li {
    margin-bottom: 6px;
}

#announcementContent strong {
    color: #111827;
    font-weight: 600;
}

#announcementContent h1,
#announcementContent h2,
#announcementContent h3,
#announcementContent h4 {
    margin-top: 16px;
    margin-bottom: 10px;
    color: #111827;
    font-weight: 600;
}

#announcementContent h1 { font-size: 20px; }
#announcementContent h2 { font-size: 18px; }
#announcementContent h3 { font-size: 16px; }
#announcementContent h4 { font-size: 15px; }

/* 如需替换为具体官方图标，可在此覆盖 .icon-latest/.icon-location/.icon-vip/.icon-mine 的样式 */

@media (min-width: 480px) {
    .app {
        border-radius: 24px;
        margin: 12px auto;
        overflow: hidden;
    }
}
