
:root {
    --primary-color: #2e8b57;
    --secondary-color: #3a5f0b;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), 
                url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin: 30px 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* About Section */
.about-section {
    padding: 60px 0;
    text-align: center;
}

.about-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-section p {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    
    .nav-links {
        margin-top: 20px;
    }
    
    .nav-links li {
        margin: 0 15px;
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
}

/* Timeline preview container */
.timeline-preview {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    max-width: 100%;
    gap: 20px;
}

/* Timeline SVG container */
#miniTimelineContainer {
    flex: 1;
    min-width: 300px;
    max-width: calc(100% - 320px);
    height: 200px;
    position: relative;
}

/* Legend container */
.legend-container {
    flex: 0 0 300px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 900px) {
    .timeline-preview {
        flex-direction: column;
    }
    #miniTimelineContainer {
        max-width: 100%;
    }
    .legend-container {
        width: 100%;
        margin-top: 15px;
        max-height: 150px;
    }
}


.timeline-section {
    margin-bottom: 40px;
}

.container {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

#doiForm {
    margin: 20px 0;
}

#doiInput {
    padding: 8px;
    width: 300px;
    margin-right: 10px;
}

button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    display: inline-block;
}

.message.success {
    background-color: #dff0d8;
    color: #3c763d;
}

.message.error {
    background-color: #f2dede;
    color: #a94442;
}

.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

#papersTable {
    width: 100%;
    border-collapse: collapse;
}

#papersTable th, #papersTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#papersTable th {
    background-color: #f2f2f2;
}

#papersTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#papersTable tr:hover {
    background-color: #f0f0f0;
}


.mark-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mark-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-width: 100%;
}

#papersTable {
    width: auto;
    border-collapse: collapse;
    min-width: 100%;
}

#papersTable th, #papersTable td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

/* Default alignment for all cells */
#papersTable td {
    text-align: left;
}

/* Center align Year and Plant columns */
#papersTable td:nth-child(4),
#papersTable td:nth-child(5) {
    text-align: center;
}

/* Center align View column */
#papersTable td:last-child {
    text-align: center;
}

.view-cell {
    text-align: center;
    padding: 8px;
}

.view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #3498db;
    border-radius: 50%;
    transition: all 0.2s;
}

.view-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
    transform: scale(1.1);
}

.view-link svg {
    vertical-align: middle;
}



#viewPapersTable {
    width: auto;
    border-collapse: collapse;
    min-width: 100%;
}

#viewPapersTable th, #viewPapersTable td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

/* Default alignment for all cells */
#viewPapersTable td {
    text-align: left;
}

/* Center align Year and Plant columns */
#viewPapersTable td:nth-child(4),
#viewPapersTable td:nth-child(5) {
    text-align: center;
}

/* Center align Actions column */
#viewPapersTable td:last-child {
    text-align: center;
}

#viewPapersTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#viewPapersTable tr:hover {
    background-color: #f0f7ff;
}

#viewPapersTable th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
}

#papersTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#papersTable tr:hover {
    background-color: #f0f7ff;
}

#papersTable td {
    word-wrap: break-word;
    max-width: none;
    min-width: 150px;  /* Give gene target column more room */
}

/* Specifically target the gene target column (5th column) */
#papersTable td:nth-child(5) {
    min-width: 200px;
    max-width: 300px;
}

#papersTable .editable, 
#papersTable .editable-select {
    width: 100%;
    box-sizing: border-box;
}

#papersTable .editable-select {
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    text-decoration: none;
}

.save-btn, .delete-btn {
    padding: 5px 10px;
    margin: 2px;
    font-size: 0.9em;
}

.save-btn {
    background-color: #4CAF50;
    color: white;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.view-timeline-btn {
    padding: 8px 16px;
    background-color: #616161;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.view-timeline-btn:hover {
    background-color: #424242;
}



/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 1200px;
    border-radius: 5px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

h1 {
    margin: 0 0 20px 0;
    font-family: 'Share Tech Mono', monospace;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
}

h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#doiForm {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-btn {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #2980b9;
}

