html {
    background: #030913;
}

body {
    min-height: 100vh;
    margin: 0;
    color: #f4f8fb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(circle at 22% 0%, rgba(67, 216, 255, 0.14), transparent 30rem),
        radial-gradient(circle at 82% 14%, rgba(255, 139, 38, 0.08), transparent 24rem),
        linear-gradient(180deg, #06111d 0%, #030913 36%, #02060d 100%);
}

.flightdiary-app {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 0 16px 28px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 4px 16px;
    border-bottom: 1px solid rgba(160, 218, 239, 0.14);
}

.brand-lockup {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    color: #56ddff;
    font-size: 21px;
    line-height: 1;
    border: 1px solid rgba(86, 221, 255, 0.75);
    border-radius: 10px;
    box-shadow: 0 0 24px rgba(86, 221, 255, 0.16);
}

.brand-title {
    color: #f8fbff;
    font-size: clamp(1.45rem, 5vw, 2.1rem);
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1;
}

.brand-accent {
    color: #56ddff;
}

.bot-link {
    color: rgba(223, 234, 241, 0.66);
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
}

.bot-link:hover {
    color: #56ddff;
}

.globe-panel {
    position: relative;
    overflow: hidden;
    margin: 18px -16px 0;
    border-top: 1px solid rgba(160, 218, 239, 0.12);
    border-bottom: 1px solid rgba(160, 218, 239, 0.12);
    background:
        linear-gradient(180deg, rgba(3, 10, 18, 0.78), rgba(1, 7, 14, 0.94)),
        radial-gradient(circle at 50% 36%, rgba(77, 218, 255, 0.16), transparent 34rem);
}

.globe-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(123, 216, 244, 0.34) 0 1px, transparent 1.4px),
        linear-gradient(rgba(118, 205, 230, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(118, 205, 230, 0.035) 1px, transparent 1px);
    background-size: 46px 46px, 72px 72px, 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.08) 44%, transparent);
    opacity: 0.22;
}

.globe-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 26px 20px 0;
}

.globe-title {
    margin: 0 0 12px;
    color: #f8fbff;
    font-size: clamp(2.25rem, 9vw, 3.6rem);
    font-weight: 780;
    letter-spacing: 0;
    line-height: 1;
}

.live-label,
.map-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-label {
    color: #4cdfff;
    font-size: 1.03rem;
    font-weight: 700;
}

.live-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #33e2d0;
    box-shadow: 0 0 16px rgba(51, 226, 208, 0.86);
}

.map-status {
    flex-direction: column;
    align-items: flex-end;
    padding-top: 6px;
}

.status-live {
    color: #36f0c9;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.status-time {
    color: rgba(227, 237, 244, 0.68);
    font-size: 0.82rem;
}

.globe-stage {
    position: relative;
    z-index: 1;
    min-height: min(76vh, 720px);
    margin-top: -14px;
}

.flights-globe-graph,
#flights_world_map {
    width: 100%;
    height: min(76vh, 720px);
    min-height: 500px;
}

#flights_world_map .js-plotly-plot,
#flights_world_map .plot-container,
#flights_world_map .svg-container {
    height: 100% !important;
}

#flights_world_map .js-plotly-plot {
    cursor: grab;
    touch-action: none;
}

#flights_world_map .js-plotly-plot:active {
    cursor: grabbing;
}

.globe-controls {
    position: absolute;
    top: 52%;
    right: 18px;
    z-index: 4;
    display: grid;
    gap: 10px;
    transform: translateY(-50%);
}

.globe-control-button {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #e9f9ff;
    font-size: 1.4rem;
    font-weight: 720;
    line-height: 1;
    border: 1px solid rgba(156, 223, 245, 0.22);
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
        rgba(9, 18, 31, 0.76);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), inset 0 0 18px rgba(91, 219, 255, 0.06);
    backdrop-filter: blur(16px);
}

.globe-control-button:active {
    transform: scale(0.95);
    border-color: rgba(86, 221, 255, 0.75);
    color: #56ddff;
}

.globe-gestures {
    position: absolute;
    right: 50%;
    bottom: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 15px;
    color: rgba(244, 248, 251, 0.88);
    border: 1px solid rgba(157, 221, 244, 0.13);
    border-radius: 999px;
    background: rgba(3, 9, 17, 0.56);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
    transform: translateX(50%);
    backdrop-filter: blur(18px);
}

.gesture-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    font-size: clamp(0.82rem, 3vw, 1rem);
    font-weight: 650;
    white-space: nowrap;
}

.gesture-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #56ddff;
    font-size: 1.1rem;
    border: 1px solid rgba(86, 221, 255, 0.34);
    border-radius: 50%;
}

.gesture-divider {
    width: 1px;
    height: 28px;
    background: rgba(188, 229, 242, 0.22);
}

.globe-stats-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(160, 218, 239, 0.12);
}

.globe-stat {
    min-width: 0;
    padding: 20px 16px 24px;
    border-right: 1px solid rgba(160, 218, 239, 0.13);
}

.globe-stat:last-child {
    border-right: 0;
}

.globe-stat-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.globe-stat-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    opacity: 0.96;
}

