/* =============================================
   莎莎舞厅指南 — #0099ff 主题 全端自适应
   ============================================= */

:root {
    --pri: #0099ff;
    --pri-dark: #0077cc;
    --pri-light: #80c8ff;
    --pri-bg: #e6f4ff;
    --card: #FFFFFF;
    --bg: #FFFFFF;
    --text: #1A2024;
    --text2: #708088;
    --text3: #A0B0B8;
    --border: #b3dfff;
    --shadow: 0 1px 6px rgba(0,100,180,.06);
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --pad: 12px;
}

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

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--pri); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ========================================
   地图线条图标
   ======================================== */
.icon-pin {
    display: inline-block; width: 1em; height: 1em;
    vertical-align: -0.125em; font-style: normal;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    mask-size: contain; -webkit-mask-size: contain;
}

/* ========================================
   统一左右内边距 — 所有全宽区块
   ======================================== */
.header,.location-tip,.site-notice,.toolbar,.sort-row,
.city-section,.detail-card,.breadcrumb,.related,
.footer,.uc-header,.menu-list,.pagination {
    padding-left: var(--pad);
    padding-right: var(--pad);
}

/* ========================================
   Header
   ======================================== */
.header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding-top: 10px; padding-bottom: 10px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.header .logo {
    display: flex; align-items: center; gap: 6px;
    font-size: 17px; font-weight: 700; color: var(--text);
    text-decoration: none;
}
.header .logo .logo-icon {
    width: 32px; height: 32px;
    background: var(--pri);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.header .logo .logo-icon svg { width: 20px; height: 20px; }
.header .nav-links { display: flex; gap: 8px; font-size: 12px; font-weight: 500; }
.header .nav-links a {
    color: var(--pri); padding: 4px 10px;
    border: 1px solid var(--pri); background: var(--card);
}
.header .nav-links a:active { background: var(--pri); color: #FFF; }

/* Location Tip */
.location-tip {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding-top: 8px; padding-bottom: 8px;
    background: var(--pri-bg);
    border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text2);
    animation: slideDown .3s ease;
}
@keyframes slideDown { from { max-height: 0; opacity: 0; } to { max-height: 48px; opacity: 1; } }
.location-tip button {
    padding: 4px 12px; border: none;
    background: var(--pri); color: #FFF; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: var(--font);
}

/* 公告栏 */
.site-notice {
    background: var(--pri-bg); color: var(--pri);
    text-align: center; padding: 6px 12px; font-size: 12px; font-weight: 600;
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}

/* Toolbar: Search + Locate */
.toolbar {
    background: var(--card);
    padding-top: 8px; padding-bottom: 8px;
    display: flex; gap: 8px; align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 52px; z-index: 99;
}
.toolbar .search-box {
    flex: 1; display: flex; align-items: center;
    background: var(--bg);
    border: 1px solid var(--border); overflow: hidden;
}
.toolbar .search-box input {
    flex: 1; height: 34px; border: none; background: transparent;
    padding: 0 10px; font-size: 13px; outline: none; font-family: var(--font); color: var(--text);
}
.toolbar .search-box button {
    height: 34px; width: 34px; border: none; background: var(--pri);
    color: #FFF; font-size: 14px; cursor: pointer; flex-shrink: 0;
}
.toolbar .btn-locate {
    width: 34px; height: 34px; border: 1px solid var(--pri);
    background: var(--card); font-size: 16px;
    cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    color: var(--pri);
}
.toolbar .btn-locate.scanning { animation: pulse .8s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Sort */
.sort-row {
    display: flex; gap: 6px; padding-top: 6px; padding-bottom: 6px;
    background: var(--card); border-bottom: 1px solid var(--border);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.sort-row::-webkit-scrollbar { display: none; }
.sort-tag {
    padding: 4px 12px; font-size: 12px; font-weight: 600;
    white-space: nowrap; border: 1px solid var(--border); background: var(--card);
    color: var(--text2); cursor: pointer; font-family: var(--font);
    text-decoration: none; display: inline-block;
}
.sort-tag.on { background: var(--pri); color: #FFF; border-color: var(--pri); }
.sort-keyword { font-size: 12px; color: var(--text3); padding: 4px 8px; white-space: nowrap; }

/* City Section */
.city-section {
    background: var(--card); margin: 8px 0;
    padding-top: 10px; padding-bottom: 10px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.city-grid {
    display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px;
    padding-top: 0;
}
.city-chip {
    padding: 4px 10px; font-size: 12px;
    border: 1px solid var(--border); color: var(--text2);
    cursor: pointer; background: var(--card); font-family: var(--font);
    text-decoration: none;
}
.city-chip.sel { background: var(--pri); color: #FFF; border-color: var(--pri); }

/* ========================================
   列表卡片
   ======================================== */
.list-wrap { padding: 6px 0; }

.venue-card {
    display: block; background: var(--card); margin: 0;
    padding: 12px var(--pad);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,100,180,.04);
    text-decoration: none; color: inherit;
}
.venue-card:active { box-shadow: var(--shadow); }

.venue-card .vc-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 8px; margin-bottom: 6px;
}
.venue-card .vc-name {
    font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3;
}
.venue-card .vc-status {
    flex-shrink: 0; font-size: 10px; font-weight: 600;
    padding: 2px 8px;
}
.vc-status.open { background: var(--pri-bg); color: var(--pri); border: 1px solid var(--pri-light); }
.vc-status.closed { background: #F5F5F5; color: #AAA; border: 1px solid #E0E0E0; }

.venue-card .vc-alias { font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.venue-card .vc-meta {
    display: flex; flex-wrap: wrap; gap: 4px 12px;
    font-size: 12px; color: var(--text2); line-height: 1.7;
}
.venue-card .vc-meta .vcm-loc { color: var(--pri); }
.venue-card .vc-dist {
    font-size: 10px; font-weight: 700; color: var(--pri);
    background: var(--pri-bg); padding: 1px 6px;
}
.venue-card .vc-notice {
    margin-top: 6px; font-size: 11px; color: var(--pri);
    background: var(--pri-bg); padding: 6px 8px;
    line-height: 1.5; border-left: 2px solid var(--pri);
}

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 4px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; font-size: 13px; font-weight: 500;
    background: var(--card); color: var(--text);
    border: 1px solid var(--border);
    text-decoration: none;
}
.pagination a.on { background: var(--pri); color: #FFF; border-color: var(--pri); font-weight: 700; }

/* 空状态 */
.empty { text-align: center; padding: 50px 20px; color: var(--text3); }
.empty .emp-icon { font-size: 48px; margin-bottom: 8px; opacity: .4; }
.empty .emp-icon svg { width: 48px; height: 48px; }
.empty p { font-size: 13px; }

/* ========================================
   详情页
   ======================================== */
.detail-top { display: none; }

.breadcrumb {
    padding-top: 6px; padding-bottom: 6px;
    font-size: 11px; color: var(--text3);
    display: flex; flex-wrap: wrap; align-items: center; gap: 3px;
    background: var(--card); border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text2); }

.gallery {
    overflow: hidden; position: relative;
    border-bottom: 1px solid var(--border);
}
.gallery .gallery-track {
    display: flex; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.gallery .gallery-track::-webkit-scrollbar { display: none; }
.gallery img {
    flex: 0 0 100%; max-width: 100%;
    height: auto; max-height: 360px;
    object-fit: contain;
    scroll-snap-align: start;
}
.gallery .img-counter {
    position: absolute; bottom: 8px; right: 10px;
    background: rgba(0,0,0,.55); color: #FFF; font-size: 11px;
    padding: 2px 8px;
}
.gallery .img-dots {
    display: flex; justify-content: center; gap: 6px;
    padding: 8px 0;
}
.gallery .img-dots .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(0,0,0,.2);
}
.gallery .img-dots .dot.cur { background: var(--pri); }

.gallery .gal-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px;
    border: none; border-radius: 50%;
    background: rgba(255,255,255,.85); color: var(--pri);
    font-size: 24px; font-weight: 700; line-height: 1;
    cursor: pointer; z-index: 3;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.gallery .gal-prev { left: 8px; }
.gallery .gal-next { right: 8px; }

/* 信息卡片 */
.detail-card {
    margin: 8px 0; background: var(--card);
    padding-top: 14px; padding-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,100,180,.04);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.detail-card h1 {
    font-size: 19px; font-weight: 700; color: var(--text); line-height: 1.3;
}
.detail-card .dc-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }
.detail-card .dc-dist { font-size: 13px; color: var(--pri); font-weight: 600; margin-top: 6px; }
.detail-card .dc-badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; padding: 3px 8px;
}
.badge-ok { background: var(--pri-bg); color: var(--pri); border: 1px solid var(--pri-light); }
.badge-no { background: #F5F5F5; color: #AAA; border: 1px solid #E0E0E0; }
.badge-dot { width: 6px; height: 6px; }
.badge-dot.g { background: var(--pri); }
.badge-dot.r { background: #CCC; }
.badge-info { background: var(--pri-bg); color: var(--pri); border: 1px solid var(--pri-light); }

.info-section { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.info-line {
    display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text2);
}
.info-line .il-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.info-line .il-text { flex: 1; line-height: 1.6; }

.desc-html { font-size: 13px; line-height: 1.8; color: #3A4045; word-break: break-word; }
.desc-html p { margin-bottom: 4px; }

/* 地址区 */
.addr-wrap { position: relative; }
.addr-blur {
    position: relative; overflow: hidden;
    border: 1px solid var(--border);
    min-height: 140px;
}
.addr-blur .blur-overlay {
    position: absolute; inset: 0; background: rgba(255,255,255,.93);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; z-index: 2; text-align: center; padding: 16px;
}
.blur-overlay .bo-icon { font-size: 24px; margin-bottom: 4px; }
.blur-overlay .bo-text { font-size: 12px; color: var(--text2); margin-bottom: 10px; }
.blur-overlay .bo-btns { display: flex; gap: 6px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 5px 14px; font-size: 12px; font-weight: 600;
    border: none; cursor: pointer; font-family: var(--font); gap: 3px;
    text-decoration: none;
}
a.btn-pri, .btn-pri, a.btn-pri:link, a.btn-pri:visited, a.btn-pri:hover { background: var(--pri); color: #FFF; border: 1px solid var(--pri); }
.btn-pri:active { background: var(--pri-dark); color: #FFF; }
a.btn-line, .btn-line, a.btn-line:link, a.btn-line:visited, a.btn-line:hover { background: var(--card); color: var(--pri); border: 1px solid var(--pri); }
.btn-line:active { background: var(--pri-bg); }
a.btn-sm, .btn-sm { padding: 3px 10px; font-size: 11px; }

.addr-blur .blur-content {
    filter: blur(5px); user-select: none; padding: 12px 14px;
    font-size: 12px; color: #CCD0D4; line-height: 1.8;
}

.addr-show {
    padding: 12px 14px; background: var(--pri-bg);
    border: 1px solid var(--pri-light);
}
.addr-show .as-line { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 6px; font-size: 13px; color: var(--text); }
.addr-show .as-line:last-child { margin-bottom: 0; }
.addr-show .as-icon { flex-shrink: 0; font-size: 14px; }
.addr-show .as-line img { max-width: 100px; }

/* 推荐 */
.related { margin: 20px 0; }
.related .rel-title {
    font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px;
    display: flex; align-items: center; gap: 4px;
}
.related-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.related-scroll::-webkit-scrollbar { display: none; }
.rel-card {
    background: var(--card); padding: 10px;
    min-width: 120px; border: 1px solid var(--border); flex-shrink: 0;
    text-decoration: none; color: inherit;
}
.rel-card .r-name { font-size: 13px; font-weight: 600; color: var(--text); }
.rel-card .r-city { font-size: 11px; color: var(--text3); margin-top: 2px; }
.rel-card .r-status { margin-top: 4px; }

/* ========================================
   登录/注册
   ======================================== */
.auth-page {
    min-height: calc(100vh - 52px);
    background: linear-gradient(160deg, #FFF, #e6f4ff, #cce4f8);
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.auth-card {
    width: 100%; background: var(--card);
    padding: 28px 22px 22px;
    box-shadow: 0 4px 20px rgba(0,100,180,.08);
    border: 1px solid var(--border);
}
.auth-card h2 { font-size: 22px; color: var(--text); text-align: center; margin-bottom: 2px; }
.auth-card .auth-sub { text-align: center; font-size: 12px; color: var(--text3); margin-bottom: 20px; }

.fg { margin-bottom: 12px; }
.fg label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.fg input {
    width: 100%; height: 38px; border: 1px solid var(--border);
    padding: 0 12px; font-size: 14px; outline: none;
    font-family: var(--font); background: var(--bg); color: var(--text);
}
.fg input:focus { border-color: var(--pri); }

.btn-block { width: 100%; height: 38px; font-size: 14px; }

.auth-foot { text-align: center; margin-top: 14px; font-size: 12px; color: var(--text3); }
.auth-foot a { color: var(--pri); font-weight: 600; }

/* ========================================
   用户中心
   ======================================== */
.uc-header {
    background: linear-gradient(135deg, var(--pri-bg), #FFF);
    padding-top: 28px; padding-bottom: 20px; text-align: center;
    border-bottom: 1px solid var(--border);
}
.uc-avatar {
    width: 56px; height: 56px;
    background: var(--pri);
    margin: 0 auto 8px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #FFF; font-weight: 700;
}
.uc-name { font-size: 16px; font-weight: 600; color: var(--text); }
.uc-uid { font-size: 11px; color: var(--text3); margin-top: 2px; }

.menu-list { margin: 8px 0; background: var(--card); overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.menu-row {
    display: flex; align-items: center; padding: 13px 0; gap: 10px;
    border-bottom: 1px solid var(--border); color: var(--text); font-size: 14px;
    text-decoration: none;
}
.menu-row:last-child { border-bottom: none; }
.menu-row:active { background: var(--pri-bg); }
.menu-row .mr-icon { font-size: 16px; width: 22px; text-align: center; }
.menu-row .mr-arrow { margin-left: auto; color: #CCC; }

/* ========================================
   Footer
   ======================================== */
.footer {
    text-align: center; padding-top: 20px; padding-bottom: 30px;
    font-size: 11px; color: var(--text3); line-height: 2;
    border-top: 1px solid var(--border);
}
.footer a { color: var(--text3); }
.footer .btn { margin: 2px; }

.sd-hidden { display: none; }

/* ========================================
   移动端 H5 (≤480px)
   ======================================== */
@media (max-width: 480px) {
    body { font-size: 13px; }
    .header { padding-top: 8px; padding-bottom: 8px; }
    .header .logo { font-size: 15px; gap: 4px; }
    .header .logo .logo-icon { width: 28px; height: 28px; }
    .header .logo .logo-icon svg { width: 18px; height: 18px; }
    .header .nav-links { gap: 6px; font-size: 11px; }
    .header .nav-links a { padding: 3px 8px; }
    .toolbar { top: 44px; }
}

/* ========================================
   平板 (≥640px)
   ======================================== */
@media (min-width: 640px) {
    :root { --pad: 16px; }
    .header { padding-top: 10px; padding-bottom: 10px; }
    .header .logo { font-size: 18px; }
    .header .nav-links { font-size: 13px; gap: 10px; }
    .toolbar { padding-top: 8px; padding-bottom: 8px; top: 56px; }
    .sort-row { padding-top: 6px; padding-bottom: 6px; }
    .city-section { padding-top: 10px; padding-bottom: 10px; }
    .list-wrap { padding-top: 8px; padding-bottom: 8px; }
    .detail-card { padding-top: 16px; padding-bottom: 16px; }
    .footer { padding-top: 24px; padding-bottom: 36px; }
    .auth-card { max-width: 380px; }
}

/* ========================================
   桌面 (≥768px) — 双列网格
   ======================================== */
@media (min-width: 768px) {
    .list-wrap {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .list-wrap .empty { grid-column: 1 / -1; }
    .venue-card { margin: 0; }
    .gallery img { max-height: 420px; }
}

/* ========================================
   大桌面 (≥1024px) — 三列网格 + 居中
   ======================================== */
@media (min-width: 1024px) {
    :root { --pad: 20px; }
    .header, .toolbar, .sort-row, .city-section,
    .list-wrap, .breadcrumb, .footer {
        max-width: 1200px; margin-left: auto; margin-right: auto;
    }
    .city-section, .list-wrap { margin-top: 10px; }
    .list-wrap {
        grid-template-columns: repeat(3, 1fr);
        padding-top: 12px; padding-bottom: 12px;
    }
    .detail-card, .gallery, .breadcrumb, .related {
        max-width: 1200px; margin: 10px auto;
    }
    .detail-card { padding-top: 18px; padding-bottom: 18px; }
    .gallery img { max-height: 460px; }
    .venue-card { padding-top: 14px; padding-bottom: 14px; }
    .venue-card .vc-name { font-size: 16px; }
    .auth-card { max-width: 400px; }
}
