:root {
    --background-color: #ffffff;
    --text-main-color: #000000;
    --text-muted-color: #666666;
    --button-background-color: #f0f0f0;
    --border-color: #eaeaea;
    --success-color: #28a745;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-main-color);
    background-color: var(--background-color);
    padding: 4rem 1rem;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    color: var(--text-muted-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.institution-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.institution-logos a {
    display: flex;
    align-items: center;
}

.institution-logos img {
    max-height: 75px;
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.authors {
    text-align: center;
}

.author-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.orcid-link {
    display: inline-flex;
    margin-left: 4px;
}

.orcid-icon {
    width: 16px;
}

.funding {
    color: var(--text-muted-color);
    text-align: center;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--button-background-color);
    color: var(--text-main-color);
    text-decoration: none;
    height: 50px;
    max-width: 50px;
    border-radius: 25px;
    font-weight: 600;
    transition: max-width 0.4s, background-color 0.3s;
    overflow: hidden;
}

.button:hover,
.tooltip-wrapper:hover .button {
    max-width: 200px;
}

.button:hover .button-text,
.tooltip-wrapper:hover .button-text {
    opacity: 1;
    transform: translateX(5px);
}

.button .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    width: 50px;
    height: 100%;
    transform: scale(0.75);
    transform-origin: center;
}

.button-icon {
    height: 24px;
    width: auto;
}

.button-text {
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease 0.1s;
    padding-right: 25px;
}

.button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Container holding both elements */
.bibtex-wrapper {
    position: relative;
    margin-top: 15px;
    width: 100%;
}

/* Base style for the pre-formatted block */
.bibtex-wrapper pre {
    background-color: var(--button-background-color);
    padding: 16px 50px 16px 16px;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    margin: 0;
}

.bibtex-wrapper code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color: var(--text-muted-color);
    line-height: 1.45;
}

#copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#copy-button.copied {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

#copy-button:active .copy-icon {
    transform: scale(0.8);
}

/* Tooltip wrapper */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    cursor: not-allowed;
}

.tooltip-wrapper .button.disabled {
    pointer-events: none;
}

.tooltip-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background-color: var(--text-main-color);
    color: var(--background-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    margin-bottom: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--text-main-color) transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}