* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Courier', monospace;
    line-height: 1.4;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d4c8 50%, #f0e0d0 100%);
    min-height: 100vh;
}

.hero-section {
    background: transparent;
    padding: 40px 20px 20px;
    text-align: center;
}

.container {
    max-width: 900;
    margin: 0 auto;
    padding: 0 20px;
}

h1 {
    font-family: 'Courier New', 'Courier', monospace;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    line-height: 1.1;
}

.subtitle {
    font-family: 'Courier New', 'Courier', monospace;
    font-size: 1.1rem;
    color: #444;
    max-width: 900px;
    margin: 0 auto 1.5rem;
    line-height: 1.5;
}

.authors {
    font-family: 'Courier New', 'Courier', monospace;
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.authors a,
.author-link {
    color: #667eea;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
    border-bottom: none;
    background-image: none;
    text-decoration-line: none;
    text-decoration-style: none;
    text-decoration-color: transparent;
}

.authors a:hover,
.author-link:hover {
    color: #764ba2;
    text-decoration: none;
    text-decoration-line: none;
    transform: translateY(-1px);
}

.authors a:link,
.authors a:visited,
.authors a:active {
    text-decoration: none;
}

.author-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.author-link:hover::after {
    width: 100%;
}

.author-name {
    color: #666;
}

.institution {
    color: #666;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 28px;
    background: #2c3e50;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

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

.section {
    padding: 20px 20px;
    background: transparent;
}

.section-alt {
    background: transparent;
}

h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    text-align: center;
    color: #1a1a1a;
}

.section-intro {
    font-size: 1.05rem;
    color: #555;
    max-width: 900px;
    margin: 0 auto 1.5rem;
    text-align: center;
    line-height: 1.5;
}

.demo-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

.carousel-wrapper {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.carousel-grid {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.carousel-grid .demo-item {
    flex: 0 0 400px;
    max-width: 400px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(44, 62, 80, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-arrow:hover {
    background: rgba(26, 37, 47, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow-left {
    left: 10px;
}

.carousel-arrow-right {
    right: 10px;
}

.demo-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.demo-item .video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
}

.demo-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.demo-image {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    overflow: hidden;
}

.demo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.demo-caption {
    padding: 1rem;
    background: #fff;
}

.demo-caption h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: #1a1a1a;
}

.demo-caption p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
}

.video-showcase {
    max-width: 1000px;
    margin: 1.5rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}

.video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.image-showcase {
    max-width: 1000px;
    margin: 1.5rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}

.image-showcase img {
    width: 100%;
    height: auto;
    display: block;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 1000px;
}

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

.comparison-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.comparison-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem auto;
    max-width: 900px;
}

.reference-item {
    aspect-ratio: 1;
    background: #e8e8e8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
}

.label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1.5rem auto;
    max-width: 1500px;
}

.feature-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
    font-weight: 400;
}

.feature-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
}

.citation-box {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 900px;
    font-family: 'Courier New', 'Courier', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    color: #333;
}

.note {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    text-align: center;
    margin: 1.5rem 0;
}

.text-justified {
    text-align: justify;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .demo-images {
        grid-template-columns: 1fr;
    }

    .reference-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 15px 20px;
    }

    .hero-section {
        padding: 30px 20px 15px;
    }

    .carousel-container {
        padding: 0 50px;
    }

    .carousel-grid .demo-item {
        flex: 0 0 300px;
        max-width: 300px;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Video Viewer Container Styles */
.video-viewer-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
    background: #000;
    height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

/* Keep the Rerun viewer styles for the comparison section */
.rerun-viewer-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
    background: #000;
    height: 700px;
    position: relative;
}

.rerun-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.highlight-any4d {
    background: linear-gradient(135deg, #4a148c 0%, #667eea 50%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

footer {
    background: transparent !important;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.sequence-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.thumbnail-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    padding: 1rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.thumbnail-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.thumbnail-item.active {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    background: #f0f4ff;
}

.thumbnail-item img {
    display: none;
}

.thumbnail-label {
    padding: 0;
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    font-weight: 400;
    margin: 0;
}

/* Visualization Toggle Buttons */
.viz-toggle-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem auto 1.5rem;
    flex-wrap: wrap;
}

.viz-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 28px;
    background: #fff;
    color: #2c3e50;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', 'Courier', monospace;
}

.viz-toggle-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.viz-toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.viz-toggle-btn i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .sequence-thumbnails {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .video-viewer-container {
        height: 500px;
    }

    .rerun-viewer-container {
        height: 500px;
    }
    
    .viz-toggle-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}