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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.logo-section {
    display: flex;
    justify-content: center;
}

.kth-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.title-section {
    width: 100%;
    text-align: center;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0.9;
}

.conference {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 500;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.authors {
    margin-bottom: 40px;
}

.author-placeholder {
    font-size: 1.1rem;
    opacity: 0.9;
}

.affiliation {
    margin-top: 25px;
    margin-bottom: 20px;
}

.department {
    font-size: 1.05rem;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 5px;
}

.institution {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

.links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #ffffff;
    color: #667eea;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Main content */
.main {
    padding: 80px 0;
}

.section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    color: #2d3748;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Abstract */
#abstract {
    background: #f8f9fa;
    padding: 80px 0;
}

.abstract-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Results section */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.result-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.result-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

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

.metric-download {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

/* Enhanced Cross Benchmark Performances Card */
.cross-benchmark-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 2px solid #667eea;
    position: relative;
    overflow: hidden;
}

.cross-benchmark-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.card-icon {
    font-size: 1.5rem;
    color: #667eea;
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.card-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.4rem;
}

.card-content {
    margin-bottom: 25px;
}

.card-description {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.performance-highlights {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 500;
}

.highlight-item i {
    color: #667eea;
    font-size: 0.85rem;
}

.card-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.enhanced-download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.enhanced-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.enhanced-download .download-icon {
    opacity: 0.7;
    font-size: 0.8rem;
}

/* Plots section */
.plots-section {
    margin-top: 60px;
}

.plots-section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    color: #2d3748;
}

.plots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.plot-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.plot-container h4 {
    padding: 20px;
    background: #f8f9fa;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
}

/* PDF viewer styles */
.pdf-viewer {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-viewer iframe {
    width: 100%;
    height: 500px;
    border: none;
    display: block;
}

.plot-controls {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fullscreen-btn:hover {
    background: #38a169;
}

.pdf-placeholder {
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pdf-placeholder:hover {
    background: #f0f0f0;
}

.pdf-placeholder i {
    font-size: 3rem;
    color: #e53e3e;
    margin-bottom: 15px;
}

.pdf-placeholder p {
    margin: 5px 0;
    color: #666;
}

.placeholder-text {
    font-style: italic;
    font-size: 0.9rem;
}

/* Heatmap preview styles */
.plot-preview {
    margin-top: 20px;
    width: 100%;
}

.heatmap-preview {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
}

.model-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.model-name {
    font-weight: 600;
    min-width: 100px;
    color: #2d3748;
    font-size: 0.75rem;
}

.score-grid {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.score {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.7rem;
    min-width: 35px;
    text-align: center;
}

.score.female {
    background: #fbb6ce;
    color: #702459;
}

.score.male {
    background: #bee3f8;
    color: #2a4365;
}

.preview-note {
    margin-top: 10px;
    font-size: 0.7rem;
    color: #666;
    font-style: italic;
}

/* Datasets section */
.datasets-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
}

.datasets-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #2d3748;
    text-align: center;
}

/* Upload info styles */
.plots-upload-info {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.upload-notice {
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    border: 1px solid #38b2ac;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.upload-notice i {
    color: #38b2ac;
    font-size: 1.2rem;
    margin-top: 2px;
}

.upload-notice p {
    margin: 0;
    color: #2d3748;
    line-height: 1.6;
}

.upload-notice strong {
    color: #38b2ac;
}

/* Code section */
.code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.code-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.code-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.code-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

.code-info p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #5a67d8;
}

/* Citation section */
#citation {
    background: #f8f9fa;
    padding: 80px 0;
}

.citation-box {
    position: relative;
    background: #2d3748;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.citation-box pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow-x: auto;
    max-width: 100%;
}

.citation-box code {
    color: #e2e8f0;
}

.copy-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #5a67d8;
}

/* LLM Judge Section */
.llm-judge-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 40px;
    margin-top: 60px;
    margin-bottom: 60px;
    border: 1px solid #e2e8f0;
}

.llm-judge-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.llm-judge-section h3 i {
    color: #667eea;
}

.judge-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 1rem;
}

.judge-description strong {
    color: #667eea;
}

.judge-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.judge-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.judge-tab:hover {
    color: #667eea;
}

.judge-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.judge-content {
    display: none;
}

.judge-content.active {
    display: block;
}

.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.dimension-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.dimension-card h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.dimension-item {
    margin-bottom: 20px;
}

.dimension-item:last-child {
    margin-bottom: 0;
}

.dimension-item h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.dim-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.rubric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rubric .score {
    font-size: 0.85rem;
    color: #555;
    padding: 4px 8px;
    background: #f7fafc;
    border-radius: 4px;
    line-height: 1.4;
}

.rubric .score strong {
    color: #667eea;
}

.prompt-template {
    background: #2d3748;
    border-radius: 10px;
    padding: 25px;
    overflow-x: auto;
}

.prompt-template pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.prompt-template code {
    color: #e2e8f0;
}

.gender-note {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border-radius: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.gender-note i {
    color: #667eea;
    font-size: 1.3rem;
    margin-top: 2px;
}

.gender-note strong {
    color: #667eea;
}

.gender-note div {
    color: #444;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        gap: 20px;
    }
    
    .kth-logo {
        height: 60px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .links {
        flex-direction: column;
        align-items: center;
    }
    
    .code-item {
        flex-direction: column;
        text-align: center;
    }
    
    .plots-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .pdf-viewer iframe {
        height: 300px;
    }
    
    .plot-controls {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    /* Enhanced card responsive styles */
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .performance-highlights {
        align-items: center;
    }
    
    .enhanced-download {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* LLM Judge responsive styles */
    .llm-judge-section {
        padding: 25px;
    }
    
    .dimensions-grid {
        grid-template-columns: 1fr;
    }
    
    .judge-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .judge-tab {
        padding: 10px 16px;
        text-align: center;
    }
    
    .gender-note {
        flex-direction: column;
        text-align: center;
    }
    
    .prompt-template {
        padding: 15px;
    }
    
    .prompt-template pre {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .kth-logo {
        height: 50px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .department {
        font-size: 0.95rem;
    }
    
    .institution {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .header {
        padding: 40px 0;
    }
    
    .main {
        padding: 60px 0;
    }
    
    .section {
        margin-bottom: 60px;
    }
}

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

/* Loading animation for PDF placeholders */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.pdf-placeholder {
    animation: pulse 2s infinite;
}