body {
    font-family: -apple-system, sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 15px;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 22px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 6px 14px;
    border: none;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    color: #666;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.tab-btn.active-all { background: #333; color: #fff; }
.tab-btn.active-dp_off { background: #13c2c2; color: #fff; }
.tab-btn.active-yt_off { background: #722ed1; color: #fff; }
.tab-btn.active-dp_abc { background: #0066cc; color: #fff; }
.tab-btn.active-yt_abc { background: #52c41a; color: #fff; }
.tab-btn.active-alipay { background: #1677ff; color: #fff; }
.tab-btn.active-amap { background: #0086e6; color: #fff; }

.controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.controls input,
.controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: 0.2s;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
    background: #fff;
}

.controls input:focus,
.controls select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

.controls input {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.log-section {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

.log-title {
    background: #fafafa;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

.log-box {
    max-height: 180px;
    overflow-y: auto;
    padding: 12px 15px;
    background: #fcfcfc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: #555;
    line-height: 1.65;
    white-space: pre-wrap;
}

.main-content {
    flex: 1;
}

.province-section {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

.province-title {
    background: #fafafa;
    padding: 12px 15px;
    font-size: 15px;
    margin: 0;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 15px;
}

.station-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.station-card:active {
    background: #f9f9f9;
    transform: scale(0.98);
}

.station-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.station-name {
    font-size: 16px;
    font-weight: bold;
}

.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.badge-pre {
    background: #fff1f0;
    color: #f5222d;
    border: 1px solid #ffa39e;
    border-radius: 12px;
    font-weight: bold;
}

.badge-dp_off {
    background: #e6fffb;
    color: #13c2c2;
    border: 1px solid #87e8de;
}

.badge-yt_off {
    background: #f9f0ff;
    color: #722ed1;
    border: 1px solid #d3adf7;
}

.badge-dp_abc {
    background: #e6f7ff;
    color: #0066cc;
    border: 1px solid #91d5ff;
}

.badge-yt_abc {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.badge-alipay {
    background: #e6f4ff;
    color: #1677ff;
    border: 1px solid #91caff;
}

.badge-amap {
    background: #e6f7ff;
    color: #0086e6;
    border: 1px solid #69b1ff;
}

#modalOverlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.modal-box {
    background: #fff;
    width: 95%;
    max-width: 650px;
    height: 85vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: bold;
}

.close-btn {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0 5px;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
}

.lounge-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border-left: 4px solid #333;
}

.lounge-card-header {
    padding: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.lounge-card-header:active {
    background: #fafafa;
}

.lc-title {
    font-weight: bold;
    font-size: 15px;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.lc-location {
    font-size: 13px;
    color: #555;
    background: #f9f9f9;
    padding: 8px 10px;
    border-radius: 4px;
    line-height: 1.5;
}

.source-tags {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.lounge-detail-body {
    display: none;
    padding: 15px;
    border-top: 1px dashed #eee;
    font-size: 13px;
    color: #444;
}

.detail-section {
    margin-bottom: 15px;
}

.detail-title {
    font-weight: bold;
    color: #222;
    margin-bottom: 6px;
}

.service-icon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 55px;
    text-align: center;
}

.service-icon-item img {
    width: 26px;
    height: 26px;
    margin-bottom: 4px;
    border-radius: 4px;
}

.gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery img {
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    cursor: zoom-in;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.gallery img:hover {
    opacity: 0.9;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

body.image-preview-open {
    overflow: hidden;
}

.image-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,0.88);
    cursor: zoom-out;
}

.image-preview-overlay img {
    display: block;
    max-width: calc(100vw - 36px);
    max-height: calc(100vh - 36px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}

.image-preview-close {
    position: fixed;
    top: 14px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 30px;
    line-height: 42px;
    cursor: pointer;
    z-index: 3001;
}

.disclaimer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #999;
    line-height: 1.6;
    background: #f0f2f5;
    margin-top: auto;
    border-top: 1px solid #e8e8e8;
}

@media (max-width: 768px) {
    .station-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .modal-box {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
