/* 基本排版与样式 */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background-color: #0077cc;
    color: white;
    padding: 10px;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
}

#user-info {
    margin-top: 5px;
    font-size: 0.9rem;
}

#auth-container {
    padding: 10px;
    background-color: #f5f5f5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
    gap: 10px;
}

.auth-form input {
    padding: 8px;
    font-size: 1rem;
}

.auth-form button {
    padding: 8px;
    background-color: #0077cc;
    color: white;
    border: none;
    cursor: pointer;
}

.auth-form button:hover {
    background-color: #005fa3;
}

.switch-link {
    font-size: 0.9rem;
    text-align: center;
}

main {
    flex: 1;
    display: flex;
}

#controls {
    width: 250px;
    background-color: #f9f9f9;
    padding: 10px;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}

#controls input {
    padding: 6px;
    margin-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
}

#controls button {
    padding: 6px;
    background-color: #0077cc;
    color: white;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
}

#controls button:hover {
    background-color: #005fa3;
}

#map {
    flex: 1;
    height: calc(100vh - 170px);
    /* 减去 header 和 auth 容器高度 */
}

/* 模态弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-top: 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.modal-actions button {
    padding: 6px 12px;
    border: none;
    cursor: pointer;
}

#note-detail-content img,
#note-detail-content video {
    max-width: 100%;
    display: block;
    margin-top: 10px;
}