/* Orientation Tester Styles */

/* Phone 3D Wrapper */
.phone-3d-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    position: relative;
    background: linear-gradient(135deg, var(--bs-tertiary-bg) 0%, var(--bs-body-bg) 100%);
    border-radius: 0.375rem;
    overflow: hidden;
}

#phone3D {
    width: 100%;
    height: 100%;
    display: block;
}

/* Angle Display */
.angle-display {
    padding: 1rem;
    background-color: var(--bs-tertiary-bg);
    border-radius: 0.375rem;
    text-align: center;
}

.angle-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.angle-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--bs-primary);
    margin-bottom: 0.75rem;
}

.angle-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: var(--bs-border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.angle-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd 0%, #0dcaf0 50%, #198754 100%);
    transition: width 0.1s ease-out;
    border-radius: 4px;
}

.angle-range {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

/* Tilt Info */
.tilt-info {
    font-size: 0.95rem;
}

.tilt-info strong {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

/* Compass Mini */
.compass-mini {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-tertiary-bg);
    border-radius: 50%;
    border: 2px solid var(--bs-border-color);
}

.compass-mini .fsvg {
    transition: transform 0.3s ease-out;
    filter: var(--bs-primary);
}

[data-bs-theme="dark"] .compass-mini .fsvg {
    filter: brightness(0) saturate(100%) invert(50%) sepia(96%) saturate(2976%) hue-rotate(195deg) brightness(101%) contrast(91%);
}

/* Sensor Info */
.sensor-info-text {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
    padding: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .phone-3d-wrapper {
        max-width: 400px;
    }

    .angle-value {
        font-size: 1.75rem;
    }

    .angle-label {
        font-size: 0.8rem;
    }

    .compass-mini {
        width: 64px;
        height: 64px;
    }

    .compass-mini .fsvg {
        width: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 576px) {
    .phone-3d-wrapper {
        max-width: 320px;
    }

    .angle-value {
        font-size: 1.5rem;
    }

    .angle-display {
        padding: 0.75rem;
    }

    .tilt-info {
        font-size: 0.875rem;
    }
}

/* Animation for active state */
@keyframes rotate-hint {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.phone-3d-wrapper.hint {
    animation: rotate-hint 2s ease-in-out infinite;
}

/* Pulse effect for angle bars */
@keyframes pulse-bar {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.angle-bar.active {
    animation: pulse-bar 1.5s ease-in-out infinite;
}

/* Canvas effects */
canvas {
    transition: opacity 0.3s ease;
}

/* Card hover effects */
.card:hover {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

/* Badge styles */
#statusBadge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .phone-3d-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
}

[data-bs-theme="dark"] .angle-display {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .compass-mini {
    background-color: rgba(255, 255, 255, 0.05);
}
