/* Discover Page Styles */
.discover-page {
    background: var(--fb-white);
}

/* Hero Section - Full width background image */
.discover-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #142d3a 0%, #1a3a4a 50%, #2d5a6e 100%);
    overflow: hidden;
}

.discover-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/backgrounds/fishing-hero.jpg') center/cover;
    opacity: 0.25;
}

.discover-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--fb-white), transparent);
}

.discover-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
    text-align: center;
    color: white;
}

.discover-hero h1 {
    font-size: 52px;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
}

.discover-hero p {
    font-size: 20px;
    opacity: 0.95;
    margin: 0 0 36px;
    font-weight: 400;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* Stats Bar */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 36px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 36px;
    font-weight: 800;
    display: block;
}

.hero-stat-label {
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search Box */
.discover-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 8px 8px 8px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.search-input-wrapper .search-icon {
    color: var(--fb-gray-text);
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 12px 16px;
    background: transparent;
    color: var(--fb-ink);
}

.search-input-wrapper button {
    background: var(--fb-blue);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.search-input-wrapper button:hover {
    background: #2f5f78;
    transform: scale(1.02);
}

/* Sub Navigation */
.discover-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 24px;
    background: var(--fb-surface);
    border-bottom: var(--fb-border);
    position: sticky;
    top: var(--nav-height);
    z-index: 90;
}

.tab-link {
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fb-ink-soft);
    text-decoration: none;
    transition: all 0.2s;
}

.tab-link:hover {
    background: var(--fb-gray-100);
    color: var(--fb-ink);
}

.tab-link.active {
    background: var(--fb-ink-strong);
    color: white;
}

.tab-link-ext {
    border: 1px dashed var(--fb-gray-200);
    color: var(--fb-blue);
    font-weight: 600;
}

.tab-link-ext:hover {
    border-color: var(--fb-blue);
    background: rgba(58, 111, 140, 0.06);
    color: var(--fb-blue);
}

/* Section Styles */
.discover-section {
    padding: 64px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--fb-ink-strong);
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 16px;
    color: var(--fb-gray-text);
    margin: 0;
}

/* Water Type Cards */
.water-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.water-type-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f4f8 0%, #c5e4ed 100%);
    aspect-ratio: 16/10;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.water-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(58, 111, 140, 0.2);
}

.water-type-card.active {
    border-color: var(--fb-blue);
    box-shadow: 0 8px 32px rgba(58, 111, 140, 0.25);
}

.water-type-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.7;
}

.water-type-card[data-type="湖泊"] .water-type-card-bg {
    background-image: url('/static/images/cards/lake-fishing.jpg');
}

.water-type-card[data-type="水库"] .water-type-card-bg {
    background-image: url('/static/images/cards/reservoir.jpg');
}

.water-type-card[data-type="江河"] .water-type-card-bg {
    background-image: url('/static/images/cards/river.jpg');
}

.water-type-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
}

.water-type-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 1;
    color: white;
}

.water-type-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.water-type-card-icon svg {
    width: 24px;
    height: 24px;
}

.water-type-card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.water-type-card-count {
    font-size: 14px;
    opacity: 0.9;
}

/* Spot Cards - Horizontal scroll */
.spot-scroll-container {
    margin: 0 -24px;
    padding: 0 24px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.spot-scroll-container::-webkit-scrollbar {
    display: none;
}

.spot-scroll-track {
    display: flex;
    gap: 20px;
    padding-bottom: 8px;
}

.spot-card-fb {
    flex: 0 0 300px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid var(--fb-gray-200);
}

.spot-card-fb:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.spot-card-map {
    height: 140px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
    position: relative;
    overflow: hidden;
}

/* 地图网格纹理 */
.spot-card-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* 随机水域形状 */
.spot-card-map::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 60%;
    top: 20%;
    left: 10%;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(8px);
}

.spot-card-map-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.spot-card-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: var(--fb-blue);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.5);
    z-index: 1;
}

