:root {
    --bg-top: #090b10;
    --bg-bottom: #141a23;
    --panel: rgba(18, 24, 34, 0.92);
    --card: #121822;
    --card-2: #171f2b;
    --ink: #edf3ff;
    --muted: #9aabc4;
    --accent: #9f7aea;
    --accent-strong: #7a5cd4;
    --line: #2b3649;
    --chip: #1d2735;
    --chip-ink: #c6d2e6;
    --success: #52e0b7;
    --warning: #f0ae5c;
    --shadow: 0 28px 62px rgba(0, 0, 0, 0.42);
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Public Sans", sans-serif;
    font-size: 17px;
    color: var(--ink);
    background: linear-gradient(165deg, var(--bg-top), var(--bg-bottom));
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.bg-shape-a {
    width: 430px;
    height: 430px;
    background: radial-gradient(circle, rgba(159, 122, 234, 0.36), rgba(159, 122, 234, 0));
    top: -140px;
    right: -120px;
}

.bg-shape-b {
    width: 390px;
    height: 390px;
    background: radial-gradient(circle, rgba(82, 224, 183, 0.2), rgba(82, 224, 183, 0));
    bottom: -140px;
    left: -120px;
}

.shell {
    width: min(1120px, 92vw);
    margin: 0 auto;
    padding: 2.5rem 0 3.6rem;
    position: relative;
    z-index: 1;
}

.hero {
    margin-bottom: 1.25rem;
    animation: rise-in 0.58s ease both;
}

.eyebrow {
    display: inline-flex;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #e6dbff;
    background: rgba(159, 122, 234, 0.22);
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(159, 122, 234, 0.45);
}

.hero h1 {
    margin: 0.78rem 0 0.32rem;
    font-family: "DM Serif Display", serif;
    font-weight: 400;
    line-height: 1.09;
    letter-spacing: 0.012em;
    font-size: clamp(1.95rem, 2.8vw + 0.92rem, 3.45rem);
    max-width: 22ch;
}

.subtitle {
    margin: 0;
    color: var(--muted);
    max-width: 74ch;
    line-height: 1.58;
}

.filter-panel {
    background: var(--panel);
    border: 1px solid rgba(130, 150, 180, 0.22);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.2rem;
}

.filter-panel h2 {
    margin: 0.26rem 0 1rem;
    font-size: 1.28rem;
    font-weight: 700;
    color: #e8efff;
}

.filters-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.department-field,
.city-field,
.provider-field {
    grid-column: span 3;
}

.type-field {
    grid-column: span 6;
}

.field label {
    font-weight: 600;
    font-size: 1rem;
    color: #dce7fb;
}

.field select,
.field input {
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #0f1420;
    color: var(--ink);
    min-height: 46px;
    padding: 0.64rem 0.8rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input::placeholder {
    color: #7d90ab;
}

.field select:focus,
.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(159, 122, 234, 0.2);
}

.field small {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.field .city-warning {
    color: var(--warning);
}

.type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.45rem;
}

.type-option {
    border: 1px solid rgba(124, 146, 184, 0.32);
    border-radius: 10px;
    background: rgba(20, 30, 44, 0.82);
    padding: 0.46rem 0.58rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.type-option input {
    margin: 0;
    accent-color: var(--accent);
}

.type-option-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    color: #d8e4fb;
}

.type-option-label i {
    color: #e9dcff;
}

.actions {
    grid-column: span 12;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.actions button {
    border: 0;
    border-radius: 11px;
    min-height: 44px;
    padding: 0.55rem 1rem;
    font-weight: 700;
    color: #1a1329;
    background: linear-gradient(125deg, #dbc8ff, #b79cff);
    cursor: pointer;
}

.actions button:hover {
    transform: translateY(-1px);
}

.link-reset {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    border-radius: 11px;
    background: rgba(240, 174, 92, 0.15);
    border: 1px solid rgba(240, 174, 92, 0.3);
    color: #f7c88b;
    text-decoration: none;
    font-weight: 600;
}

.results {
    animation: rise-in 0.68s ease both;
}

.results-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.8rem;
}

.results-top h2 {
    margin: 0;
    font-size: 1.35rem;
    color: #edf2ff;
}

.results-top p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.active-filters {
    margin-top: 0.72rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chip {
    border-radius: 999px;
    font-size: 0.9rem;
    padding: 0.36rem 0.66rem;
    background: var(--chip);
    color: var(--chip-ink);
    border: 1px solid rgba(119, 144, 184, 0.3);
}

.nearby-panel {
    border: 1px solid rgba(95, 127, 177, 0.26);
    background: linear-gradient(140deg, rgba(18, 25, 37, 0.95), rgba(14, 19, 29, 0.95));
    border-radius: var(--radius-md);
    padding: 0.9rem;
    margin-bottom: 1rem;
}

.nearby-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.nearby-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #e8f1ff;
}

.nearby-head p {
    margin: 0;
    color: #b9c9e2;
    font-size: 0.86rem;
}

.nearby-controls {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
}

.nearby-controls label {
    color: #d2e0f8;
    font-size: 0.88rem;
    font-weight: 600;
}

#nearby-radius {
    width: 118px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0f1420;
    color: var(--ink);
    padding: 0.45rem 0.56rem;
}

.toggle-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
}

