/* Custom styles for 3D Saliency Project Page */

.wf-loading * {
    opacity: 0;
}

/* Results Tables */
.results-section {
    margin: 30px 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sub_heading_results {
    font-family: Ubuntu, Helvetica, sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    text-align: left;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-family: Roboto, sans-serif;
    font-size: 15px;
}

.results-table th {
    background-color: #4196c8;
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: 500;
}

.results-table td {
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.results-table tr:hover {
    background-color: #f8f9fa;
}

.results-table tr.highlight {
    background-color: #e3f2fd;
}

.results-table tr.highlight:hover {
    background-color: #bbdefb;
}

/* 3D Model Viewer */
.model-selector {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 25px;
}

.model-selector label {
    font-family: Ubuntu, Helvetica, sans-serif;
    font-size: 16px;
    color: #333;
    margin-right: 10px;
    display: inline;
    height: auto;
}

.model-selector select {
    padding: 10px 20px;
    font-size: 16px;
    border: 2px solid #4196c8;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-family: Roboto, sans-serif;
}

.model-selector select:hover {
    border-color: #2980b9;
}

.viewer-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 0 25px;
    flex-wrap: wrap;
}

.viewer-panel {
    flex: 1;
    min-width: 300px;
    max-width: 480px;
}

.viewer-panel h4 {
    text-align: center;
    font-family: Ubuntu, Helvetica, sans-serif;
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.model-viewer {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.viewer-instructions {
    text-align: center;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    padding: 0 25px;
}

.viewer-instructions i {
    color: #4196c8;
    margin-right: 5px;
}

/* Comparison Gallery */
.comparison-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px 25px;
}

.comparison-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comparison-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.comparison-item img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* Scanpath Results */
.scanpath-results {
    padding: 0 25px;
}

.metric-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.metric-card {
    background: linear-gradient(135deg, #4196c8 0%, #2980b9 100%);
    color: white;
    padding: 25px 40px;
    border-radius: 15px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(65, 150, 200, 0.3);
}

.metric-value {
    font-size: 42px;
    font-weight: 700;
    font-family: Ubuntu, Helvetica, sans-serif;
}

.metric-label {
    font-size: 14px;
    font-weight: 400;
    margin-top: 5px;
    opacity: 0.9;
}

/* Grid Container */
.grid-container-1 {
    display: block;
    margin-left: 25px;
    margin-right: 25px;
    margin-bottom: 25px;
    text-align: center;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: Roboto, sans-serif;
    font-size: 14px;
}

/* Responsive */
@media screen and (max-width: 767px) {
    .comparison-gallery {
        grid-template-columns: 1fr;
    }

    .viewer-container {
        flex-direction: column;
    }

    .viewer-panel {
        max-width: 100%;
    }

    .model-viewer {
        height: 300px;
    }

    .metric-cards {
        flex-direction: column;
        align-items: center;
    }

    .metric-card {
        width: 80%;
    }

    .results-table {
        font-size: 13px;
    }

    .results-table th,
    .results-table td {
        padding: 8px 10px;
    }
}

@media screen and (max-width: 479px) {
    .results-section {
        margin: 15px 10px;
        padding: 15px;
    }

    .comparison-gallery {
        padding: 10px;
        gap: 10px;
    }

    .viewer-instructions {
        font-size: 12px;
    }

    .model-viewer {
        height: 250px;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section,
.comparison-item,
.metric-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Hover effects for buttons */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Video Grid for 3D Saliency Results */
.video-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 0 10px;
}

.video-item {
    text-align: center;
}

.video-label {
    font-family: Ubuntu, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #4196c8;
    margin: 0 0 8px 0;
}

.result-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.video-caption {
    font-family: Roboto, sans-serif;
    font-size: 13px;
    color: #666;
    margin: 8px 0 0 0;
}

/* Responsive video grid */
@media screen and (max-width: 991px) {
    .video-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 479px) {
    .video-grid-4 {
        grid-template-columns: 1fr;
    }

    .video-label {
        font-size: 12px;
    }

    .video-caption {
        font-size: 11px;
    }
}
