/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #ffffff;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Typography */
h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #111827;
    text-align: center;
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin: 3rem 0 1rem 0;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #111827;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #111827;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Author section */
.authors {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.author {
    text-align: center;
    min-width: 200px;
}

.author-name {
    font-size: 1.125rem;
    font-weight: 600;
}

.affiliation {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.conference {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2563eb;
    margin: 1.5rem 0;
}

.author-notes {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Button group */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 2rem 0;
}

.research-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.research-button:hover {
    background-color: #1d4ed8;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

/* Figures */
.research-figure {
    margin: 2rem 0;
    text-align: center;
}

.figure-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    font-style: italic;
}

/* Image Comparison Slider */
.image-comparison {
    max-width: 350px;
    margin: 0 auto;
}

.comparison-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background-color: #f3f4f6;
}

.comparison-image {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
}

.base-image {
    position: relative;
}

.overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 50% 0 0);
}

.comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: #ffffff;
    cursor: ew-resize;
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slider-button::before,
.slider-button::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 2px;
    background-color: #3b82f6;
    transform: translateY(-50%);
}

.slider-button::before {
    left: 3px;
}

.slider-button::after {
    right: 3px;
}

.comparison-labels {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 4;
    pointer-events: none;
}

.comparison-label {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Two columns layout */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: 1fr;
    }
}

/* YouTube embed */
.youtube-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Gaussian viewer */
.gaussian-viewer {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#gaussianCanvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: grab;
    background-color: #1f2937;
}

#gaussianCanvas:active {
    cursor: grabbing;
}

.viewer-info {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* Math rendering */
.math-inline {
    display: inline;
}

.math-block {
    display: block;
    text-align: center;
    margin: 1.5rem 0;
    font-size: 1.125rem;
}

/* Tables */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.875rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.results-table th {
    background-color: #f9fafb;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.results-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

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

.highlight-row {
    background-color: #eff6ff;
}

.highlight-row:hover {
    background-color: #dbeafe;
}

/* BibTeX block */
.bibtex-block {
    background-color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    overflow-x: auto;
    border-left: 4px solid #2563eb;
    margin: 2rem 0;
}

/* Responsive design */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.875rem;
    }
    
    .authors {
        flex-direction: column;
        gap: 1rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
    }
    
    .research-button {
        width: 200px;
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
.slider-handle:focus,
.research-button:focus,
#gaussianCanvas:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .comparison-slider,
    .gaussian-viewer,
    .youtube-embed {
        border: 1px solid #e5e7eb;
        padding: 1rem;
        text-align: center;
    }
    
    .comparison-slider::after {
        content: "Interactive comparison slider (view online)";
    }
    
    .gaussian-viewer::after {
        content: "Interactive 3D viewer (view online)";
    }
    
    .youtube-embed::after {
        content: "YouTube video (view online)";
    }
} 