/* 标记点脉冲动画 */
.spot-card-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: marker-pulse 2s ease-out infinite;
}

@keyframes marker-pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* 不同位置的卡片使用不同颜色 */
.spot-card-fb:nth-child(2n) .spot-card-map {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 50%, #6ee7b7 100%);
}
.spot-card-fb:nth-child(2n) .spot-card-map::before {
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.1) 1px, transparent 1px);
}
.spot-card-fb:nth-child(2n) .spot-card-map::after {
    background: rgba(16, 185, 129, 0.2);
}

.spot-card-fb:nth-child(3n) .spot-card-map {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
}
.spot-card-fb:nth-child(3n) .spot-card-map::before {
    background-image:
        linear-gradient(rgba(245, 158, 11, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.1) 1px, transparent 1px);
}
.spot-card-fb:nth-child(3n) .spot-card-map::after {
    background: rgba(245, 158, 11, 0.15);
}

.spot-card-fb:nth-child(5n) .spot-card-map {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 50%, #c4b5fd 100%);
}
.spot-card-fb:nth-child(5n) .spot-card-map::before {
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
}
.spot-card-fb:nth-child(5n) .spot-card-map::after {
    background: rgba(139, 92, 246, 0.15);
}

.spot-card-body {
    padding: 16px;
}

.spot-card-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--fb-ink-strong);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spot-card-location {
    font-size: 13px;
    color: var(--fb-gray-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.spot-card-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.spot-card-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.spot-card-stat-value {
    font-weight: 700;
}

.spot-card-stat.index .spot-card-stat-value {
    color: var(--map-marker-high);
}

.spot-card-stat.quality {
    padding: 3px 10px;
    background: var(--fb-gray-100);
    border-radius: 20px;
    font-weight: 500;
}

/* Province Explorer - State Selector Style */
.province-section {
    background: var(--fb-surface);
    max-width: none;
    padding: 64px 24px;
}

.province-section .section-content {
    max-width: 1280px;
    margin: 0 auto;
}

.province-selector {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
}

.province-dropdown {
    flex: 1;
    max-width: 400px;
}

.province-dropdown label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--fb-ink);
    margin-bottom: 8px;
}

.province-dropdown select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid var(--fb-gray-200);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.province-dropdown select:focus {
    outline: none;
    border-color: var(--fb-blue);
}

.province-quick-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    align-content: flex-start;
}

.province-chip {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--fb-gray-200);
    border-radius: 20px;
    font-size: 14px;
    color: var(--fb-ink);
    text-decoration: none;
    transition: all 0.2s;
}

.province-chip:hover {
    border-color: var(--fb-blue);
    color: var(--fb-blue);
}

.province-chip.active {
    background: var(--fb-ink-strong);
    border-color: var(--fb-ink-strong);
    color: white;
}

.province-results {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--fb-gray-200);
}

.province-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fb-gray-200);
}

.province-results-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--fb-ink-strong);
}

.view-all-link {
    font-size: 14px;
    color: var(--fb-blue);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Ranking - Leaderboard Style */
.ranking-section {
    background: white;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--fb-surface);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.ranking-item:hover {
    background: var(--fb-gray-100);
    transform: translateX(4px);
}

.rank-badge {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    background: var(--fb-gray-200);
    color: var(--fb-ink-soft);
}

.ranking-item:nth-child(1) .rank-badge {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.ranking-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 179, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.ranking-item:nth-child(2) .rank-badge {
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    color: white;
    box-shadow: 0 4px 12px rgba(189, 189, 189, 0.4);
}

.ranking-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(189, 189, 189, 0.08) 0%, rgba(158, 158, 158, 0.05) 100%);
    border: 1px solid rgba(189, 189, 189, 0.2);
}

.ranking-item:nth-child(3) .rank-badge {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: white;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.4);
}

