body {
    font-family: Arial, sans-serif;
    background: #121212;
    color: #ececec;
    margin: 0 auto;
    padding: 16px;
    max-width: 1024px;
    font-size: 18px;
}

h1,
h2 {
    color: #4fc3f7;
    margin: 0;
}

h1 {
    margin-bottom: 16px;
}

/* ---------- Button styles ---------- */
button,
input[type="file"] {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #27313a;
    color: #eef4ff;
    cursor: pointer;
    margin-top: 4px;
}

button:hover,
input[type="file"]:hover {
    background: #315267;
}

a {
    color: #73c6ff;
}

#progress {
    margin-top: 12px;
    font-size: 0.98rem;
}

.image-caption {
    text-align: right;
    font-size: 0.9rem;
    color: #a7c3ff;
}


/* ---------- Section styles ---------- */
.section {
    margin: 20px 0;
    padding: 18px;
    background: #1e1e1e;
    border: 1px solid #2f2f39;
    border-radius: 12px;
}

.section-desc {
    margin-top: 10px;
    color: #c7d2ff;
    line-height: 1.6;
    white-space: pre-wrap;
}

.section-desc.description {
    margin-left: 0px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}


/* ---------- Section Button styles ---------- */
.section-toggle-button {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: #3d5a70;
    color: #eef4ff;
    cursor: pointer;
}

.section-toggle-button:hover {
    background: #54768a;
}


/* ---------- Element styles ---------- */
.element {
    margin: 12px 0;
}

.element.coord {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.element.coord label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.element .coord-title {
    font-weight: 700;
    color: #ffffff;
}

.coord-desc {
    display: inline;
    margin-left: 13px;
    color: #a7c3ff;
    line-height: 1.5;
}

.element.note {
    margin-left: 26px;
    color: #d7d7d7;
    background: #1f1f27;
    border-left: 4px solid #4fc3f7;
    padding: 12px 14px;
    border-radius: 10px;
}

.element.entrance {
    margin-top: 18px;
    margin-bottom: 6px;
    color: #9be5a8;
    font-weight: 700;
}

.element.picture {
    margin: 12px 0px;
}

.element.hint {
    margin: 12px 26px;
}

.element.picture img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.element.picture.right_picture {
    float: right;
    max-width: 45%;
    margin: 16px 0px 4px 16px;
}

.element.picture.left_picture {
    float: left;
    max-width: 45%;
    margin: 16px 16px 4px 0px;
}

.section:after {
    content: "";
    display: table;
    clear: both;
}


/* ---------- Export Popup styles ---------- */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    padding: 16px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 420px;
    background: #1e1e1e;
    border: 1px solid #2f2f39;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #4fc3f7;
}

.modal-content p {
    margin: 0 0 16px;
    color: #c7d2ff;
    line-height: 1.5;
}

.filename-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

#exportFileName {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #2f2f39;
    border-radius: 8px;
    background: #121212;
    color: #eef4ff;
}

.json-suffix {
    padding: 10px 12px;
    border: 1px solid #2f2f39;
    border-radius: 8px;
    background: #121212;
    color: #73c6ff;
    white-space: nowrap;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#exportCancelButton,
#exportConfirmButton {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#exportCancelButton {
    background: #27313a;
    color: #eef4ff;
}

#exportConfirmButton {
    background: #4fc3f7;
    color: #121212;
}

#exportCancelButton:hover,
#exportConfirmButton:hover {
    opacity: 0.92;
}


/* ---------- Responsive Design ---------- */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
        font-size: 14px;
    }

    .section {
        padding: 8px;
        margin: 10px 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .element.coord {
        flex-direction: column;
        align-items: flex-start;
    }

    .element.note {
        margin-left: 0;
        padding: 8px 10px;
    }

    .element.entrance {
        margin-top: 12px;
        margin-bottom: 4px;
    }

    button,
    input[type="file"] {
        padding: 8px 10px;
        margin-right: 4px;
    }
}