/* 下拉列表样式 */
.selector {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    padding: 0 5px 5px 5px;
    z-index: 10;
    border-radius: 6px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.selector .title {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 3px;
    position: sticky;
    top: 0;
    background: #fff;
    padding: 5px 0;
    z-index: 11;
}

.selector button {
    width: 38px;
    padding: 3px;
    margin-bottom: 1px;
    cursor: pointer;
    border: 1px solid #666;
    background: #f0f0f0;
    border-radius: 4px;
}
.selector button:hover {
    background: #ddd;
}

.selector .clear-btn {
    width: 120px;
    margin-top: 8px;
    padding: 2px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.selector .preview {
    width: 36px;
    height: 36px;
    border-collapse: collapse;
    pointer-events: none;
}
.selector .preview td {
    position: relative;
    width: 12px;
    height: 12px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    background-color: #ffffff;
}
.selector .preview .attach {
    position: absolute;
    width: 12px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.option-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    cursor: pointer;
}
.option-item:hover {
    background-color: #eee;
}

.color-box {
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 1px solid #000;
}

.marker-container {
    z-index: 5;
}

/* 按钮样式 */
.back-home {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 6px 12px;
    background: #01b0f1;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background 0.2s;
}
.back-home:hover {
    background: #1f8bff;
}

.close-help-button {
    margin-top: 18px;
    padding: 10px 24px;
    font-size: 16px;
    cursor: pointer;
    background-color: #01b0f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}
.close-help-button:hover {
    filter: brightness(90%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.control-btn {
    position: fixed;
    top: 10px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background 0.2s;
}
.control-btn:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
}
.control-btn:not(:disabled):hover {
    background: var(--hover-bg);
}

.help-button {
    right: 10px;
    background: #01b0f1;
    --hover-bg: #1f8bff;
}
.redo-button {
    right: 60px;
    background: #4CAF50;
    --hover-bg: #45a049;
}
.undo-button {
    right: 110px;
    background: #FF6B6B;
    --hover-bg: #FF5252;
}

/* 方向控制按钮 */
.direction-controls {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    pointer-events: none;
}

.direction-row {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.direction-btn {
    width: 40px;
    height: 40px;
    margin: 5px;
    background-color: rgba(1, 176, 241, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    touch-action: manipulation;
    user-select: none;
    pointer-events: auto;
}
.direction-btn:active {
    background-color: rgba(31, 139, 255, 0.9);
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 帮助提示框样式 */
#help-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 24px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    text-align: center;
    width: 370px;
    line-height: 1.6;
    color: #333;
}

#help-container h2 {
    margin-top: 0;
    font-size: 22px;
    color: #01b0f1;
}

#help-container p {
    margin: 10px 0;
    font-size: 16px;
    text-align: left;
}

#help-container span {
    font-size: 22px;
}