.ranking-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.08) 0%, rgba(184, 115, 51, 0.05) 100%);
    border: 1px solid rgba(205, 127, 50, 0.2);
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--fb-ink-strong);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    font-size: 13px;
    color: var(--fb-gray-text);
}

.rank-score {
    font-size: 22px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 8px;
}

.rank-score.high {
    color: var(--map-marker-high);
    background: rgba(43, 124, 96, 0.1);
}

.rank-score.mid {
    color: var(--fb-blue);
    background: rgba(58, 111, 140, 0.1);
}

/* Active Carousel */
.carousel-section {
    background: var(--fb-surface);
    max-width: none;
    padding: 64px 0;
}

.carousel-section .section-header {
    padding: 0 24px;
}

.carousel-section .section-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Quality Section */
.quality-tabs-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.quality-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--fb-gray-200);
    border-radius: 50px;
    background: white;
    font-size: 15px;
    font-weight: 600;
    color: var(--fb-ink);
    cursor: pointer;
    transition: all 0.2s;
}

.quality-tab-btn:hover {
    border-color: var(--fb-blue);
}

.quality-tab-btn.active {
    background: var(--fb-ink-strong);
    border-color: var(--fb-ink-strong);
    color: white;
}

.quality-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.quality-indicator.q1 { background: #22c55e; }
.quality-indicator.q2 { background: #84cc16; }
.quality-indicator.q3 { background: #eab308; }
.quality-indicator.q4 { background: #f97316; }
.quality-indicator.q5 { background: #ef4444; }

.quality-panel {
    display: none;
}

.quality-panel.active {
    display: block;
}

.spots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Tags Section */
.tags-section {
    background: var(--fb-surface);
    max-width: none;
    padding: 64px 24px;
}

.tags-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.tags-block h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--fb-ink-strong);
}

.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-pill {
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--fb-gray-200);
    border-radius: 50px;
    font-size: 14px;
    color: var(--fb-ink);
    text-decoration: none;
    transition: all 0.2s;
}

.tag-pill:hover {
    border-color: var(--fb-blue);
    color: var(--fb-blue);
    background: white;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1a3a4a 0%, #2d5a6e 50%, #3a6f8c 100%);
    max-width: none;
    padding: 80px 24px;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin: 0 0 16px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    margin: 0 0 32px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cta-btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.cta-btn.primary {
    background: white;
    color: var(--fb-ink-strong);
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.cta-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.cta-btn.secondary:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* Scrollable row with fade hints */
.scroll-fade-wrapper {
    position: relative;
}

.scroll-fade-wrapper::before,
.scroll-fade-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.scroll-fade-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--fb-surface), transparent);
}

.scroll-fade-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--fb-surface), transparent);
}

.scroll-fade-wrapper.fade-right::after {
    opacity: 1;
}

.scroll-fade-wrapper.fade-left::before {
    opacity: 1;
}

/* Tabs wrapper on white bg */
.scroll-fade-wrapper.on-white::before {
    background: linear-gradient(to right, white, transparent);
}

.scroll-fade-wrapper.on-white::after {
    background: linear-gradient(to left, white, transparent);
}

/* Responsive */
@media (max-width: 1024px) {
    .water-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ranking-grid {
        grid-template-columns: 1fr;
    }

    .province-selector {
        flex-direction: column;
    }

    .province-dropdown {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .discover-hero h1 {
        font-size: 36px;
    }

    .discover-hero p {
        font-size: 16px;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-stat-value {
        font-size: 28px;
    }

    .water-type-grid {
        grid-template-columns: 1fr;
    }

    .spot-card-fb {
        flex: 0 0 260px;
    }

    .discover-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .discover-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-link {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tags-container {
        grid-template-columns: 1fr;
    }

    .quality-tabs-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .quality-tabs-row::-webkit-scrollbar {
        display: none;
    }

    .quality-tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .cta-buttons {
        flex-direction: column;
    }
}
