/* city-travel.css - 城市巡演选择器 & 探索门禁页 */

/* ───────── 选择器浮层 ───────── */
.city-travel-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 14, 23, 0.82);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
}

.city-travel {
    width: min(1100px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: linear-gradient(180deg, #1a2235, #10151f);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 22px 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    color: #e8eaf0;
}

.city-travel__header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}
.city-travel__header h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 2px;
}
.city-travel__stats {
    display: flex;
    gap: 14px;
    flex: 1;
    font-size: 13px;
    color: #9ea8bd;
    flex-wrap: wrap;
}
.city-travel__stats strong { color: #f0c040; }

.city-travel__close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cfd6e4;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 16px;
}
.city-travel__close:hover { background: rgba(255, 255, 255, 0.05); }

.city-travel__legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #8892a4;
    padding: 6px 0 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.city-travel__help {
    margin: 10px 0 18px;
    padding: 10px 14px;
    background: rgba(74, 144, 217, 0.08);
    border-left: 3px solid #4a90d9;
    border-radius: 4px;
    font-size: 13px;
    color: #cfd6e4;
}
.city-travel__help p { margin: 0 0 6px; }
.city-travel__help ul { margin: 0; padding-left: 22px; line-height: 1.7; }
.city-travel__help strong { color: #f0c040; }

.city-travel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

/* ───────── 单张城市卡 ───────── */
.ct-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--city-color, #4a90d9);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ct-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ct-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.ct-card__title strong {
    display: block;
    font-size: 17px;
    color: #fff;
    letter-spacing: 1px;
}
.ct-card__subtitle {
    font-size: 11px;
    color: #8892a4;
}