.globe-stat-label {
    min-width: 0;
    overflow-wrap: anywhere;
    color: rgba(238, 246, 250, 0.78);
    font-size: 0.96rem;
    font-weight: 680;
}

.globe-stat-value {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: #f7fbff;
    font-size: clamp(1.8rem, 8vw, 3.15rem);
    font-weight: 780;
    line-height: 1;
    white-space: nowrap;
}

.globe-stat-rule {
    width: min(112px, 70%);
    height: 4px;
    margin-top: 14px;
    border-radius: 999px;
}

.accent-orange {
    background: #ff8e2c;
    box-shadow: 0 0 18px rgba(255, 142, 44, 0.45);
}

.accent-cyan {
    background: #4cdfff;
    box-shadow: 0 0 18px rgba(76, 223, 255, 0.4);
}

.section-title {
    color: #f0f0f0;
    font-weight: 320;
    letter-spacing: 0;
}

.card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 100, 50, 0.15);
}

.card h4 {
    font-weight: 600;
    font-size: 1.3rem;
}

.badge {
    font-size: 0.85rem;
    font-weight: 500;
}

.timeline-list {
    position: relative;
    display: grid;
    gap: 0;
    padding: 6px 0 2px;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 14px;
    padding: 0 0 22px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 18px;
    bottom: 0;
    width: 1px;
    background: rgba(86, 221, 255, 0.22);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    width: 19px;
    height: 19px;
    margin-top: 4px;
    border: 2px solid #56ddff;
    border-radius: 50%;
    background: #06111d;
    box-shadow: 0 0 18px rgba(86, 221, 255, 0.28);
}

.timeline-content {
    min-width: 0;
    padding-bottom: 2px;
}

.timeline-date {
    color: rgba(223, 234, 241, 0.72);
    font-size: 0.84rem;
    font-weight: 650;
}

.timeline-route {
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: #f8fbff;
    font-size: 1.08rem;
    font-weight: 720;
}

.timeline-meta {
    margin-top: 3px;
    color: rgba(223, 234, 241, 0.64);
    font-size: 0.88rem;
}

.share-card-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(160, 218, 239, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.share-card-preview {
    min-width: 0;
}

.share-card-title {
    color: rgba(223, 234, 241, 0.7);
    font-size: 0.8rem;
    font-weight: 760;
    text-transform: uppercase;
}

.share-card-route {
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: #f8fbff;
    font-size: 1.35rem;
    font-weight: 760;
}

.share-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 9px;
    color: rgba(223, 234, 241, 0.74);
    font-size: 0.9rem;
}

.share-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    color: #06111d;
    font-weight: 760;
    text-decoration: none;
    border-radius: 8px;
    background: #56ddff;
}

.share-card-button:hover {
    color: #06111d;
    background: #78e7ff;
}

.achievement-roadmap {
    display: grid;
    gap: 10px;
}

.roadmap-item {
    padding: 12px;
    border: 1px solid rgba(160, 218, 239, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.roadmap-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #f8fbff;
    font-size: 0.9rem;
    font-weight: 700;
}

.roadmap-track {
    height: 7px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.roadmap-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #56ddff, #ff8e2c);
}

.roadmap-meta {
    margin-top: 6px;
    color: rgba(223, 234, 241, 0.66);
    font-size: 0.82rem;
}

@media (min-width: 768px) {
    .flightdiary-app {
        padding-inline: 24px;
    }

    .globe-panel {
        margin-inline: 0;
        border: 1px solid rgba(160, 218, 239, 0.14);
        border-radius: 18px;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    }

    .globe-header {
        padding-inline: 30px;
    }

    .globe-stage {
        min-height: 650px;
    }

    .flights-globe-graph,
    #flights_world_map {
        height: 650px;
    }
}

@media (max-width: 560px) {
    .flightdiary-app {
        padding-inline: 12px;
    }

    .app-header {
        padding-top: 14px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .bot-link {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .globe-panel {
        margin-inline: -12px;
    }

    .globe-header {
        padding-inline: 18px;
    }

    .globe-stage {
        min-height: 560px;
    }

    .flights-globe-graph,
    #flights_world_map {
        height: 560px;
        min-height: 560px;
    }

    .globe-controls {
        right: 12px;
        gap: 8px;
    }

    .globe-control-button {
        width: 46px;
        height: 46px;
    }

    .globe-gestures {
        bottom: 12px;
        gap: 10px;
        max-width: calc(100% - 28px);
        padding: 9px 11px;
    }

    .gesture-pill {
        gap: 6px;
    }

    .gesture-icon {
        width: 28px;
        height: 28px;
    }

    .globe-stat {
        padding: 16px 10px 19px;
    }

    .globe-stat-top {
        align-items: flex-start;
        gap: 7px;
    }

    .globe-stat-icon {
        width: 22px;
        height: 22px;
    }

    .globe-stat-label {
        font-size: 0.84rem;
    }

    .globe-stat-value {
        font-size: clamp(1.5rem, 9.5vw, 2.45rem);
    }

    .share-card-panel {
        grid-template-columns: 1fr;
    }

    .share-card-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
