/* Additional styles specifically for filters and mobile menu */

/* Active selector styling */
.active-selector {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    background-color: var(--surface-color);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Filter popup styles */
.filter-popup h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-text);
    font-size: 14px;
    cursor: pointer;
}

.filter-options input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-options input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-options input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.filter-options input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

/* Model Info Button and Specs Style */
.model-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.model-specs {
    font-size: 14px;
    color: var(--secondary-text);
}

.info-button {
    background-color: rgba(10, 132, 255, 0.1);
    border: none;
    color: var(--primary-color);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-button i {
    font-size: 13px;
}

.info-button:hover {
    background-color: rgba(10, 132, 255, 0.2);
    transform: translateY(-2px);
}

.info-button:active {
    transform: scale(0.95);
}

/* Model Info Popup */
.model-info-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 20px;
}

.model-info-popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: var(--card-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.model-info-popup.show .popup-content {
    transform: scale(1);
}

.popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.popup-close {
    background: rgba(60, 60, 64, 0.55);
    border: none;
    color: var(--text-color);
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.popup-close:hover {
    background-color: rgba(80, 80, 85, 0.6);
}

.popup-close:active {
    transform: scale(0.9);
}

.popup-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.specs-item {
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.specs-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.specs-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background-color: rgba(10, 132, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
}

.specs-details {
    flex: 1;
}

.specs-details h4 {
    font-size: 14px;
    color: var(--secondary-text);
    margin: 0 0 4px;
    font-weight: 500;
}

.specs-details p {
    font-size: 16px;
    color: var(--text-color);
    margin: 0;
    font-weight: 500;
}

.specs-details .yes {
    color: var(--accent-color);
}

.specs-details .no {
    color: var(--error-color);
}

.popup-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.popup-download-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 0 15px rgba(10, 132, 255, 0.3);
}

.popup-download-btn:hover {
    background-color: #0064D2;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.4);
}

.popup-download-btn:active {
    transform: scale(0.98);
}

/* Hide dropdown arrow in subject field to prevent icon overlap */
.input-with-icon .select-arrow {
    display: none;
}

/* Creator info in popup */
.creator-info {
    display: flex;
    justify-content: space-between;
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.creator-details {
    display: flex;
    flex-direction: column;
}

.creator-details .label {
    font-size: 12px;
    color: var(--secondary-text);
    margin-bottom: 5px;
}

.creator-details .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

/* Improved Connect With Us section */
.social-connect h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.1), rgba(94, 92, 230, 0.1));
    border-radius: 50%;
    color: var(--primary-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 20px;
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.3);
}

