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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #333;
    font-size: 2.5rem;
}

.main-content {
    display: grid;
    gap: 30px;
}

.form-section,
.view-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-row.coordinates {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary,
.btn-edit,
.btn-delete {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-edit {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #c82333;
}

.filter-section {
    background: #f8f9fa;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-row label {
    font-weight: 600;
    color: #555;
}

.filter-row select {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

#landmarks-container {
    display: grid;
    gap: 15px;
}

.landmark-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.landmark-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.landmark-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.landmark-title {
    flex: 1;
}

.landmark-title h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.landmark-type {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.landmark-actions {
    display: flex;
    gap: 8px;
}

.landmark-info {
    display: grid;
    gap: 10px;
}

.coordinate-display {
    background: #fff;
    padding: 12px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.coordinate-display strong {
    color: #667eea;
}

.dimension-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.dimension-overworld {
    background: #d4edda;
    color: #155724;
}

.dimension-nether {
    background: #f8d7da;
    color: #721c24;
}

.dimension-end {
    background: #d1ecf1;
    color: #0c5460;
}

.landmark-notes {
    background: #fff;
    padding: 12px;
    border-radius: 5px;
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

.loading,
.no-landmarks {
    text-align: center;
    color: #666;
    padding: 40px;
    font-size: 1.1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -12px;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Filter Section */
.filter-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-section label {
    font-weight: 600;
    color: #555;
}

.filter-section select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

/* Map */
#map {
    height: 600px;
    border-radius: 8px;
    border: 3px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    background: #1a1a1a;
}

#map-stats {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
}

/* Custom Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
}

.custom-popup {
    padding: 15px;
    min-width: 200px;
}

.custom-popup h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2rem;
}

.custom-popup .popup-type {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.custom-popup .popup-coords {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    font-size: 0.9rem;
}

.custom-popup .popup-notes {
    color: #666;
    font-style: italic;
    margin-top: 10px;
    font-size: 0.9rem;
}

.custom-popup .popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.custom-popup .popup-actions button {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.custom-popup .btn-popup-edit {
    background: #28a745;
    color: white;
}

.custom-popup .btn-popup-delete {
    background: #dc3545;
    color: white;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row.coordinates {
        grid-template-columns: 1fr;
    }

    .landmark-header {
        flex-direction: column;
        gap: 10px;
    }

    .landmark-actions {
        width: 100%;
    }

    .btn-edit,
    .btn-delete {
        flex: 1;
    }

    #map {
        height: 400px;
    }

    .tabs {
        flex-direction: column;
        gap: 5px;
    }

    .tab-btn {
        margin-bottom: 0;
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }

    .tab-btn.active {
        border-bottom: none;
        border-left-color: #667eea;
    }
}
