/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #fafafa 0%, #f7f5ff 50%, #f4f2ff 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 40px 0;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.08);
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(147, 112, 219, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    min-height: 500px;
}

.paper-details {
    flex: 1;
    text-align: left;
}

/* Text styling for light purple background */
.paper-details .title {
    color: #2c3e50;
    text-shadow: none;
}

.paper-details .header-authors,
.paper-details .header-affiliations,
.paper-details .header-date {
    color: #34495e;
    text-shadow: none;
}

.tldr-title {
    color: #2c3e50;
    text-shadow: none;
}

.tldr-content {
    color: #34495e;
    text-shadow: none;
}

.teaser-column {
    flex: 1;
    text-align: center;
}

.title {
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #2c3e50;
    text-align: left;
}

/* Header Authors */
.header-authors {
    margin: 15px 0;
}

.header-author {
    display: inline-block;
    margin: 0 20px 8px 0;
    font-size: 1.15em;
    font-weight: 500;
    color: #2c3e50;
    font-family: 'Georgia', 'Times New Roman', serif;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.header-author a {
    color: inherit;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.header-author a:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

/* Header Affiliations */
.header-affiliations {
    margin: 10px 0;
}

.header-affiliation {
    color: #666;
    font-style: italic;
    font-size: 1.1em;
}

/* TLDR Section */
.tldr-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f0f8ff;
    border-left: 4px solid #95a5a6;
    border-radius: 0 8px 8px 0;
}

.tldr-title {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
}

.tldr-content {
    color: #34495e;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.highlight-text {
    color: #3498db;
    font-weight: 700;
    font-style: italic;
}

.links {
    margin: 20px 0;
    text-align: left;
}

.link-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 10px 10px 0;
    background-color: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: none;
}

.link-button:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Unified Teaser Container */
.teaser-container {
    background: #f8f9fa;
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

/* Simple instruction display */
.simple-instruction {
    margin-bottom: 15px;
    color: #64748b;
    font-size: 1.2em;
    font-style: italic;
    font-weight: 500;
    text-align: center;
    min-height: 3em;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.strength-label {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
    min-width: 30px;
}

.strength-slider {
    flex: 1;
    height: 8px;
    background: linear-gradient(to right, #e0e0e0 0%, #3498db 100%);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.strength-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.strength-slider::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.4);
}

.strength-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

/* Result display */
.edit-result {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

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

/* Abstract Section */
.abstract-section {
    margin: 40px 0;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #95a5a6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.abstract-section h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.abstract-text {
    color: #34495e;
    font-size: 1.05em;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 20px;
}

.abstract-text strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Special styling for VeloEdit */
.veloedit {
    font-style: italic;
    font-weight: 600;
    color: #3498db;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Inline Teaser Video */
.inline-teaser-container {
    text-align: center;
    margin: 40px 0;
}

.inline-teaser-video {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Interactive Examples Section */
.interactive-examples {
    margin: 50px 0;
}

.interactive-examples h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Special 1x3 grid for Strength Controlled Image Editing section */
.examples-grid-1x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.example-tile {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.example-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.example-instruction {
    color: #64748b;
    font-size: 1em;
    font-style: italic;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
    min-height: 3em;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-slider-container {
    margin-bottom: 20px;
}

.example-result {
    text-align: center;
}

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

/* Motivation Section */
.motivation-section {
    margin: 50px 0;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #95a5a6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.motivation-section h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.motivation-content {
    max-width: none;
}

.motivation-text {
    color: #34495e;
    font-size: 1.05em;
    line-height: 1.7;
    text-align: justify;
    margin: 0;
}

/* Method Section */
.method-section {
    margin: 50px 0;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #95a5a6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.method-section h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.method-content {
    max-width: none;
}

.method-overview {
    color: #34495e;
    font-size: 1.05em;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 40px;
}

.method-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Citation Footer Styles */
.citation-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    padding: 50px 0;
    margin-top: 60px;
}

.citation-footer .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

.citation-footer h3 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.bibtex-container {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.bibtex-code {
    background: #f8f9fa;
    padding: 30px;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    overflow-x: auto;
    white-space: pre;
    border: none;
    border-radius: 0;
    text-align: left;
}

.copy-bibtex-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    z-index: 10;
}

.copy-bibtex-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.copy-bibtex-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }
    
    .teaser-container {
        margin-top: 20px;
        padding: 20px;
        gap: 20px;
    }
    
    .paper-details {
        text-align: center;
    }
    
    .inline-teaser-container {
        margin: 30px 0;
    }
    
    .inline-teaser-video {
        max-height: 350px;
    }
    
    .title {
        font-size: 1.8em;
        text-align: center;
    }
    
    .links {
        text-align: center;
    }
    
    .link-button {
        display: block;
        margin: 10px auto;
        width: 200px;
    }
    
    .header-author {
        display: block;
        margin: 8px 0;
        font-size: 1em;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .examples-grid-1x3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .example-tile {
        padding: 20px;
    }
    
    .method-section,
    .motivation-section {
        padding: 30px 20px;
    }
    
    .method-img {
        max-width: 100%;
        margin: 20px 0;
        padding: 0 10px;
    }
    
    .citation-footer {
        padding: 40px 0;
    }
    
    .citation-footer .container {
        padding: 0 20px;
    }
    
    .citation-footer h3 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    .bibtex-code {
        font-size: 12px;
        padding: 20px;
        line-height: 1.5;
    }
    
    .copy-bibtex-btn {
        position: static;
        display: block;
        margin: 20px auto 0;
        width: fit-content;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
