.sm360-viewer-container {
    position: relative;
    background: transparent;
    overflow: visible;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 50px;
}

.sm360-viewer-container:fullscreen,
.sm360-viewer-container:-webkit-full-screen,
.sm360-viewer-container:-moz-full-screen,
.sm360-viewer-container:-ms-fullscreen {
    max-width: 100%;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
}

.sm360-viewer-container * {
    box-sizing: border-box;
}

.sm360-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sm360-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    cursor: grab;
}

.sm360-dragging .sm360-canvas {
    cursor: grabbing;
}

.sm360-hotspots-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sm360-hotspot {
    position: absolute;
    width: 25px;
    height: 25px;
    border: none !important;
    background: none !important;
    border-radius: unset !important;
    cursor: pointer;
    pointer-events: all;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 5;
    padding: 0 !important;
    outline: none;
    will-change: transform, opacity;
}

.sm360-hotspot-visible {
    opacity: 1;
}

.sm360-hotspot-icon {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    shape-rendering: geometricPrecision;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    filter: none;
}

.sm360-hotspot:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.sm360-hotspot:active {
    transform: translate(-50%, -50%) scale(1.05);
}

.sm360-hotspot:focus {
    outline: 2px solid rgba(83, 187, 244, 0.5);
    outline-offset: 2px;
}

/* Pulse animation for hotspots */
.sm360-hotspot-pulse {
    animation: sm360-pulse 2s ease-in-out infinite;
}

@keyframes sm360-pulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.12);
    }
}

.sm360-hotspot-pulse:hover {
    animation: none;
    transform: translate(-50%, -50%) scale(1.15);
}

.sm360-hotspot-pulse:active {
    animation: none;
    transform: translate(-50%, -50%) scale(1.05);
}

.sm360-toolbar {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: transparent;
    padding: 0;
    height: auto;
    z-index: 10;
    align-items: center;
}

.sm360-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid #b3b3b3;
    color: #666;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    padding: 20px !important;
    opacity: 1;
    margin: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.sm360-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #808080;
    color: #333;
    transform: scale(1.05);
}

.sm360-btn:active {
    background: rgba(240, 240, 240, 1);
}

.sm360-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    color: inherit;
}

.sm360-btn.sm360-prev,
.sm360-btn.sm360-next,
.sm360-btn.sm360-zoom-in,
.sm360-btn.sm360-zoom-out,
.sm360-btn.sm360-fullscreen,
.sm360-btn.sm360-play {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1.5px solid #b3b3b3 !important;
    color: #666 !important;
}

.sm360-btn.sm360-prev:hover,
.sm360-btn.sm360-next:hover,
.sm360-btn.sm360-zoom-in:hover,
.sm360-btn.sm360-zoom-out:hover,
.sm360-btn.sm360-fullscreen:hover,
.sm360-btn.sm360-play:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: #808080 !important;
    color: #333 !important;
    transform: scale(1.05) !important;
}

.sm360-btn span {
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 22px;
}

.sm360-play span {
    font-size: 16px;
    padding-left: 2px;
}

.sm360-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.sm360-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #999;
    border-radius: 50%;
    animation: sm360-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes sm360-spin {
    to {
        transform: rotate(360deg);
    }
}

.sm360-loader-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.sm360-loader-progress {
    font-weight: 700;
    color: #007bff;
}

.sm360-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
}

.sm360-error p {
    margin: 0;
    font-size: 14px;
}

.sm360-fullscreen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: #000;
}

.sm360-close-fullscreen {
    position: absolute;
    top: 20px;
    right: 23px;
    background: transparent;
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 0;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.2s ease;
    opacity: 1;
}

.sm360-close-fullscreen:hover {
    opacity: 0.8;
}

.sm360-expand-container {
    display: inline-block;
    position: relative;
}

.sm360-expand-placeholder {
    padding: 40px;
    background: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    color: #666;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sm360-expand-container:hover .sm360-expand-placeholder {
    background: #e9e9e9;
    border-color: #999;
    color: #333;
}

@media (max-width: 768px) {
    .sm360-toolbar {
        bottom: 10px;
        padding: 0;
        gap: 6px;
        height: auto;
    }

    .sm360-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 14px;
    }

    .sm360-hotspot {
        width: 28px;
        height: 28px;
    }

    .sm360-hotspot::before {
        font-size: 16px;
    }
}

.sm360-viewer-container[data-skin="modern"] {
    border-radius: 0;
    box-shadow: none;
}

.sm360-viewer-container[data-skin="dark"] {
    background: #1a1a1a;
}

.sm360-viewer-container[data-skin="dark"] .sm360-toolbar {
    background: rgba(255, 255, 255, 0.1);
}

.glightbox-container .sm360-viewer-container {
    width: 100%;
    height: 80vh;
    max-height: 800px;
}

/* Print Styles */
@media print {
    .sm360-toolbar,
    .sm360-loader,
    .sm360-hotspot {
        display: none !important;
    }
}

.sm360-btn:focus,
.sm360-hotspot:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.sm360-viewer-container.sm360-loading .sm360-canvas {
    opacity: 0.5;
}

.sm360-viewer-container.sm360-zoomed .sm360-canvas {
    cursor: move;
}

.sm360-viewer-container.sm360-panning .sm360-canvas {
    cursor: grabbing !important;
}

.sm360-canvas {
    transition: opacity 0.3s ease;
}

.sm360-hotspots-layer {
    transition: opacity 0.3s ease;
}

/* Hotspot popup overlay */
.sm360-hotspot-popup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: all;
}

.sm360-hotspot-popup-visible {
    opacity: 1;
}

.sm360-hotspot-popup img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    background: #fff;
    cursor: default;
}

.sm360-hotspot-content {
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: default;
}