.or-divider {
    text-align: center;
    position: relative;
    margin: 10px 0;
    color: #7f8c8d;
}

.or-divider::before,
.or-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #ddd;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.file-info {
    font-size: 0.9em;
    color: #7f8c8d;
    text-align: center;
    width: 100%;
}

.download-link {
    display: inline-block;
    margin-top: 5px;
    color: #3498db;
    font-size: 0.8em;
    text-decoration: none;
}

.download-link:hover {
    text-decoration: underline;
}

/* Constructs styling */
.constructs-container {
    margin: 10px 0;
}

.add-construct-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 15px 0;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
    width: 100%;
}

.add-construct-btn:hover {
    background-color: #2980b9;
}

.add-construct-btn .plus-icon {
    font-size: 18px;
    font-weight: bold;
}

.add-construct-btn:hover {
    background-color: #2980b9;
}

.add-construct-btn::before {
    content: "+";
    font-size: 18px;
    font-weight: bold;
}

.construct-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.construct-input-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.construct-input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

input.invalid, 
textarea.invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

.invalid-label {
    color: #e74c3c;
    font-weight: bold;
}

.remove-construct {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.remove-construct:hover {
    background: #c0392b;
}

.add-construct-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 10px 0;
    cursor: pointer;
    font-size: 0.9em;
}

.add-construct-btn:hover {
    background-color: #2980b9;
}

.construct-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.construct-input-group input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
}

.remove-construct {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
}

.constructs-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.construct-item {
    padding: 3px 0;
}

.construct-item a {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9em;
}

.construct-item a:hover {
    text-decoration: underline;
}

.file-info .progress-container {
    width: 100%;
    margin-top: 10px;
    display: none; /* Hidden by default */
}

.file-info .progress-container.active {
    display: block;
}

.file-info progress {
    width: 100%;
    height: 8px;
    margin-top: 5px;
    border-radius: 4px;
    overflow: hidden;
    transition: opacity 0.3s;
}

.file-info progress::-webkit-progress-bar {
    background-color: #f0f0f0;
    border-radius: 4px;
}

.file-info progress::-webkit-progress-value {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.file-info progress::-moz-progress-bar {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 4px;
}

.file-info .progress-text {
    display: block;
    margin-top: 5px;
    font-size: 0.8em;
    color: #7f8c8d;
    text-align: center;
}

#doiInput {
    padding: 8px;
    width: 300px;
    margin-right: 10px;
}

button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    display: inline-block;
}

.message.success {
    background-color: #dff0d8;
    color: #3c763d;
}

.message.error {
    background-color: #f2dede;
    color: #a94442;
}


/* Timeline Styles */
#timelineContainer {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 15px;
}

#timelineSVG {
    display: block;
    width: 100%;
    height: 400;
}

.paper-group {
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.85;
}

.paper-base {
    transition: all 0.2s ease-out;
    stroke: #fff;
}

.paper-ring {
    transition: all 0.2s ease-out;
    stroke-linecap: round;
}

.paper-group:hover {
    opacity: 1;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.3));
    z-index: 100;
}

/* Tooltip styles */
.tooltip {
    position: absolute;
    padding: 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 4px;
    pointer-events: none;
    font-size: 12px;
    max-width: 300px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    transition: opacity 0.2s;
}

.tooltip-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.tooltip-doi {
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.tooltip-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 5px;
}

.tooltip-mark {
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8em;
    background-color: rgba(255,255,255,0.2);
}

.tooltip-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.tooltip-doi {
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.tooltip-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 5px;
}

.tooltip-mark {
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8em;
}

#exportBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
}

#exportBtn:hover {
    background-color: #2980b9;
}

.axis path,
.axis line {
    fill: none;
    stroke: #333;
    shape-rendering: crispEdges;
}

