/* 全局样式和重置 */
body, html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #000;
    color: white;
}

/* AR 容器，包含视频和画布 */
#ar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#camera-feed, #ar-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#ar-canvas {
    z-index: 5;
    background: transparent !important; /* 强制背景透明 */
}

/* UI 覆盖层 */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    pointer-events: none; /* 让UI层不阻挡下层操作，按钮除外 */
}

#start-screen, #results-panel {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    pointer-events: auto; /* 恢复按钮的可点击性 */
}

button {
    padding: 12px 25px;
    font-size: 18px;
    cursor: pointer;
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
    transition: background-color 0.2s;
    pointer-events: auto; /* 恢复按钮的可点击性 */
}

button:hover {
    background-color: #0056b3;
}

.note {
    font-size: 12px;
    color: #ccc;
    margin-top: 20px;
}

/* 信息和调试面板 */
#info-panel {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    text-align: left;
    max-width: 220px; /* 适当加宽以容纳图例 */
}

#status-text {
    font-weight: bold;
    margin-bottom: 5px;
}

#debug-info {
    font-size: 10px;
    margin-top: 10px;
}

/* 【新增】图例样式 */
#legend {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 2px;
}

.color-today { background-color: #ffff00; }
.color-summer { background-color: #ff8c00; }
.color-winter { background-color: #1e90ff; }


/* 通用隐藏类 */
.hidden {
    display: none !important;
}