:root {
    --surface-primary: #ffffff;
    --surface-panel: rgba(255, 255, 255, 0.92);
    /* was rgba(121, 0, 255, 0.08) */
    --surface-muted: rgba(91, 83, 163, 0.08);
    /* main primary */
    --accent-primary: #5B53A3;
    /* main secondary */
    --accent-secondary: #D49D48;
    /* gradient now uses new primary + secondary */
    --accent-gradient: linear-gradient(135deg, #5B53A3, #D49D48);
    /* was rgba(121, 0, 255, 0.12) */
    --panel-outline: rgba(91, 83, 163, 0.12);
    /* was rgba(121, 0, 255, 0.12) */
    --instruction-bg: rgba(91, 83, 163, 0.12);
    --text-main: #1f2430;
    --text-muted: #6b7280;
    /* was rgba(121, 0, 255, 0.08) */
    --metric-bg: rgba(91, 83, 163, 0.08);
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.15);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: var(--surface-primary);
    color: var(--text-main);
}

.dashboard {
    display: flex;
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 32px;
    gap: 32px;
}

.globe-panel,
.details-panel {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--panel-outline);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    padding: 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(14px);
}

.globe-panel {
    flex: 1 1 55%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#globe-container {
    position: relative;
    width: min(100%, 620px);
    aspect-ratio: 1 / 1;
    min-height: 420px;
    margin: 24px auto 40px;
}

#globe-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.globe-instructions {
    position: absolute;
    top: 24px;
    left: 24px;
    transform: none;
    padding: 16px 18px 16px 18px;
    border-radius: 20px;
    /* was rgba(121, 0, 255, 0.12) and rgba(255, 204, 0, 0.14) */
    background: linear-gradient(
        135deg,
        rgba(91, 83, 163, 0.12),
        rgba(212, 157, 72, 0.14)
    );
    color: var(--text-main);
    font-size: 0.9rem;
    letter-spacing: 0.015em;
    text-transform: none;
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.12);
    max-width: min(280px, 80%);
    line-height: 1.5;
    z-index: 2;
    pointer-events: none;
}

.globe-instructions strong {
    display: block;
    margin: 0 0 6px;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-primary);
}

.globe-instructions p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(31, 36, 48, 0.75);
    line-height: 1.45;
}

.globe-pin {
    position: absolute;
    width: 26px;
    height: 26px;
    border: none;
    padding: 0;
    background: transparent;
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
}

.globe-pin__core {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    /* was rgba(121, 0, 255, …) */
    box-shadow:
        0 0 6px rgba(91, 83, 163, 0.45),
        0 0 14px rgba(91, 83, 163, 0.3);
    transition: transform 200ms ease;
}

.globe-pin__pulse {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    /* was rgba(255, 204, 0, 0.6) */
    background: radial-gradient(
        circle,
        rgba(212, 157, 72, 0.6),
        transparent 70%
    );
    animation: pulse 2.4s ease-in-out infinite;
    opacity: 0.55;
}

.globe-pin--active .globe-pin__core {
    transform: scale(1.3);
}

.globe-pin--active .globe-pin__pulse {
    animation-duration: 1.5s;
}

@keyframes pulse {
    0% {
        transform: scale(0.85);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.18;
    }
    100% {
        transform: scale(0.85);
        opacity: 0.4;
    }
}

.details-panel {
    flex: 1 1 45%;
    gap: 24px;
}

.country-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2vw + 1rem, 2.6rem);
    letter-spacing: 0.02em;
    color: var(--accent-primary);
}

.country-header p {
    margin: 8px 0 0;
    color: rgba(31, 36, 48, 0.65);
    font-size: 0.95rem;
    font-weight: 500;
}

#country-tagline {
    /* was rgba(121, 0, 255, 0.8) */
    color: rgba(91, 83, 163, 0.8);
}

.country-visual {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

#country-photo {
    width: 100%;
    border-radius: 24px;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    border: 4px solid var(--surface-muted);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
}

.country-description {
    margin: 0;
    line-height: 1.6;
    color: rgba(31, 36, 48, 0.85);
}

.support-button {
    padding: 18px 24px;
    border-radius: 999px;
    /* was rgba(121, 0, 255, 0.25) */
    border: 1px solid rgba(91, 83, 163, 0.25);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    color: #1f2430;
    background: var(--accent-gradient);
    /* was rgba(121, 0, 255, 0.2) */
    box-shadow: 0 18px 34px rgba(91, 83, 163, 0.2);
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.support-button:hover,
.support-button:focus-visible {
    transform: translateY(-2px);
    /* was rgba(121, 0, 255, 0.3) */
    box-shadow: 0 24px 48px rgba(91, 83, 163, 0.3);
    outline: none;
}

.support-button:active {
    transform: translateY(1px);
}

@media (max-width: 1080px) {
    .dashboard {
        flex-direction: column;
        margin: 24px;
    }

    .globe-panel,
    .details-panel {
        padding: 28px;
    }

    #globe-container {
        width: min(100%, 560px);
        min-height: 360px;
        margin: 8px auto 28px;
    }
}

@media (max-width: 640px) {
    .dashboard {
        gap: 24px;
        margin: 18px;
    }

    .globe-panel,
    .details-panel {
        padding: 22px;
        border-radius: 24px;
    }

    #globe-container {
        width: 100%;
        min-height: 280px;
        margin: 8px auto 24px;
    }

    .globe-instructions {
        position: static;
        margin: 0 auto 18px;
        text-align: center;
        max-width: 100%;
    }

    .globe-instructions strong {
        letter-spacing: 0.1em;
    }

    .support-button {
        width: 100%;
    }
}
