:root {
    /* Modern Green Vibrant Color Palette */
    --gradient-primary-start: #43cea2;
    --gradient-primary-end: #185a9d;
    --secondary-color: #20bf6b;
    --accent-color: #4cd964;
    --text-color: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.95);

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 50%, #20bf6b 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: left;
}

/* Header & Navigation - Glass morphism */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

/* Hide header on scroll (mobile only) */
@media (max-width: 768px) {
    header.header-hidden {
        transform: translateY(-100%);
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-primary-start), var(--gradient-primary-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-links a:hover {
    background: linear-gradient(135deg, var(--gradient-primary-start), var(--gradient-primary-end));
    color: white;
    transform: translateY(-2px);
}

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    min-width: 220px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1;
    top: 100%;
    left: 0;
    border-radius: 8px;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    text-transform: none;
    font-weight: 400;
    border-radius: 0;
}

.dropdown-content a:hover {
    background: linear-gradient(135deg, var(--gradient-primary-start), var(--gradient-primary-end));
    color: white;
    transform: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Main Content */
.container {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 2.5rem 40px;
    flex: 1;
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--gradient-primary-start), var(--gradient-primary-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 10px;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    color: var(--text-color);
}

/* Links in content */
.container a {
    color: var(--gradient-primary-start);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
}

.container a:hover {
    border-bottom-color: var(--gradient-primary-start);
    color: var(--gradient-primary-end);
}

/* Footer */
footer {
    background: rgba(45, 55, 72, 0.95);
    backdrop-filter: blur(10px);
    color: #f7fafc;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 0 20px;
    }

    .nav-links {
        margin-top: 1.5rem;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .nav-links li {
        margin: 10px 0;
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #f8f9fa;
        padding-left: 0;
        width: 100%;
        text-align: center;
        display: none;
        /* Keep hidden initially on mobile too */
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .container {
        padding: 0 20px;
        margin: 2rem auto;
    }

    h1 {
        font-size: 2.2rem;
    }
}

/* Neuron Visualization Styles */
.input-section {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.input-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.samples-column {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.samples-column h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.samples-column .sample-category {
    margin-bottom: 1rem;
}

.samples-column h4 {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.samples-column ul {
    margin: 0 0 1rem 1.5rem;
    padding: 0;
}

.samples-column li {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.samples-column .note {
    font-size: 0.85rem;
    margin: 0.5rem 0 0 0;
}

@media (max-width: 900px) {
    .input-row {
        grid-template-columns: 1fr;
    }
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.input-group input[type="number"] {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    font-family: var(--font-body);
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.species-select {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    font-family: var(--font-body);
    background-color: var(--white);
    cursor: pointer;
}

.species-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.specimen-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.viz-btn {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.viz-btn:hover {
    background-color: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.viz-btn:active {
    transform: translateY(0);
}

.error-message {
    background-color: #ffe6e6;
    color: #c0392b;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border-left: 4px solid #c0392b;
    font-weight: 500;
}

#error-message {
    display: none;
}

.viz-section {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.viz-section h2 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.8rem;
}

.viz-section .viz-btn {
    margin: 1rem 0;
    display: inline-block;
}

.viz-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.viz-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
}

.viz-container-3d {
    min-height: 600px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
}

.viz-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.loading-spinner {
    font-size: 1.1rem;
    color: var(--accent-color);
    text-align: center;
    padding: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.error-box {
    background-color: #ffe6e6;
    color: #c0392b;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #c0392b;
    font-weight: 500;
}

.info-section {
    background-color: #e8f4f8;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.specimen-samples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.sample-category h4 {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-section li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Responsive adjustments for visualizations */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }

    .viz-btn {
        width: 100%;
    }

    .viz-container {
        min-height: 300px;
    }

    .viz-container-3d {
        min-height: 400px;
    }
}

/* Specimen Browser Styles */
.browse-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.browse-btn:hover {
    background-color: #5a6268;
}

.load-all-btn {
    background: linear-gradient(135deg, var(--gradient-primary-start), var(--gradient-primary-end));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(3, 102, 214, 0.2);
}

.load-all-btn:hover {
    background-color: #0256b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(3, 102, 214, 0.3);
}

.load-all-btn:active {
    transform: translateY(0);
}

.specimen-browser {
    margin-top: 1.5rem;
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
}

.browser-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.close-btn:hover {
    color: var(--accent-color);
}

.browser-filters {
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.species-select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: var(--white);
    cursor: pointer;
}

.species-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.count-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    align-self: center;
}

.specimen-list {
    min-height: 200px;
}

.specimen-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: 6px;
    overflow: hidden;
}

.specimen-table thead {
    background-color: var(--secondary-color);
    color: var(--white);
}

.specimen-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.specimen-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.specimen-table tr:hover {
    background-color: #f8f9fa;
}

.select-specimen-btn {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.select-specimen-btn:hover {
    background-color: #d35400;
    transform: scale(1.05);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
}

/* Responsive adjustments for visualizations */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }

    .viz-btn {
        width: 100%;
    }

    .viz-container {
        min-height: 300px;
    }

    .viz-container-3d {
        min-height: 400px;
    }

    .specimen-browser {
        max-height: 400px;
    }

    .browser-filters {
        flex-direction: column;
    }

    .specimen-table {
        font-size: 0.85rem;
    }

    .specimen-table th,
    .specimen-table td {
        padding: 0.6rem 0.5rem;
    }
}