.ct-card__badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.ct-card__badge--home { background: rgba(240, 192, 64, 0.18); color: #f0c040; border-color: rgba(240, 192, 64, 0.4); }
.ct-card__badge--conq { background: rgba(220, 100, 100, 0.18); color: #ff8a8a; border-color: rgba(220, 100, 100, 0.4); }
.ct-card__badge--visit{ background: rgba(100, 200, 120, 0.15); color: #7dd39a; border-color: rgba(100, 200, 120, 0.4); }
.ct-card__badge--lock { background: rgba(140, 140, 140, 0.15); color: #8892a4; border-color: rgba(140, 140, 140, 0.35); }

.ct-card__teams {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.ct-card__team {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #cfd6e4;
}
.ct-card__team img,
.ct-card__team svg { width: 24px; height: 24px; border-radius: 50%; }

.ct-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.ct-card__actions .btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
}
.ct-card__enter { grid-column: 1 / -1; }
.ct-card__travel { grid-column: 1 / -1; }

/* ───────── Explore 门禁页 ───────── */
.explore--locked .explore-gate {
    max-width: 680px;
    margin: 40px auto;
    padding: 28px 32px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #e8eaf0;
}
.explore-gate__icon {
    font-size: 52px;
    margin-bottom: 10px;
}
.explore-gate h3 {
    margin: 0 0 12px;
    font-size: 22px;
    letter-spacing: 1px;
}
.explore-gate ul {
    text-align: left;
    display: inline-block;
    margin: 12px auto 18px;
    padding-left: 20px;
    line-height: 1.8;
    color: #cfd6e4;
    font-size: 14px;
}
.explore-gate__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.qb__city-hint {
    margin-top: 10px;
    padding: 8px 14px;
    background: rgba(240, 192, 64, 0.12);
    border-left: 3px solid #f0c040;
    border-radius: 4px;
    color: #ffe17a;
    font-size: 13px;
}

/* ───────── Post-match 城市巡演块 ───────── */
.postmatch__city {
    background: rgba(74, 144, 217, 0.08);
    border-left: 3px solid #4a90d9;
    border-radius: 4px;
    padding: 10px 14px !important;
}
.postmatch__city-hint {
    margin: 6px 0 10px;
    color: #9cd0ff;
    font-size: 14px;
}

@media (max-width: 640px) {
    .city-travel { padding: 14px; }
    .city-travel__grid { grid-template-columns: 1fr; }
    .ct-card__actions { grid-template-columns: 1fr; }
}

/* ───────── 城市手账收集查看器 ───────── */
.city-scrapbook-overlay {
    position: fixed;
    inset: 0;
    z-index: 2600;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.city-scrapbook-viewer {
    width: min(1080px, 96vw);
    height: min(720px, 90vh);
    background: #131926;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 1fr;
    color: #e6e9f2;
}

.city-scrapbook-mobile-tabs {
    display: none;
}

.city-scrapbook-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.city-scrapbook-sidebar__head {
    padding: 18px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.city-scrapbook-sidebar__title {
    font-size: 18px;
    font-weight: 900;
}

.city-scrapbook-sidebar__sub {
    font-size: 12px;
    color: #9aa4b6;
    margin-top: 4px;
}

.city-scrapbook-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    flex: 1;
    min-height: 0;
}

.city-scrapbook-list-item {
    text-align: left;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e6e9f2;
    cursor: pointer;
    font-family: inherit;
}

.city-scrapbook-list-item--active {
    background: rgba(255, 255, 255, 0.09);
}

.city-scrapbook-list-item__date {
    font-size: 13px;
    font-weight: 900;
}

.city-scrapbook-list-item__meta {
    font-size: 11px;
    color: #9aa4b6;
    margin-top: 4px;
}

.city-scrapbook-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.city-scrapbook-main__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.city-scrapbook-main__head strong {
    font-size: 15px;
}

.city-scrapbook-main__close {
    padding: 6px 14px;
    border-radius: 8px;
}

.city-scrapbook-page {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 24px;
    background: #0c101b;
}

/* 手账页内容 */
.cs-page {
    max-width: 760px;
    margin: 0 auto;
    background: #ead8bd url('resources/bg/scrapbook_paper.webp') center/cover no-repeat;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    color: #2c1f1a;
    font-family: 'Kaiti', 'STKaiti', 'Microsoft YaHei', sans-serif;
    position: relative;
    overflow: hidden;
}

.cs-page__head {
    text-align: center;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.12);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.cs-page__title {
    font-size: 28px;
    font-weight: 900;
}

.cs-page__sub {
    font-size: 12px;
    color: #7c5b32;
    margin-top: 6px;
    font-family: 'Microsoft YaHei', sans-serif;
}

.cs-page__body {
    font-size: 16px;
    line-height: 1.7;
    font-weight: 900;
    margin: 0 0 18px;
}

.cs-page__photos {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 14px;
    min-height: 420px;
}

.cs-page__photo-main {
    position: relative;
    min-height: 420px;
    background: #f8efe0;
    border: 10px solid #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transform: rotate(-1deg);
}

.cs-page__photo-stack {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 14px;
}

.cs-page__photo-sub {
    position: relative;
    background: #f8efe0;
    border: 8px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.cs-page__photo-sub:nth-child(odd) { transform: rotate(1.2deg); }
.cs-page__photo-sub:nth-child(even) { transform: rotate(-1.2deg); }

.cs-page__combo {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #b45309;
    font-weight: 900;
    font-size: 12px;
}

.cs-photo__fallback {
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    background: #efebdf;
}

.cs-photo__label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
}

.cs-photo__grade {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 2px dashed currentColor;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    transform: rotate(12deg);
}

.cs-photo__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
    padding: 38px 12px 10px;
    font-size: 14px;
    font-weight: 900;
}

.cs-photo__missing {
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a7c7a;
    font-weight: 900;
}

.cs-page__photo-main,
.cs-page__photo-sub {
    position: relative;
}

.cs-photo__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px), (orientation: portrait) and (max-width: 900px) {
    .city-scrapbook-overlay {
        padding: 0;
        align-items: stretch;
    }

    .city-scrapbook-viewer {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
        border: 0;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .city-scrapbook-mobile-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 8px 8px calc(8px + env(safe-area-inset-top));
        background: rgba(19, 25, 38, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        grid-row: 1;
        grid-column: 1;
        z-index: 2;
    }

    .city-scrapbook-mobile-tab {
        min-height: 40px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.05);
        color: #9aa4b6;
        font-weight: 900;
        font-family: inherit;
        font-size: 13px;
        cursor: pointer;
    }

    .city-scrapbook-mobile-tab--active {
        background: linear-gradient(135deg, rgba(74, 144, 217, 0.55), rgba(240, 192, 64, 0.35));
        color: #fff;
        border-color: rgba(240, 192, 64, 0.35);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .city-scrapbook-sidebar,
    .city-scrapbook-main {
        grid-row: 2;
        grid-column: 1;
        min-height: 0;
    }

    .city-scrapbook-viewer--mobile-list .city-scrapbook-main {
        display: none;
    }

    .city-scrapbook-viewer--mobile-detail .city-scrapbook-sidebar {
        display: none;
    }

    .city-scrapbook-page {
        padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
    }

    .cs-page {
        padding: 18px 14px;
        border-radius: 16px;
    }

    .cs-page__title {
        font-size: 22px;
    }

    .cs-page__body {
        font-size: 14px;
    }

    .cs-page__photos {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .cs-page__photo-main {
        min-height: 260px;
    }

    .cs-page__photo-stack {
        grid-template-rows: auto auto;
    }

    .cs-page__photo-sub {
        min-height: 180px;
    }
}
