* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    background: #000;
    color: #fff;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Camera feed */
#camera {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* AR overlay */
#ar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.poi-label {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    max-width: 300px;
    pointer-events: auto;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.poi-label:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
}

.poi-label h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.poi-label .distance {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
}

.poi-label .description {
    font-size: 14px;
    line-height: 1.4;
    color: #ddd;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.screen.active {
    display: flex;
}

.screen h1 {
    font-size: 32px;
    margin-bottom: 16px;
}

.screen h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.screen p {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 32px;
    max-width: 400px;
}

.screen p.note {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
}

button {
    background: #007aff;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #0051d5;
}

button:active {
    background: #003ba5;
}

/* Calibration icon */
.compass-icon {
    font-size: 80px;
    margin: 32px 0;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Status bar */
#status-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px 16px;
    z-index: 5;
    display: flex;
    gap: 16px;
    font-size: 14px;
    align-items: center;
}

.icon-btn {
    background: transparent;
    border: none;
    padding: 4px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Debug Panel */
.debug-panel {
    position: absolute;
    top: 70px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #0f0;
    font-family: monospace;
    font-size: 12px;
    padding: 10px;
    border-radius: 8px;
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(5px);
}
.debug-panel.hidden {
    display: none;
}

/* AR Bottom Controls */
#ar-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    padding: 0 20px;
    z-index: 20;
    display: flex;
    justify-content: center;
}

.slider-container {
    width: 100%;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    appearance: none;
    outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.slider-value {
    color: white;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

/* Map view */
#poi-list {
    width: 100%;
    max-width: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.poi-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    text-align: left;
}

.poi-item h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.poi-item .distance {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 8px;
}

.poi-item .description {
    font-size: 14px;
    color: #ddd;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Settings */
.setting-group {
    width: 100%;
    max-width: 400px;
    margin-bottom: 32px;
    text-align: left;
}

.setting-group label {
    display: block;
    font-size: 16px;
    margin-bottom: 12px;
    color: #fff;
}

.setting-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    margin: 8px 0;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #007aff;
    border-radius: 50%;
    cursor: pointer;
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #007aff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.debug-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: #ccc;
    font-family: monospace;
}

.debug-info > div {
    margin: 4px 0;
}

.debug-info span {
    color: #007aff;
    font-weight: bold;
}
