/* 首页：轮播 / 地图 / 列表 */

.tab-page-home {
    padding: 0;
}

.home-page {
    padding-bottom: calc(16px + var(--safe-bottom));
    overflow-x: hidden;
}

.home-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 750 / 320;
    max-height: 200px;
    overflow: hidden;
    background: var(--color-surface);
}

.home-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
    touch-action: pan-y;
}

.home-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}

.home-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-carousel-slide-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    font-size: 16px;
    font-weight: 600;
}

.home-carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
}

.home-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.2s;
}

.home-carousel-dot.active {
    width: 16px;
    border-radius: 3px;
    background: var(--color-primary);
}

.home-section {
    padding: 14px 12px 0;
}

.home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.home-section-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--color-text);
}

.home-section-sub {
    font-size: 15px;
    color: var(--color-text-muted);
}

.home-map-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    min-height: 220px;
}

.home-map {
    width: 100%;
    height: 220px;
    min-height: 220px;
    position: relative;
    z-index: 0;
}

.home-section-list {
    padding-bottom: 4px;
}

.home-category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.home-category-tab {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.home-category-tab.active {
    background: rgba(201, 162, 39, 0.15);
    color: var(--color-primary);
    font-weight: 600;
}

.home-category-panel {
    display: none;
}

.home-category-panel.active {
    display: block;
}

.home-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-list-loading,
.home-list-empty {
    padding: 24px 12px;
    text-align: center;
    font-size: 16px;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

/* 骨架屏 */
@keyframes home-skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.home-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: home-skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}

.home-carousel.is-skeleton {
    background: var(--color-surface);
}

.home-carousel.is-skeleton .home-carousel-dots {
    display: none;
}

.home-skeleton-carousel {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.home-map-wrap.is-skeleton .home-map {
    visibility: hidden;
}

.home-skeleton-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 12px;
}

.home-skeleton-map-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    opacity: 0.35;
}

.home-skeleton-map-cell {
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.home-skeleton-map-pin {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(201, 162, 39, 0.35);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
}

.home-skeleton-map-pin:nth-child(2) { top: 28%; left: 22%; }
.home-skeleton-map-pin:nth-child(3) { top: 45%; left: 55%; }
.home-skeleton-map-pin:nth-child(4) { top: 62%; left: 38%; }

.home-skeleton-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
}

.home-skeleton-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.home-skeleton-line {
    height: 12px;
    border-radius: 4px;
}

.home-skeleton-line-title {
    flex: 1;
    max-width: 68%;
    height: 14px;
}

.home-skeleton-line-badge {
    width: 52px;
    height: 22px;
    border-radius: 999px;
    flex-shrink: 0;
}

.home-skeleton-line-short {
    width: 45%;
    margin-bottom: 8px;
}

.home-skeleton-line-mid {
    width: 78%;
    margin-bottom: 8px;
}

.home-skeleton-line-long {
    width: 92%;
}

.home-skeleton-alliance {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.home-skeleton-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
}

.home-skeleton-alliance-body {
    flex: 1;
    min-width: 0;
}

.home-skeleton-line-name {
    width: 55%;
    height: 14px;
    margin-bottom: 10px;
}

.home-skeleton-line-tag {
    width: 40%;
    height: 20px;
    border-radius: 999px;
    margin-top: 10px;
}

.home-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
}

.home-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.home-card-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
}

.home-badge {
    flex-shrink: 0;
    font-size: 15px;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.5;
}

.home-badge-live {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.home-badge-wait {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.home-badge-done {
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
}

.home-card-meta {
    font-size: 17px;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.home-card-meta + .home-card-meta {
    margin-top: 2px;
}

.home-alliance-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.home-alliance-logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2a2418, #1a1a20);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    overflow: hidden;
}

.home-alliance-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-alliance-body {
    flex: 1;
    min-width: 0;
}

.home-alliance-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.home-alliance-intro {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-alliance-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home-tag {
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.12);
    color: var(--color-primary);
    border: 1px solid rgba(201, 162, 39, 0.2);
}

.home-tag-muted {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    border-color: var(--color-border);
}

/* 腾讯地图标记弹窗（避免继承页面深色文字） */
.map-info-popup {
    padding: 4px 2px;
    min-width: 168px;
    color: #1a1a20;
    background: #ffffff;
}

.map-info-title {
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 4px;
    color: #1a1a20;
}

.map-info-address {
    font-size: 15px;
    color: #666666;
    line-height: 1.5;
}

.map-info-activity {
    font-size: 15px;
    color: #9a7b1a;
    margin-top: 6px;
}

.map-info-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: #c9a227;
    color: #1a1a20;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
