* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    background: #000;
    color: #fff;
}

/* Hero Banner with Stats */
.hero-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(0, 30, 30, 0.98));
    backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    padding: 16px 40px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 30px rgba(0, 255, 255, 0.15);
    min-height: 80px;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-banner h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #00ffff, #00aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.stats-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label {
    color: #888;
    font-weight: 500;
}

.stat-value {
    color: #00ffff;
    font-weight: 700;
}

.stat-divider {
    width: 1px;
    height: 16px;
    background: #333;
}

.top-countries {
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cta-primary {
    background: linear-gradient(135deg, #00ffff, #00cccc);
    color: #000;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
    white-space: nowrap;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.5);
}

.link-leaderboard {
    color: #00ffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 20px;
    border: 2px solid #00ffff;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.link-leaderboard:hover {
    background: rgba(0, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Scrolling Ticker Banner */
.ticker-banner {
    position: fixed;
    top: 91px;
    left: 0;
    right: 0;
    height: 36px;
    background: linear-gradient(90deg, 
        rgba(0,0,0,0.98) 0%, 
        rgba(0,50,50,0.98) 50%, 
        rgba(0,0,0,0.98) 100%
    );
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    border-top: 1px solid rgba(0, 255, 255, 0.15);
    overflow: hidden;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.15);
}

.ticker-content {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: scroll-ticker 120s linear infinite;
    will-change: transform;
}

.ticker-item {
    display: inline-block;
    padding: 0 40px;
    font-size: 13px;
    color: #ccc;
}

.ticker-item strong {
    color: #00ffff;
    font-weight: 600;
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Map */
#map {
    position: fixed;
    top: 132px;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Cursor hints for map interaction */
#map canvas {
    cursor: grab !important;
}

#map canvas:active {
    cursor: grabbing !important;
}

/* MapLibre Popup Styles */
.maplibregl-popup-content {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ffff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 30px rgba(0, 255, 255, 0.5);
}

.maplibregl-popup-tip {
    border-top-color: #00ffff;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    border: 2px solid #00ffff;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.4);
}

@keyframes slideIn {
    from { 
        transform: translateY(50px) scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.close:hover {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    transform: rotate(90deg);
}

#modal-body h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.citizen-count {
    font-size: 16px;
    color: #888;
    margin-bottom: 20px;
}

.citizen-count strong {
    color: #00ffff;
    font-size: 20px;
}

/* Messages List */
.messages-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 25px;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
}

.message {
    padding: 12px;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.message:hover {
    background: rgba(0, 255, 255, 0.05);
    border-left: 3px solid #00ffff;
    padding-left: 15px;
}

.message:last-child {
    border-bottom: none;
}

.message strong {
    color: #00ffff;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.message p {
    color: #ccc;
    margin-bottom: 4px;
    word-wrap: break-word;
    font-size: 14px;
}

.message .date {
    font-size: 11px;
    color: #666;
}

.messages-list:empty::after {
    content: "No citizens yet. Be the first! 🚀";
    display: block;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Claim Section */
.claim-section {
    text-align: center;
}

.cta-claim {
    width: 100%;
    background: linear-gradient(135deg, #00ffff, #00cccc);
    color: #000;
    border: none;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.4);
}

.cta-claim:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 255, 255, 0.6);
}

.price {
    margin-top: 10px;
    font-size: 13px;
    color: #888;
}

/* Claim Form */
#claim-form h3 {
    margin-bottom: 20px;
    color: #fff;
}

#claim-form input,
#claim-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #fff;
    transition: all 0.2s;
}

#claim-form textarea {
    min-height: 100px;
    resize: vertical;
}

#claim-form input:focus,
#claim-form textarea:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

#claim-form input::placeholder,
#claim-form textarea::placeholder {
    color: #666;
}

.forever-note {
    font-size: 12px;
    color: #00ffff;
    margin-bottom: 15px;
    text-align: center;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #00ffff, #00cccc);
    color: #000;
    border: none;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 255, 255, 0.6);
}

.btn-back {
    width: 100%;
    margin-top: 10px;
    background: transparent;
    color: #888;
    border: 1px solid #333;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-back:hover {
    border-color: #00ffff;
    color: #00ffff;
    background: rgba(0, 255, 255, 0.05);
}

/* Country Selector */
.selector-content {
    max-width: 400px;
}

#country-search {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
}

#country-search:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.2);
}

#country-search::placeholder {
    color: #666;
}

.country-list {
    max-height: 400px;
    overflow-y: auto;
}