.toggle-check input {
    accent-color: var(--accent);
}

.nearby-list {
    margin-top: 0.74rem;
    display: grid;
    gap: 0.45rem;
}

.nearby-item {
    border: 1px solid rgba(90, 124, 176, 0.25);
    border-radius: 10px;
    background: rgba(22, 31, 46, 0.85);
    padding: 0.58rem 0.7rem;
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
}

.nearby-item strong {
    color: #e4edff;
    font-size: 0.9rem;
}

.nearby-item span {
    color: #a9bddc;
    font-size: 0.82rem;
}

.nearby-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 1rem;
}

.attraction-card {
    border: 1px solid rgba(120, 142, 178, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(160deg, var(--card), var(--card-2));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
    animation: card-in 0.44s ease both;
    animation-delay: calc(var(--i) * 40ms);
}

.attraction-card.is-hidden-nearby {
    display: none;
}

.media-wrapper {
    height: 170px;
    background: linear-gradient(135deg, #1d2839, #2b2139);
}

.media-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #bccde8;
    text-align: center;
    font-size: 0.9rem;
    padding: 1rem;
}

.card-body {
    padding: 0.9rem;
}

.card-body h3 {
    margin: 0 0 0.38rem;
    font-family: "DM Serif Display", serif;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #f1f6ff;
}

.card-body p {
    margin: 0;
    line-height: 1.45;
    color: var(--muted);
    font-size: 1rem;
}

.type-tags {
    margin-top: 0.62rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.type-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(165, 184, 215, 0.28);
    border-radius: 999px;
    background: rgba(23, 34, 50, 0.88);
    color: #d4e3ff;
    padding: 0.22rem 0.56rem;
    font-size: 0.78rem;
}

.type-tag i {
    color: #e7dcff;
}

.meta-line {
    margin-top: 0.74rem;
    display: grid;
    gap: 0.26rem;
    color: #c4d5ee;
    font-size: 0.86rem;
}

.distance-badge {
    margin-top: 0.2rem;
    display: inline-flex;
    width: fit-content;
    border: 1px solid rgba(82, 224, 183, 0.32);
    border-radius: 999px;
    color: var(--success);
    font-size: 0.76rem;
    padding: 0.18rem 0.55rem;
}

.map-links {
    margin-top: 0.78rem;
    display: grid;
    gap: 0.55rem;
}

.map-link {
    display: inline-flex;
    width: fit-content;
    border-radius: 10px;
    border: 1px solid rgba(144, 165, 198, 0.25);
    background: rgba(25, 35, 50, 0.9);
    color: #d3e0f8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.34rem 0.62rem;
}

.map-link:hover {
    border-color: rgba(159, 122, 234, 0.6);
}

.map-link-primary {
    color: #fbf5ff;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    border-color: rgba(206, 182, 255, 0.5);
}

.map-link-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.map-link.active {
    border-color: rgba(240, 174, 92, 0.66);
    color: #ffdcb2;
}

.empty-state {
    border-radius: var(--radius-md);
    border: 1px dashed rgba(125, 150, 189, 0.5);
    background: rgba(20, 27, 40, 0.74);
    padding: 1.2rem;
}

.empty-state h3 {
    margin: 0;
    font-size: 1.04rem;
    color: #eaf2ff;
}

.empty-state p {
    margin: 0.42rem 0 0;
    color: var(--muted);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1020px) {
    .department-field,
    .city-field,
    .provider-field {
        grid-column: span 6;
    }

    .type-field {
        grid-column: span 12;
    }
}

@media (max-width: 700px) {
    .shell {
        width: min(96vw, 760px);
        padding: 1.45rem 0 2.4rem;
    }

    .filter-panel {
        padding: 0.85rem;
    }

    .department-field,
    .city-field,
    .type-field,
    .provider-field,
    .actions {
        grid-column: span 12;
    }

    .results-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .nearby-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
