
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* Utility Classes */
.hidden {
    display: none !important;
}

#lewisCanvas {
    border: 1px solid #e2e8f0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 8px;
}



.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}



/* Status Message */
.status-message {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.95rem;
    min-height: 1.5rem;
}

/* Results Section */
.results-section {
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition);
}

.results-section.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    display: none;
    /* Completely hide to prevent layout issues */
}

/* Names Card */

.names-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.name-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.name-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.name-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.name-value.highlight-text {
    color: var(--oa-cyan);
    font-size: 1.3rem;
    font-weight: 700;
}

.alt-names-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar for Alt Names */
.alt-names-list::-webkit-scrollbar {
    width: 6px;
}

.alt-names-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.alt-names-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.alt-names-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.alt-name-item {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alt-name-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Hormone/Functions Card */
.hormone-card {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
}

.function-content {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.function-content::-webkit-scrollbar {
    width: 6px;
}

.function-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.function-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.source-credit {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: right;
    font-style: italic;
}

.badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}


/* Viewer Card */
.viewer-card {
    grid-column: span 2;
    /* Take up 2 columns on large screens */
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .viewer-card {
        grid-column: span 1;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    /* Allow wrapping */
    gap: 0.5rem;
    /* Add gap when wrapped */
}

/* Ensure title doesn't shrink too much but buttons can drop down */
.card-header h3 {
    margin: 0;
    white-space: nowrap;
}

.viewer-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    min-height: 300px;
}

.viewer-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}


/* Details List */
.details-list {
    list-style: none;
}

.details-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
    gap: 1rem;
}

.details-list li:last-child {
    border-bottom: none;
}

.details-list li .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.details-list li .value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 70%;
}

/* 2D Structure */
.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    min-height: 200px;
}

#structure2d {
    max-width: 100%;
    height: auto;
    filter: contrast(1.1);
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    display: inline-block;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border);
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Home Button */
.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 50px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.home-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.home-btn svg {
    width: 18px;
    height: 18px;
}

/* Early Access Banner */
.early-access-banner {
    background: rgba(34, 211, 238, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 15px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.1);
}

.early-access-banner .banner-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--oa-cyan);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.early-access-banner .banner-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
}

.early-access-banner .banner-text strong {
    color: var(--oa-cyan);
    font-weight: 600;
}

/* Responsive Design for Banner */
@media (max-width: 768px) {
    .early-access-banner {
        padding: 1rem;
    }

    .early-access-banner .banner-title {
        font-size: 1rem;
    }


    /* Hormone Card NEAT Styles */
    .hormone-card p {
        font-size: 0.95rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 0.8rem;
    }

    .hormone-card .description-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hormone-card .data-block {
        margin-top: 1rem;
    }

    .hormone-card h4 {
        color: var(--gold);
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.5rem;
        opacity: 0.9;
    }
}


/* Contact Card specifics */
.contact-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.email-btn {
    display: inline-block;
    margin-top: 1rem;
}


/* Missing Home Page Styles */
.about-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0 3rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.about-section h2 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-section p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}





/* Structure Toggle Buttons (Segmented Control Style) */
.toggle-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    gap: 1rem;
    /* Add gap for wrapping */
    align-items: center;
    max-width: 100%;
    /* Prevent overflow */
}

.btn-xs {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.35rem 0.6rem;
    /* Reduced padding */
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    /* Reduced size */
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    line-height: normal;
    /* explicit line height */
}

.btn-xs:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-xs.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    z-index: 2;
}