.axis text {
    font-size: 11px;
    fill: #333;
}

.grid line {
    stroke: #e0e0e0;
    stroke-dasharray: 2,2;
}

.paper {
    cursor: pointer;
    transition: r 0.2s;
}

.paper:hover {
    r: 10;
}


/* Publication Timeline Styles */
#timelineContainer {
    margin: 30px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

#exportTimelineBtn {
    padding: 8px 16px;
    background-color: #4285F4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

#exportTimelineBtn:hover {
    background-color: #3367D6;
}

.bar {
    transition: all 0.3s ease;
}

.bar:hover {
    fill: #3367D6;
}

.bar-label {
    font-size: 12px;
    fill: #333;
}

/* Mini Timeline Styles */
.timeline-preview {
    margin: 30px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

h3 {
    color: #2e8b57; /* Matching the primary color */
    font-size: 1.2em;
    margin: 1em 0 0.5em 0;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #3a5f0b; /* Matching the secondary color */
}

/* Research Groups styles */
.group-image {
    flex: 0 0 35%;
    max-width: 250px;
    margin-right: 20px;
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lab-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lab-photo:hover {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .group-image {
        flex: 1;
        max-width: 100%;
        margin: 0 0 20px 0;
    }
    
    .image-wrapper {
        max-width: 350px;
        margin: 0 auto;
    }
}

.research-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.group-header {
    margin-bottom: 15px;
}

.group-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.group-image {
    flex: 0 0 40%;
    max-width: 300px;
}

.group-text {
    flex: 1;
    min-width: 0;
}

.group-details {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.group-details p {
    margin: 5px 0;
    font-size: 0.9em;
}

.research-group h3 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-size: 1.4em;
}

.research-group h4 {
    color: var(--secondary-color);
    margin: 15px 0 8px 0;
    font-size: 1.1em;
}

.research-group ul {
    padding-left: 20px;
    margin: 0 0 15px 0;
}

.research-group li {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.group-leader {
    margin: 0;
    font-style: italic;
    color: #666;
}

.group-website {
    margin-top: 15px;
    text-align: center;
}

.research-group .group-details strong {
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .group-content {
        flex-direction: column;
    }
    
    .group-image {
        flex: 1;
        max-width: 100%;
        margin-bottom: 15px;
    }
}

/* Resources page styles */
.resource-links {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.resource-links h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.resource-links .btn {
    display: inline-block;
    margin-top: 10px;
}

.timeline-error {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
    margin: 10px 0;
}

#miniTimelineContainer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    height: 400px;
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 15px;
}

#miniTimelineSVG {
    display: block;
    width: 100%;
    height: 400;
}

.export-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background-color: #4285F4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    font-size: 0.8em;
}

.export-btn:hover {
    background-color: #3367D6;
}

/* Table styles */
.table-container {
    margin-top: 20px;
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    width: 100%;
    max-width: 100vw; /* Allow horizontal scrolling on small screens */
}

#papersTable {
    width: 100%;
    border-collapse: collapse;
}

#papersTable th, #papersTable td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

#papersTable th {
    background-color: #f2f2f2;
    text-align: left;
}

#papersTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#papersTable tr:hover {
    background-color: #f0f7ff;
}

#papersTable td {
    word-wrap: break-word;
    max-width: 300px;
}

.actions-cell {
    text-align: center;
}

.edit-btn, .delete-btn {
    padding: 5px 10px;
    margin: 2px;
    font-size: 0.9em;
    cursor: pointer;
}

.edit-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
}

