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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f0f0;
}

.container {
    width: 100%;
    max-width: 1200px;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

header {
    width: 100%;
    padding: 1rem;
    background-color: #f4f4f4;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 4rem;
}

nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    flex: 1;
    justify-content: flex-end;
}

button {
    padding: 0.5rem 1rem;
    margin-right: 0;
    cursor: pointer;
}

main {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.map-section {
    flex: 2; /* Takes 2/3 of the space */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#mapContainer {
    position: relative;
    height: 50vh;
    max-height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

#pointsList {
    flex: 1; /* Takes 1/3 of the space */
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    padding: 1rem;
    overflow-y: auto;
    max-height: 800px;  /* Increased from 300px to 800px */
    max-width: 300px;
}

/* Optional: make the title smaller to save space */
#pointsList h2 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.point-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    position: relative;  /* Added for number positioning */
}

.point-item:hover {
    background-color: #f0f0f0;
}

.point-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.point-info {
    flex: 1;
}

.point-title {
    font-weight: bold;
}

.point-type {
    font-size: 0.8em;
    color: #666;
}

#map {
    height: 100%;
    width: 100%;
}

/* Add container for map controls */
.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Modify map control styles */
.map-control {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-control:hover {
    background: #f4f4f4;
}

.map-control.active {
    background: #007AFF;
    color: white;
    border-color: #0051B3;
}

.map-control i {
    font-size: 24px;
}

.map-control.active i {
    color: white;
}

#pointEditor {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

#pointEditor.hidden {
    display: none;
}

form div {
    margin-bottom: 1rem;
}

.description-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.description-area label {
    font-weight: 500;
    color: #333;
}

.description-area textarea {
    width: 133px;  /* Réduit de 200px à 133px (2/3) */
    height: 133px; /* Réduit de 200px à 133px (2/3) */
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
}

.lang-select {
    margin-left: 1rem;
}

.lang-dropdown {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
}

.lang-dropdown:hover {
    border-color: #007AFF;
}

.lang-dropdown:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0,122,255,0.2);
}

.point-header {
    display: flex;
    align-items: center;
    gap: 0;  /* Enlever l'espace entre les éléments */
    margin-bottom: 1rem;
}

.point-title-group {
    display: flex;
    flex: 1;
    gap: 1rem;
    align-items: center;
}

.point-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 0.5rem;  /* Petit espace après le type de point */
}

