/* استایل‌های تور مجازی */

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

#viewer {
    background-color: #FFFFFF;
    z-index: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

#preloadContainer {
    background-color: rgba(255, 255, 255, 1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out;
}

.preload-content {
    text-align: center;
    color: #777777;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* دکمه بازگشت به خانه */
.home-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.home-button:hover {
    background-color: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.home-button i {
    margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-button {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .preload-content {
        font-size: 14px;
    }
}

/* Fullscreen Support */
.fullscreen #viewer {
    width: 100vw;
    height: 100vh;
}

/* VR Mode Support */
.vr-mode #viewer {
    cursor: none;
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Error State */
.error-state {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    text-align: center;
    z-index: 10000;
}

.error-state.show {
    display: block;
}

.error-state button {
    margin-top: 10px;
    background-color: #721c24;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
}

.error-state button:hover {
    background-color: #5a1a1e;
}