.edit-btn:hover {
    background-color: #2980b9;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* Line Timeline Styles */
.line-timeline-container {
    margin: 30px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#lineTimelineSVG {
    display: block;
    width: 100%;
    height: 400;
}

.timeline-line {
    stroke: #4285F4;
    stroke-width: 3;
    fill: none;
}

.timeline-dot {
    fill: #4285F4;
    stroke: white;
    stroke-width: 1.5;
    cursor: pointer;
    transition: r 0.2s;
}

.timeline-dot:hover {
    fill: #3367D6;
}

.timeline-year-label {
    font-size: 12px;
    fill: #666;
    text-anchor: middle;
}

.timeline-count-label {
    font-size: 10px;
    fill: #666;
    text-anchor: middle;
}

.refresh-btn {
    padding: 5px 10px;
    margin: 2px;
    font-size: 0.9em;
    background-color: #9b59b6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.refresh-btn:hover {
    background-color: #8e44ad;
}

.refresh-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.export-btn {
    padding: 8px 16px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-block;
    margin-left: 10px;
}

.export-btn:hover {
    background-color: #219653;
}

.timeline-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.timeline-header .refresh-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.timeline-header .refresh-btn:hover {
    background-color: #2980b9;
}

.timeline-header .refresh-btn.highlight {
    animation: pulse 2s infinite;
    background-color: #f39c12;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(243, 156, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

.last-updated {
    margin-left: auto;
    color: #7f8c8d;
    font-size: 0.9em;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.mark-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 2px;
    color: white;
    font-size: 0.8em;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 100%;
}

.modal h2 {
    margin-top: 0;
}

.modal form {
    display: grid;
    gap: 10px;
}

.modal label {
    display: grid;
    gap: 5px;
}

.modal input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.modal .close:hover,
.modal .close:focus {
    color: black;
    text-decoration: none;
}

.mark-checkboxes {
    display: grid;
    gap: 5px;
    margin: 10px 0;
}

.mark-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
}
.timeline-error {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
    margin: 10px 0;
}
/* Edit Modal Improvements */
#editModal {
    display: none;
    z-index: 1000;
    background-color: rgba(0,0,0,0.5);
}

#addConstructBtn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

#addConstructBtn:hover {
    background-color: #2980b9;
}

#addConstructBtn::before {
    content: "+";
    font-size: 18px;
    font-weight: bold;
}

#addConstructBtn:hover {
    background-color: #2980b9;
}

#addConstructBtn::before {
    content: "+";
    font-size: 18px;
    font-weight: bold;
}

/* Remove any old constructs textarea if it exists */
#editConstructs {
    display: none;
}

/* Add Construct Button Styles */
#addConstructBtn {
    display: block !important;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 18px;
    margin: 20px 0 15px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    width: 100%;
    transition: background 0.3s;
}

#addConstructBtn:hover {
    background-color: #2980b9;
}

#addConstructBtn::before {
    content: "+";
    font-size: 20px;
    font-weight: bold;
    margin-right: 8px;
}

#editModal .close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
}

.construct-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr 30px;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.modal-content {
    max-width: 700px;
    padding: 25px;
}

.modal-content label {
    display: block;
    margin: 15px 0 5px;
    font-weight: bold;
}

.modal-content input[type="text"],
.modal-content input[type="date"],
.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-content textarea {
    min-height: 100px;
    resize: vertical;
}

/* Construct input improvements */
#constructsContainer {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.construct-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.construct-input-group input {
    padding: 10px 12px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.construct-input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.remove-construct {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.remove-construct:hover {
    background: #c0392b;
}

#addConstructBtn {
    background-color: #3498db;
    color: forestgreen;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 20px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#addConstructBtn:hover {
    background-color: #2980b9;
}

#addConstructBtn::before {
    content: "+";
    font-size: 18px;
    font-weight: bold;
}

/* Epigenetic marks checkboxes */
.mark-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin: 15px 0;
}

.mark-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

/* Form buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.form-actions button[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
    transition: all 0.3s ease;
    position: relative;
}

.form-actions button[type="submit"].loading {
    background-color: #2E7D32;
    cursor: not-allowed;
}

.form-actions button[type="submit"].loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-actions button[type="button"] {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
}
