/** ChallengeFlow: 08-world.css */
@layer components {
  /* Welt und Länder */
  .globe-mount {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
  }
  .globe-mount canvas {
    position: relative;
    z-index: 0;
  }
  .globe-mount:active {
    cursor: grabbing;
  }
  .globe-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    background: rgba(10,14,38,.72);
    color: #d5ddff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 0;
    pointer-events: none;
    white-space: nowrap;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 5;
  }
  .globe-fallback {
    height: 100%;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    color: #d5ddff;
    padding: 24px;
  }
  .globe-fallback strong {
    font-size: 16px;
    color: #fff;
  }
  .globe-fallback p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    max-width: 340px;
  }
  .world-fullscreen .scene-tooltip {
    font-family: inherit;
  }
  .country-overlay.open {
    transform: none;
    visibility: visible;
  }
  .country-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .country-meta-row {
    justify-content: flex-start;
    margin-bottom: 12px;
  }
  .country-list-search {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr) auto;
    align-items: center;
    margin-top: 14px;
    border: 1px solid var(--line-strong);
    background: var(--card);
  }
  .country-list-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
  }
  .country-list-search-icon {
    display: grid;
    place-items: center;
    color: var(--muted);
    pointer-events: none;
  }
  .country-list-search-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }
  .country-list-search .country-search {
    min-width: 0;
    width: 100%;
    height: 40px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .country-list-search .country-search:focus {
    border: 0;
    box-shadow: none;
    outline: none;
  }
  .country-search[type="search"] {
    appearance: none;
    -webkit-appearance: none;
  }
  .country-search[type="search"]::-webkit-search-decoration,
  .country-search[type="search"]::-webkit-search-cancel-button,
  .country-search[type="search"]::-webkit-search-results-button,
  .country-search[type="search"]::-webkit-search-results-decoration {
    display: none;
    -webkit-appearance: none;
  }
  .country-list-search-clear {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
  }
  .country-list-search-clear:hover,
  .country-list-search-clear:focus-visible {
    color: var(--text);
    background: var(--soft);
    outline: none;
  }
  .country-list {
    display: grid;
    gap: 6px;
    margin-top: 12px;
  }
  .country-challenges-compact {
    display: grid;
    gap: 10px;
  }
  .country-challenge-list-item {
    display: grid;
    grid-template-columns: 124px minmax(0,1fr);
    gap: 12px;
    min-height: 108px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: border-color .18s ease,background-color .18s ease,transform .18s ease;
  }
  .country-challenge-list-item:hover,
  .country-challenge-list-item:focus-visible {
    border-color: var(--accent);
    transform: translateY(-1px);
    outline: none;
  }
  .country-challenge-thumb-wrap {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: var(--media-bg);
  }
  .country-challenge-thumb {
    display: block;
    width: 124px;
    height: 100%;
    min-height: 108px;
    max-height: 132px;
    object-fit: cover;
    object-position: center;
  }
  .country-challenge-video-thumb {
    position: relative;
    background: #17181c;
  }
  .country-challenge-video-thumb video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
  }
  .country-challenge-video-thumb .media-play-indicator {
    width: 32px;
    height: 32px;
  }
  .country-challenge-video-thumb .media-play-indicator svg {
    width: 14px;
    height: 14px;
  }
  .country-challenge-thumb-empty {
    display: grid;
    place-items: center;
    padding: 8px;
    color: var(--muted);
    font-size: 10.5px;
    text-align: center;
  }
  .country-challenge-main-label {
    position: absolute;
    left: 6px;
    bottom: 6px;
    border-radius: 0;
    padding: 3px 6px;
    background: rgba(10,10,12,.76);
    color: #fff;
    font-size: 9px;
    font-weight: 750;
    line-height: 1.2;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .country-challenge-list-copy {
    display: grid;
    align-content: center;
    gap: 5px;
    min-width: 0;
    padding: 10px 10px 10px 0;
  }
  .country-challenge-list-copy h3,
  .country-challenge-list-copy p {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .country-challenge-list-copy h3 {
    font-family: var(--font-body);
    margin: 0;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.25;
  }
  .country-challenge-list-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
  }
  .country-challenge-list-meta,
  .country-challenge-list-stats {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
  }
  .country-challenge-list-meta {
    justify-content: space-between;
  }
  .country-challenge-list-meta strong,
  .country-challenge-list-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .country-challenge-list-meta strong {
    color: var(--text);
  }
  .country-challenge-list-stats {
    gap: 9px;
  }
  .country-challenge-list-stats .country-update-count {
    color: var(--accent);
    font-weight: 720;
  }
  .country-empty p {
    margin: 0;
    color: var(--copy);
    font-size: 13.5px;
    line-height: 1.5;
  }
  .world-fullscreen {
    position: relative;
    height: calc(100dvh - var(--topbar-height));
    overflow: hidden;
    background: radial-gradient(100% 120% at 50% 18%,#e8ecff 0%,#f4f4f4 54%,#0a0a0a 100%);
  }
  .world-toolbar {
    position: absolute;
    z-index: 6;
    top: 18px;
    left: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .world-stats, .globe-hint {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(15,22,34,.62);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    color: rgba(255,255,255,.84);
    font-weight: 550;
  }
  .world-stats {
    min-width: 250px;
    background: rgba(10,14,38,.72);
    color: #e8ecff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 0;
    white-space: nowrap;
    text-align: center;
    padding: 9px 18px;
  }
  #countryPanelToggle {
    min-width: 108px;
    margin-left: auto;
  }
  .country-overlay {
    position: absolute;
    width: min(400px,calc(100% - 28px));
    overflow-y: auto;
    z-index: 7;
    transform: translateX(calc(100% + 28px));
    visibility: hidden;
    transition: transform .28s ease,visibility .28s;
    top: 18px;
    right: 18px;
    bottom: 18px;
    border: 1px solid rgba(255,255,255,.36);
    border-radius: 0;
    background: rgba(248,248,250,.88);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: 0 24px 70px rgba(0,0,0,.28);
    padding: 22px;
  }
  .country-panel-head h2 {
    font-family: var(--font-display);
    margin: 0;
    font-size: 18px;
    font-weight: 650;
  }
  .country-title {
    font-family: var(--font-display);
    margin: 10px 0 8px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1;
    text-transform: uppercase;
  }
  .country-row:hover {
    border-color: var(--accent);
    background: #fff;
  }
  .country-empty {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: 0;
    border-color: rgba(0,0,0,.14);
    background: rgba(255,255,255,.55);
  }
  .globe-tip {
    display: flex;
    gap: 10px;
    color: #fff;
    padding: 8px 12px;
    font-size: 12.5px;
    line-height: 1.45;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(15,22,34,.80);
    border-radius: 0;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    align-items: center;
  }
  .globe-flag {
    display: grid;
    place-items: center;
    font-size: 24px;
    line-height: 1;
    position: relative;
    width: 30px;
    height: 22px;
    border-radius: 0;
    overflow: hidden;
    background: rgba(255,255,255,.12);
    box-shadow: 0 2px 6px rgba(0,0,0,.28);
    flex: 0 0 auto;
  }
  .globe-flag img, .globe-flag-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .globe-flag img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
  }
  .country-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    font-size: 13.5px;
    transition: border-color .15s ease,background .15s ease;
    min-height: 48px;
    border: 0;
    border-radius: 0;
    background: rgba(255,255,255,.72);
    font-weight: 560;
    color: #0a0a0a;
  }
  .globe-tip.globe-tip-flagonly {
    padding: 8px;
    gap: 0;
    border-radius: 0;
  }
  .globe-tip.globe-tip-flagonly>div {
    display: none;
  }
  .globe-tip.globe-tip-flagonly .globe-flag, .globe-tip.globe-tip-flagonly .globe-flag-fallback {
    margin: 0;
  }
  .globe-tip.globe-tip-flagonly .globe-flag {
    width: 34px;
    height: 24px;
  }
  .globe-flag-generic[hidden] {
    display: none;
  }
  .globe-flag-generic {
    position: absolute;
    inset: 0;
    display: block;
    background: rgba(255,255,255,.12);
    overflow: hidden;
  }
  .globe-flag-generic::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 5px;
    width: 15px;
    height: 9px;
    border-radius: 0;
    background: rgba(255,255,255,.82);
    box-shadow: -3px 7px 0 -2px rgba(255,255,255,.65);
  }
  .globe-tip-flagonly .globe-flag-fallback {
    display: none;
  }

  .country-challenge-list-copy .ranking-badge {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
  }
}