.country-item {
    padding: 12px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.country-item:hover {
    background: rgba(0, 255, 255, 0.1);
    padding-left: 16px;
    border-left: 3px solid #00ffff;
}

.country-item .flag {
    font-size: 24px;
    margin-right: 12px;
}

/* Scrollbar */
.messages-list::-webkit-scrollbar,
.country-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.messages-list::-webkit-scrollbar-track,
.country-list::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.messages-list::-webkit-scrollbar-thumb,
.country-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.messages-list::-webkit-scrollbar-thumb:hover,
.country-list::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #00ffff;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Terms Section */
.terms-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 32px;
    line-height: 1.5;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 20px;
    width: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid #333;
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container:hover .checkmark {
    border-color: #00ffff;
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark {
    background-color: #00ffff;
    border-color: #00ffff;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    color: #ccc;
    font-size: 13px;
}

.checkbox-label a {
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.checkbox-label a:hover {
    text-decoration: underline;
    color: #00ccff;
}

/* Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 30, 30, 0.95));
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    padding: 15px 40px;
    z-index: 998;
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content p {
    color: #666;
    font-size: 12px;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: #00ffff;
}

/* Cacher le bouton info de MapLibre */
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-logo,
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-bottom-left {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-banner {
        padding: 12px 20px;
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
    }
    
    .hero-content {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hero-banner h1 {
        font-size: 18px;
    }

    .stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 11px;
    }

    .stat-divider {
        display: none;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .cta-primary {
        font-size: 12px;
        padding: 8px 16px;
    }

    .link-leaderboard {
        font-size: 12px;
        padding: 6px 14px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .ticker-banner {
        top: auto;
        bottom: 70px;
        border-bottom: none;
        border-top: 2px solid rgba(0, 255, 255, 0.3);
    }

    #map {
        top: 140px;
        bottom: 106px;
    }
    
    .site-footer {
        padding: 12px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}
/* Click mode hint */
.click-mode-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1500;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ffff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hint-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.hint-content button {
    background: transparent;
    color: #00ffff;
    border: 1px solid #00ffff;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.hint-content button:hover {
    background: rgba(0, 255, 255, 0.1);
}

/* Crosshair cursor */
.maplibregl-canvas-container.maplibregl-interactive {
    cursor: grab;
}

.maplibregl-canvas-container.maplibregl-interactive.crosshair {
    cursor: crosshair;
}
/* Initial tooltip */
/* Container centré et discret */


.initial-tooltip {
  position: fixed;
  top: 50vh;
  left: 50vw;
  transform: translate(-39%, -50%);
  z-index: 1500;
  display: none;
  pointer-events: auto;
  width: min(92vw, 520px);
}

/* Carte visuelle douce : glass + gradient subtile */
.tooltip-content {
  background: linear-gradient(135deg, rgba(0, 245, 245, 0.95), rgba(0, 180, 200, 0.92));
  color: #022233;
  padding: 18px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  box-shadow:
    0 6px 18px rgba(2, 34, 51, 0.16),
    0 2px 6px rgba(0, 255, 255, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
  transform-origin: center;
  animation: floatIn 420ms cubic-bezier(.2,.9,.3,1);
  overflow: hidden;
}

/* Structure interne : petit layout horizontal */
.tooltip-inner {
  display: flex;
  gap: 14px;
  align-items: center;
}

/* Icône / emoji */
.tooltip-emoji {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  box-shadow: 0 4px 12px rgba(2,34,51,0.08);
}

/* Texte : titre + description */
.tooltip-text h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #00242b;
}
.tooltip-text p {
  margin: 0;
  font-size: 13px;
  color: rgba(0, 20, 30, 0.85);
  line-height: 1.25;
  opacity: 0.95;
}

/* Bouton de fermeture discret */
.tooltip-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: rgba(0,0,0,0.6);
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .12s ease, background .12s ease, color .12s ease;
  backdrop-filter: blur(2px);
}
.tooltip-close:hover {
  transform: scale(1.06);
  background: rgba(255,255,255,0.12);
  color: rgba(0,0,0,0.85);
}
.tooltip-close:focus {
  outline: 2px solid rgba(0,255,255,0.45);
  outline-offset: 2px;
  border-radius: 8px;
}

@keyframes halo {
  0% { box-shadow: 0 0 0px rgba(0,255,255,0.12); }
  50% { box-shadow: 0 0 22px rgba(0,210,240,0.08); }
  100% { box-shadow: 0 0 0px rgba(0,255,255,0.06); }
}
/* applique la lueur très subtile */
.tooltip-content::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 16px;
  pointer-events: none;
  animation: halo 2.6s infinite ease-in-out;
  opacity: 0.8;
}

/* Transition d'opacité quand tu caches (JS devrait changer opacity puis display) */
.initial-tooltip.show .tooltip-content {
  opacity: 1;
}

/* Mobile : réduire padding / taille police */
@media (max-width: 480px) {
  .tooltip-content { padding: 14px; border-radius: 12px; }
  .tooltip-emoji { flex-basis: 48px; height: 48px; font-size: 22px; }
  .tooltip-text h3 { font-size: 15px; }
  .tooltip-text p { font-size: 13px; }
  .initial-tooltip { transform: translate(-50%, -50%);
}

/* Optionnel : mode "plus discret" si tu veux enlever l'animation ensuite */
.initial-tooltip.no-animate .tooltip-content,
.initial-tooltip.no-animate .tooltip-content::after {
  animation: none !important;
}


/* Remove old click mode styles */
.click-mode-hint {
    display: none !important;
}
.link-certificate {
    color: #FFD700;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border: 2px solid #FFD700;
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    background: rgba(255, 215, 0, 0.1);
}

.link-certificate:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}