#pointTitle {
    flex: 0;  /* Changer de flex: 1 à flex: 0 pour ne pas prendre tout l'espace */
    width: 150px;  /* Environ la moitié de la largeur originale */
    font-size: 1.2rem;
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#nextPoint {
    min-width: 120px;
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.header-btn {
    padding: 0.3rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.header-btn.save {
    background: #007AFF;
    color: white;
    border-color: #0051B3;
}

.header-btn.delete {
    color: #FF3B30;
    border-color: #FF3B30;
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

#pointTitle:focus {
    outline: none;
    border-color: #007AFF;
}

.point-number {
    min-width: 24px;    /* Added */
    color: #666;        /* Added */
    font-size: 0.8em;   /* Added */
}

h1 {
    font-family: Arial, sans-serif;
    font-size: 3rem;
    margin: 0;
    margin-right: auto;
    line-height: 1;
}

h1 .gobi {
    color: #4CAF50;  /* Vert similaire au logo */
    font-weight: 300; /* Plus fin pour 'Gobi' */
}

h1 .hunt {
    color: #2F4858;  /* Bleu foncé similaire au logo */
    font-weight: 500; /* Plus épais pour 'Hunt' */
}

/* Ajouter les styles pour le dialogue personnalisé */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.dialog {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.dialog-message {
    margin-bottom: 1.5rem;
}

.dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.dialog-btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.dialog-btn.primary {
    background: #007AFF;
    color: white;
    border-color: #0051B3;
}

.dialog-btn.secondary {
    background: white;
}

.point-type-select {
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 120px;
    margin: 0;  /* Enlever toutes les marges */
}

.point-title-group {
    display: flex;
    flex: 1;
    gap: 1rem;
    align-items: center;
}

/* Add these styles */
.point-content {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.qrcode-area {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.qrcode-title {
    font-weight: 500;
    color: #333;
}

#qrcode {
    width: 128px;
    height: 128px;
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Style for point cards */
.point-card {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    background: white;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

/* Style for start point */
.point-card-start {
    border-style: double !important;  /* Double line */
    border-width: 3px !important;     /* Adjust thickness for better double line rendering */
}

/* Style for end point */
.point-card-end {
    border-style: solid;  /* Normal border for end point */
}

/* Style for success card */
.point-card-success {
    border-style: double !important;  /* Double line like start point */
    border-width: 3px !important;     /* Same thickness as start point */
}

.point-card:hover {
    transform: translateY(-2px);  /* Léger effet de survol */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);  /* Ombre au survol */
}

.point-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;  /* Enlever la marge car on utilise gap */
}

.point-location {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.9rem;
    background-color: #f5f5f5;  /* Fond légèrement grisé */
    border-radius: 4px;
    align-items: center;
}

.location-value {
    font-weight: 500;
}

.generator-actions {
    display: flex;
    gap: 0.5rem;
}

.qr-container.hidden {
    display: none;
}
.primary-btn {
    padding: 0.8rem 1.5rem;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;  /* Espace entre l'icône et le texte */
}

.primary-btn i {
    font-size: 1.2rem;  /* Taille de l'icône */
}

.primary-btn:hover {
    background: #0051B3;
}

/* Style for QR container */
.qr-container {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    background-color: white;
    border-radius: 4px;
    height: 128px;
    margin-top: 0.5rem;
}

.qr-container.visible {
    display: flex;
}

.qr-container.visible + .point-description {
    min-height: 128px;
    flex: none;
}

.qr-container img {
    width: 128px;
    height: 128px;
}

.point-location i {
    color: #666;
    font-size: 1rem;
}

.point-description {
    padding: 0.75rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
    flex: 1;
    min-height: 80px;
    overflow-y: auto;
}

/* Add styles for new tab layout */
.tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem 0;
    background: #f4f4f4;
    border-bottom: 1px solid #ddd;
}

.tabs-left, .tabs-right {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    padding: 1rem 1.5rem; /* Augmenter le padding horizontal */
    min-width: 100px; /* Largeur minimale pour tous les boutons */
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    text-align: center;
}

.tab-btn:hover {
    color: #333;
    background-color: #f5f5f5;
}

.tab-btn.active {
    color: #007AFF;
    border-bottom-color: #007AFF;
    background-color: transparent; /* Pas de fond quand actif */
}

/* Supprimer les styles spécifiques pour le bouton Examples qui créent la différence */
.tabs-right .tab-btn {
    background-color: transparent; /* Supprimer le fond gris */
    border: none; /* Supprimer la bordure */
}

.tabs-right .tab-btn:hover {
    background-color: #f5f5f5;
}

.tabs-right .tab-btn.active {
    background-color: transparent;
    color: #007AFF;
    border-bottom: 2px solid #007AFF;
    border-color: #007AFF;
}

.tab-content {
    padding: 1rem;
    flex: 1;
    display: flex;
}

.tab-pane {
    display: none;
    width: 100%;
    padding: 0;
}

.tab-pane.active {
    display: flex;
    gap: 1rem;
}

/* Styles pour le générateur */
.generator-content {
    width: 100%;
    padding: 1rem;
}

.generator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.generator-header h2 {
    margin: 0;
}

.generator-actions {
    display: flex;
    gap: 0.5rem;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.point-card {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    background: white;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.point-card-success:hover {
    transform: translateY(-2px);  /* Match the hover effect of other cards */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.point-card-success .point-description {
    background: none;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.point-card-success i.fa-trophy {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.icon-button.active {
    background: #007AFF;
    color: white;
    border-color: #0051B3;
}

.icon-button.active i {
    color: white;
}

.qr-options {
    margin-bottom: 1rem;
}

.qr-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.qr-toggle input[type="checkbox"] {
    margin: 0;
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.qrcode-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
}

.qr-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.encoding-select {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.encoding-select select {
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 200px;
}

.preview-area label {
    font-weight: 500;
    color: #333;
}

.encoded-preview {
    width: 133px;  /* Réduit de 200px à 133px (2/3) */
    height: 133px; /* Réduit de 200px à 133px (2/3) */
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    overflow-y: auto;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

.point-type-label {
    font-weight: bold;
    color: #333;
    padding: 0.3rem 0.6rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Add these styles for background image */
#map img.leaflet-image-layer {
    image-rendering: -webkit-optimize-contrast;  /* For better image quality */
    image-rendering: crisp-edges;
}

.examples-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.examples-content h2 {
    display: none;  /* Hide the title */
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem;
}

.example-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;  /* Added for absolute positioning of title */
    min-width: 250px;  /* Added minimum width */
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #4CAF50;  /* Changed to match Gobi green */
}

.example-card h3 {
    position: absolute;
    top: -0.75rem;
    left: 1rem;
    transform: none;
    background: white;
    padding: 0 0.75rem;
    margin: 0;
    font-size: 1.1rem;
    white-space: nowrap;
}

.example-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.example-card i {
    font-size: 5rem;  /* Reduced from 7.5rem to 5rem */
    color: #4CAF50;  /* Changed to match Gobi green */
    margin-top: 0.5rem;
}

/* Add responsive behavior for smaller screens */
@media (max-width: 1024px) {
    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .examples-grid {
        grid-template-columns: 1fr;
    }
}

.example-card span {
    font-size: 1.2rem;
    color: #333;
    font-weight: 500;
}

/* Style for buttons with icons */
.icon-button {
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.icon-button:hover {
    background: #f4f4f4;
}

.icon-button i {
    font-size: 1rem;
    color: #333;
}

/* Adjust layer control position to avoid overlaps */
.leaflet-bottom.leaflet-right {
    margin-bottom: 10px;  /* Add some space at the bottom */
}

/* Ensure add button stays on top */
.map-control {
    z-index: 1000;  /* Increase z-index to ensure it stays on top */
}

/* Style for QR code error */
.qr-error {
    padding: 1rem;
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    color: #d32f2f;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.qr-error i {
    font-size: 1.2rem;
}

/* Styles for modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #666;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    color: #333;
    margin: 1.5rem 0 0.5rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin: 0.5rem 0;
}

.modal-body i {
    color: #666;
}

.help-note {
    color: #666;
    font-style: italic;
    font-size: 0.9em;
    margin-top: -0.3rem !important;
    list-style: none;
    margin-left: 1rem !important;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
}

.dont-show-again {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
}

.dont-show-again input {
    margin: 0;
}

/* QR code preview */
#qrcode {
    width: 128px;
    height: 128px;
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Reduced size preview */
.encoded-preview {
    width: 133px;  /* Reduced from 200px to 133px (2/3) */
    height: 133px; /* Reduced from 200px to 133px (2/3) */
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    overflow-y: auto;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Remove margin since we use gap */
.point-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

/* Space between icon and text */
.primary-btn {
    gap: 0.5rem;  /* Space between icon and text */
}

.primary-btn i {
    font-size: 1.2rem;  /* Icon size */
} 