html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

#app-header {
    flex: 0 0 auto;
    background: linear-gradient(90deg, #ff9a3c, #ff5e7e, #6f5bff);
    padding: 16px 20px 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

#app-header h1 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

#map-frame {
    flex: 1;
    position: relative;
    min-height: 0;
    padding: 10px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #6f5bff, #2c7be5 45%, #17c3b2);
}

#map {
    position: absolute;
    inset: 10px;
    border-radius: 16px;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    max-width: 90vw;
    text-align: center;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 20, 80, 0.55);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 20px 12px;
}

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 0 20px 20px;
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.modal-header {
    margin: 0 -20px 18px;
    padding: 18px 20px 14px;
    background: linear-gradient(90deg, #ff9a3c, #ff5e7e, #6f5bff);
}

.modal h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    z-index: 1;
}

#poi-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

#poi-form input[type="text"],
#poi-form input[type="url"],
#poi-form select,
#poi-form textarea,
#poi-form input[type="file"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 10px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: normal;
    transition: border-color 0.15s ease;
}

#poi-form input[type="text"]:focus,
#poi-form input[type="url"]:focus,
#poi-form select:focus,
#poi-form textarea:focus {
    outline: none;
    border-color: #6f5bff;
}

#poi-form input[readonly],
#poi-form input[disabled] {
    background: #eee;
    color: #555;
}

.form-row.two-col {
    display: flex;
    gap: 10px;
}

.form-row.two-col label {
    flex: 1;
}

.photo-fieldset {
    border: 2px dashed #ff9a3c;
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 10px;
    background: #fff8f0;
}

.photo-fieldset legend {
    padding: 0 6px;
    font-weight: 700;
    color: #ff5e7e;
}

.radio-row {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    font-weight: normal;
    font-size: 0.9rem;
}

.radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-weight: normal;
}

.photo-current img {
    max-width: 100%;
    max-height: 150px;
    margin-top: 8px;
    border-radius: 6px;
}

.form-error {
    color: #b00020;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.form-actions button,
.modal button[type="submit"] {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    min-height: 44px;
}

#poi-submit-btn {
    background: linear-gradient(90deg, #6f5bff, #2c7be5);
    color: #fff;
    box-shadow: 0 4px 10px rgba(111, 91, 255, 0.4);
}

.btn-secondary {
    background: #eee;
    color: #333;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Popup-Inhalte auf Markern */
.poi-popup {
    max-width: 240px;
}

.poi-popup img {
    max-width: 100%;
    border-radius: 6px;
    margin-bottom: 6px;
}

.poi-popup h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: #6f5bff;
}

.poi-popup .poi-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 6px;
}

.poi-popup .poi-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.poi-popup .poi-actions button {
    flex: 1;
    padding: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    min-height: 36px;
}

.poi-popup .btn-edit {
    background: linear-gradient(90deg, #6f5bff, #2c7be5);
    color: #fff;
}

.poi-popup .btn-delete {
    background: linear-gradient(90deg, #ff5e7e, #e5484d);
    color: #fff;
}

.poi-div-icon {
    font-size: 1.6rem;
    text-align: center;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

@media (max-width: 480px) {
    .form-row.two-col {
        flex-direction: column;
        gap: 0;
    }
}