.social-icon.twitter:hover {
    background: linear-gradient(135deg, #1DA1F2, #0D8BD9);
}

.social-icon.facebook:hover {
    background: linear-gradient(135deg, #4267B2, #2F4A80);
}

.social-icon.instagram:hover {
    background: linear-gradient(135deg, #833AB4, #FD1D1D, #FCAF45);
}

.social-icon.linkedin:hover {
    background: linear-gradient(135deg, #0077B5, #005582);
}

.social-icon.github:hover {
    background: linear-gradient(135deg, #333, #111);
}

/* Style for social icons in footer */
.social-connect-footer {
    margin-top: 10px;
}

.social-icons-footer {
    display: flex;
    gap: 12px;
}

.social-icon-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.1), rgba(94, 92, 230, 0.1));
    border-radius: 50%;
    color: var(--primary-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none; /* Remove underlines */
}

.social-icon-footer:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(10, 132, 255, 0.3);
}

/* Remove underlines from all social media icons */
.social-icon,
.social-links a {
    text-decoration: none !important;
}

/* Responsive styles for creator info */
@media (max-width: 480px) {
    .creator-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .creator-details {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .specs-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2-column layout on mobile */
    }
    
    .popup-content {
        max-height: 80vh;
    }
}

@media (max-width: 480px) {
    .popup-header {
        padding: 16px 20px;
    }
    
    .popup-header h3 {
        font-size: 18px;
    }
    
    .popup-body {
        padding: 20px;
    }
    
    .specs-item {
        padding: 12px;
    }
    
    .specs-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* Debug styles for carousel images */
.carousel-image {
    min-width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Ensure carousel container has proper height */
.model-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
}

/* Style for Recently Uploaded category */
.category:nth-child(2) {
    position: relative;
}

.category:nth-child(2)::after {
    content: none; /* Remove the pulsing dot */
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

/* Enhanced iOS-style loading indicator - UPDATED */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.loading-indicator.visible {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-indicator p {
    color: white;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s forwards 0.3s;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Improved scroll indicators for categories */
.scroll-indicator {
    position: absolute;
    width: 36px;
    height: 36px;
    background-color: rgba(30, 30, 30, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10;
    font-size: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    touch-action: manipulation;
}

.scroll-indicator.visible {
    opacity: 1;
}

.scroll-indicator:active {
    transform: scale(0.9);
    background-color: var(--primary-color);
}

.scroll-indicator.left {
    left: 10px;
}

.scroll-indicator.right {
    right: 10px;
}

/* Better clickable areas for FAQ - UPDATED */
.faq-item {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    width: 100%;
    position: relative;
}

.faq-question h3 {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-color);
    pointer-events: none; /* Prevent text from interfering with click */
}

.faq-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Prevent icon from interfering with click */
}

.faq-icon i {
    position: absolute;
    font-size: 14px;
    transition: all 0.3s ease;
    color: var(--secondary-text);
}

.faq-icon .fa-minus {
    opacity: 0;
    transform: rotate(-90deg);
}

.faq-item.active .faq-icon .fa-plus {
    opacity: 0;
    transform: rotate(90deg);
}

.faq-item.active .faq-icon .fa-minus {
    opacity: 1;
    transform: rotate(0);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 0 25px;
}

.faq-item.active .faq-answer {
    max-height: 300px; /* Large enough to fit content */
    padding-bottom: 25px;
}

.faq-answer p {
    color: var(--secondary-text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Adding subtle update notification */
.update-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-color);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(10, 132, 255, 0.3);
}

.update-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* New FAQ Styling - Complete Redesign */
.new-faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.new-faq-item {
    margin-bottom: 16px;
    border-radius: 12px;
    background-color: var(--surface-color);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.new-faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(10, 132, 255, 0.3);
}

.new-faq-button {
    width: 100%;
    background-color: transparent;
    border: none;
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-size: 17px;
    font-weight: 500;
    text-align: left;
    transition: background-color 0.3s ease;
}

.new-faq-button:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.new-faq-item.active .new-faq-button {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(10, 132, 255, 0.05);
}

.new-faq-icon {
    width: 24px;
    height: 24px;
    fill: var(--secondary-text);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.new-faq-item.active .new-faq-icon {
    transform: rotate(45deg);
    fill: var(--primary-color);
}

.new-faq-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 0 24px;
    opacity: 0;
}

.new-faq-item.active .new-faq-content {
    max-height: 300px;
    padding: 16px 24px 24px;
    opacity: 1;
}

.new-faq-content p {
    color: var(--secondary-text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Fade effect for FAQ content */
.new-faq-item.active .new-faq-content {
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 3D Model Viewer Button - Updated to match info-button style */
.model-actions {
    display: flex;
    gap: 8px;
}

.view3d-button {
    background-color: rgba(10, 132, 255, 0.1);
    border: none;
    color: var(--primary-color);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view3d-button i {
    font-size: 13px;
}

.view3d-button:hover {
    background-color: rgba(10, 132, 255, 0.2);
    transform: translateY(-2px);
}

.view3d-button:active {
    transform: scale(0.95);
}

/* 3D Model Viewer Popup - Updated for mobile */
.model-viewer-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    touch-action: none; /* Prevent default touch behaviors that might interfere */
}

.model-viewer-popup.show {
    opacity: 1;
    visibility: visible;
}

.viewer-content {
    background-color: var(--card-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 80vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.model-viewer-popup.show .viewer-content {
    transform: scale(1);
}

.viewer-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewer-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.viewer-controls-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.viewer-close, .wireframe-toggle {
    background: rgba(60, 60, 64, 0.55);
    border: none;
    color: var(--text-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.viewer-close i, .wireframe-toggle i {
    font-size: 16px;
}

.viewer-close:hover, .wireframe-toggle:hover {
    background-color: rgba(80, 80, 85, 0.6);
}

.viewer-close:active, .wireframe-toggle:active {
    transform: scale(0.9);
}

.wireframe-toggle {
    position: relative;
}

.wireframe-toggle.active {
    background-color: var(--primary-color);
    color: white;
}

.wireframe-toggle .tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    pointer-events: none;
}

.wireframe-toggle:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.viewer-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Fix for model-viewer visibility */
model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
    background-color: transparent;
    touch-action: pan-y;
}

/* Hide loading progress bar completely */
model-viewer::part(default-progress-bar) {
    display: none !important;
}

/* Hide loading message */
model-viewer::part(default-progress-mask) {
    display: none !important;
}

/* Mobile Responsiveness for Model Viewer */
@media (max-width: 768px) {
    .viewer-content {
        height: 70vh;
        width: 95%;
    }
    
    .viewer-header {
        padding: 12px 16px;
    }
    
    .viewer-header h3 {
        font-size: 16px;
        max-width: 60%;
    }
    
    .viewer-close, .wireframe-toggle {
        width: 28px;
        height: 28px;
    }
    
    /* Adjust model-viewer for touch controls on mobile */
    model-viewer {
        touch-action: pan-y;
        --poster-color: transparent;
        --interaction-prompt-threshold: 0;
    }
}

@media (max-width: 480px) {
    .viewer-content {
        height: 60vh;
        margin: 0;
        border-radius: 16px;
    }
    
    .model-viewer-popup {
        padding: 10px;
    }
    
    .viewer-controls-group {
        gap: 8px;
    }
    
    .viewer-header h3 {
        font-size: 15px;
        max-width: 50%;
    }
}

/* Featured model badge styles */
.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
    opacity: 0.9;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: badgePulse 2s infinite alternate;
    transform-origin: center right;
}

.featured-badge i {
    color: #000;
    font-size: 10px;
    animation: starTwinkle 1.5s infinite;
}

@keyframes badgePulse {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.05); opacity: 1; }
}

@keyframes starTwinkle {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.7; transform: scale(1); }
}

/* Featured status in model info popup */
.featured-status {
    color: #FFD700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.featured-status i {
    animation: starTwinkle 1.5s infinite;
}

/* Make featured models stand out in the grid */
.model-card:has(.featured-badge) {
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.model-card:has(.featured-badge):hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.25);
}

/* Style for the Featured category */
.category:nth-child(2) {
    position: relative;
}

.category:nth-child(2)::before {
    content: '★';
    margin-right: 4px;
    color: #FFD700;
    display: inline-block;
    transform: translateY(-1px);
}

/* Responsive adjustments for featured badge */
@media (max-width: 480px) {
    .featured-badge {
        padding: 3px 8px;
        font-size: 10px;
        top: 8px;
        right: 8px;
    }
    
    .featured-badge i {
        font-size: 9px;
    }
}

/* Enhanced 3D Model Loading Animation */
.model-loading-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(17, 17, 17, 0.7);
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.model-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.model-loading-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 24px;
    text-align: center;
}

.model-loading-progress {
    width: 200px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.model-loading-progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.model-loading-progress-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-align: center;
}

/* Model viewer custom poster button */
.model-poster-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(10, 132, 255, 0.4);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.model-poster-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(10, 132, 255, 0.5);
}

.model-poster-button:active {
    transform: scale(0.95);
}

.model-poster-button i {
    font-size: 16px;
}

/* Custom poster styling */
.model-viewer-element {
    --poster-color: transparent;
    --progress-bar-color: var(--primary-color);
    --progress-bar-height: 6px;
    --progress-mask-color: rgba(255, 255, 255, 0.2);
}

/* Remove default progress bar styling */
.model-viewer-element::part(default-progress-bar) {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    width: 200px;
    left: calc(50% - 100px);
    bottom: 20%;
}

/* Style the progress mask */
.model-viewer-element::part(default-progress-mask) {
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Adjustments for different states */
.model-loading-container.finished {
    opacity: 0;
    pointer-events: none;
}

.viewer-body {
    position: relative;
}

/* A11y announcement styling */
.a11y-info {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
    max-width: 200px;
}

.a11y-info.visible {
    opacity: 1;
    transform: translateY(0);
}
