/* AR-Navigation Overlay Styles */

#ar-navigation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Header */
.ar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ar-target-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
}

.ar-target-info i {
    color: #e63312;
    font-size: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.ar-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
}

.ar-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.ar-close-btn:active {
    transform: rotate(90deg) scale(0.9);
}

/* Canvas Container */
.ar-canvas-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#ar-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Distance Overlay */
.ar-distance-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: none;
}

.ar-distance-main {
    background: rgba(230, 51, 18, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: baseline;
    gap: 5px;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.distance-value {
    font-size: 72px;
    font-weight: bold;
    color: white;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.distance-unit {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
}

.ar-compass {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.ar-compass i {
    color: #17a2b8;
    font-size: 24px;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.ar-accuracy {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.ar-accuracy span {
    color: #ffc107;
    font-weight: bold;
}

/* Instructions */
.ar-instructions {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    text-align: center;
    color: white;
}

#ar-instruction-text {
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    transition: all 0.3s ease;
}

#ar-instruction-text i {
    font-size: 24px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .ar-header {
        padding: 15px;
    }

    .ar-target-info {
        font-size: 16px;
    }

    .ar-target-info i {
        font-size: 20px;
    }

    .distance-value {
        font-size: 56px;
    }

    .distance-unit {
        font-size: 24px;
    }

    .ar-distance-main {
        padding: 20px 30px;
    }

    .ar-compass {
        padding: 12px 20px;
        font-size: 16px;
    }

    .ar-compass i {
        font-size: 20px;
    }

    #ar-instruction-text {
        font-size: 16px;
    }

    #ar-instruction-text i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .distance-value {
        font-size: 48px;
    }

    .distance-unit {
        font-size: 20px;
    }

    .ar-distance-main {
        padding: 15px 25px;
    }

    .ar-compass {
        padding: 10px 15px;
        font-size: 14px;
    }

    .ar-accuracy {
        font-size: 12px;
        padding: 8px 15px;
    }
}

/* Landscape Mode */
@media (orientation: landscape) and (max-height: 500px) {
    .ar-header {
        padding: 10px 20px;
    }

    .distance-value {
        font-size: 42px;
    }

    .distance-unit {
        font-size: 18px;
    }

    .ar-distance-main {
        padding: 15px 20px;
    }

    .ar-distance-overlay {
        gap: 10px;
    }

    .ar-instructions {
        padding: 10px;
    }

    #ar-instruction-text {
        font-size: 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #ar-navigation-overlay {
        background: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    #ar-navigation-overlay {
        background: #000;
    }

    .ar-header,
    .ar-instructions {
        background: rgba(255, 255, 255, 0.1);
    }

    .ar-distance-main,
    .ar-compass,
    .ar-accuracy {
        border: 2px solid white;
    }
}