:root {
    --primary: #3a86ff;
    --secondary: #8338ec;
    --accent: #ff006e;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #38b000;
    --warning: #ffbe0b;
    --danger: #ff006e;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --font-main: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

header {
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    color: #212529;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border-bottom: none;
}

.navbar {
    box-shadow: none !important;
    background: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--light);
}

.logo span {
    background: linear-gradient(90deg, var(--light), rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius);
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 0 !important;
}

.container {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: none !important;
    padding: 2rem;
    margin-bottom: 2rem;
}

.title-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.title-section h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.title-section p {
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
}

.designer-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-group {
    background-color: var(--gray-100);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.control-group:hover {
    box-shadow: var(--shadow);
}

.control-group h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}

.visualization-panel {
    position: relative;
}

.visualization-container {
    background-color: var(--gray-100);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.canvas-container {
    flex-grow: 1;
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.zoom-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.zoom-btn:hover {
    background-color: var(--gray-100);
    transform: scale(1.05);
}

.zoom-btn i {
    color: var(--primary);
    font-size: 1rem;
}

#nanoparticleCanvas {
    width: 100%;
    height: 100%;
}

.property-display {
    margin-top: 1.5rem;
    background-color: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

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

.property-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.property-item {
    display: flex;
    flex-direction: column;
}

.property-label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.property-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.status-stable {
    background-color: rgba(56, 176, 0, 0.15);
    color: var(--success);
}

.status-badge.status-warning {
    background-color: rgba(255, 190, 11, 0.15);
    color: var(--warning);
}

.status-badge.status-unstable {
    background-color: rgba(255, 0, 110, 0.15);
    color: var(--danger);
}

.status-text.status-stable {
    color: var(--success);
}

.status-text.status-warning {
    color: var(--warning);
}

.status-text.status-unstable {
    color: var(--danger);
}

.layers-container {
    margin-top: 1.5rem;
}

.layer-list {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
}

/* Enhanced Layer Visualization Styles */
.layer-item {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    background: white;
    position: relative;
}

.layer-item:last-child {
    border-bottom: none;
}

.layer-item:hover {
    background-color: var(--gray-50);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Layer Icon */
.layer-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Layer Info */
.layer-info {
    flex: 1;
    min-width: 0;
}

.layer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.layer-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-800);
    margin: 0;
}

.layer-status {
    display: flex;
    align-items: center;
}

.layer-status i {
    font-size: 1rem;
    margin-left: 0.5rem;
}

/* Layer Details */
.layer-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.layer-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.layer-detail-item i {
    width: 16px;
    text-align: center;
    color: var(--gray-500);
}

/* Layer Actions */
.layer-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.action-btn:hover {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.edit-btn:hover {
    background-color: var(--primary);
    color: white;
}

.duplicate-btn:hover {
    background-color: var(--success);
    color: white;
}

.delete-btn:hover {
    background-color: var(--danger);
    color: white;
}

/* Empty State */
.layer-empty {
    padding: 2rem;
    text-align: center;
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    background: var(--gray-50);
}

.layer-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.layer-empty-content i {
    font-size: 2rem;
    color: var(--gray-400);
}

.layer-empty-content span {
    font-weight: 500;
    color: var(--gray-600);
}

.layer-empty-content small {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* Material Type Specific Styling */
.layer-item[data-material-type="polymer"] .layer-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.layer-item[data-material-type="protein"] .layer-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.layer-item[data-material-type="functional"] .layer-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.layer-item[data-material-type="targeting"] .layer-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.layer-item[data-material-type="dna"] .layer-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.layer-item[data-material-type="drug"] .layer-icon {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* Status Indicators */
.layer-status .fa-check-circle {
    color: #27ae60;
}

.layer-status .fa-exclamation-triangle {
    color: #f39c12;
}

.layer-status .fa-exclamation-circle {
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .layer-item {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .layer-icon {
        width: 28px;
        height: 28px;
    }
    
    .layer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .layer-status {
        align-self: flex-end;
    }
    
    .layer-details {
        gap: 0.2rem;
    }
    
    .layer-detail-item {
        font-size: 0.8rem;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .layer-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .layer-actions {
        align-self: flex-end;
    }
    
    .layer-details {
        width: 100%;
    }
}

.add-layer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.add-layer-btn:hover {
    background-color: #2a75ea;
    box-shadow: var(--shadow);
}

.compatibility-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius);
    background-color: var(--gray-100);
}

.compatibility-indicator.compatibility-stable {
    border-left: 4px solid var(--success);
}

.compatibility-indicator.compatibility-warning {
    border-left: 4px solid var(--warning);
}

.compatibility-indicator.compatibility-unstable {
    border-left: 4px solid var(--danger);
}

.compatibility-indicator i {
    font-size: 1.5rem;
}

.compatibility-stable i {
    color: var(--success);
}

.compatibility-warning i {
    color: var(--warning);
}

.compatibility-unstable i {
    color: var(--danger);
}

.compatibility-message {
    flex-grow: 1;
}

.compatibility-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.compatibility-desc {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #2a75ea;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
    box-shadow: var(--shadow);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #2a9000;
    box-shadow: var(--shadow);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.slider-wrapper {
    flex: 1;
    position: relative;
}

.input-container {
    display: flex;
    align-items: center;
    width: 90px;
}

.numeric-input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    text-align: right;
}

.unit {
    margin-left: 4px;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.slider {
    flex-grow: 1;
    height: 5px;
    background-color: var(--gray-300);
    appearance: none;
    border-radius: 10px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.slider::-webkit-slider-thumb:hover {
    background-color: #2a75ea;
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background-color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.slider::-moz-range-thumb:hover {
    background-color: #2a75ea;
    transform: scale(1.1);
}

.slider-value {
    width: 50px;
    padding: 0.25rem 0.5rem;
    background-color: var(--gray-200);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
}

.tab-container {
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--gray-300);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab.active {
    color: var(--primary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.tab:hover:not(.active) {
    color: var(--gray-800);
    background-color: var(--gray-100);
}

.tab-content {
    display: none;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow: hidden;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
}

.modal.open {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    box-shadow: var(--shadow-lg);
    animation: modalFade 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-300);
    flex-shrink: 0;
}

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

.close {
    color: var(--gray-600);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid var(--gray-300);
    flex-shrink: 0;
}

.export-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.export-btn {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.export-btn i {
    font-size: 2rem;
}

/* Layer diagram */
.layer-diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.layer-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
}

.layer-circle {
    position: relative;
    border-radius: 50%;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.layer-label {
    position: absolute;
    left: 105%;
    background-color: white;
    padding: 0.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 150px;
    max-width: 200px;
    z-index: 2;
}

.layer-label::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

.layer-line {
    position: absolute;
    height: 1px;
    background-color: var(--gray-400);
    right: 100%;
    top: 50%;
    width: 20px;
}

.layer-info-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.layer-info-detail {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Prediction view */
.prediction-container {
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--radius);
}

.prediction-result {
    margin-bottom: 1.5rem;
}

.prediction-chart {
    height: 250px;
    background-color: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.prediction-info {
    background-color: var(--gray-100);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.prediction-info h4 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.prediction-info p {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.prediction-info ul.status-text {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 1.1em;
    list-style-type: disc;
    list-style-position: inside;
    margin-top: 0.25rem;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.prediction-info ul.status-text li {
    margin-bottom: 0.15rem;
    font-family: var(--font-main);
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.prediction-info ul.status-text.status-warning {
    color: var(--warning);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 1.1em;
    list-style-type: disc;
    list-style-position: inside;
    margin-top: 0.25rem;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

.prediction-info ul.status-text.status-warning li {
    margin-bottom: 0.15rem;
    font-family: var(--font-main);
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
    color: var(--warning);
}

.prediction-info ul.status-text.status-warning li::marker {
    color: var(--warning);
}

/* Switch for advanced options */
.switch-container {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 0.75rem;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-switch {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: .4s;
    border-radius: 34px;
}

.slider-switch:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-switch {
    background-color: var(--primary);
}

input:focus + .slider-switch {
    box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider-switch:before {
    transform: translateX(20px);
}

.switch-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-700);
}

/* Layer badges */
.layer-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.layer-badge-core {
    background-color: #f94144;
}

.layer-badge-polymer {
    background-color: #f9c74f;
}

.layer-badge-functional {
    background-color: #90be6d;
}

.layer-badge-targeting {
    background-color: #43aa8b;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(58, 134, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: var(--radius);
}

.loading-text {
    margin-top: 1rem;
    color: var(--primary);
    font-weight: 500;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
}

.tooltip i {
    color: var(--gray-500);
    cursor: pointer;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--gray-800);
    color: white;
    text-align: center;
    border-radius: var(--radius);
    padding: 0.75rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    font-weight: normal;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--gray-800) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Responsive styles */
@media (max-width: 992px) {
    .designer-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .property-list {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    main {
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }

    .tab {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .tab-container {
        padding: 0.5rem;
    }

    .export-options {
        flex-direction: column;
        gap: 0.8rem;
    }

    .export-btn {
        width: 100%;
    }

    .layer-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .layer-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .layer-diagram {
        transform: scale(0.8);
        transform-origin: center top;
    }
}

@media (max-width: 576px) {
    .title-section h1 {
        font-size: 1.8rem;
    }
    
    .layer-label {
        display: none;
    }

    .navbar {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-links a {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .control-group {
        padding: 1rem;
    }

    .control-group h3 {
        font-size: 1.1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-control, .slider, .numeric-input {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .slider-container {
        flex-direction: column;
    }

    .input-container {
        margin-top: 0.5rem;
        width: 100%;
    }

    .modal-content {
        width: 92%;
        max-width: 92%;
        margin: 5% auto;
        max-height: 90vh;
    }

    .modal-body {
        max-height: 65vh;
        overflow-y: auto;
    }
    
    .view-controls {
        flex-direction: column;
        padding: 0.8rem;
    }
    
    #nanoparticleCanvas {
        width: 100%;
        height: auto;
    }

    .zoom-controls {
        bottom: 1rem;
        right: 1rem;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .title-section h1 {
        font-size: 1.5rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
    }

    .tabs {
        flex-direction: column;
        gap: 0.3rem;
    }

    .tab {
        width: 100%;
        text-align: center;
        border-radius: var(--radius);
    }

    .tab.active::after {
        display: none;
    }

    .tab.active {
        background-color: rgba(58, 134, 255, 0.2);
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Cross-Section View Controls */
.view-controls {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 200px;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 0.9em;
    opacity: 0.7;
}

.view-controls:hover {
    background-color: rgba(255, 255, 255, 0.95);
    opacity: 1;
}

.view-control-group {
    margin-bottom: 1rem;
}

.view-control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.control-select {
    padding: 0.5rem;
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.control-slider {
    width: 100%;
    margin: 0.5rem 0;
}

.control-btn {
    padding: 0.4rem 0.8rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.control-btn:hover {
    background-color: var(--primary-dark);
}

/* Toggle Switch for Cross-Section */
.toggle-container {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-small {
    width: 34px;
    height: 18px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-small .toggle-label:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-input:checked + .toggle-label {
    background-color: var(--primary);
}

.toggle-input:checked + .toggle-label:before {
    transform: translateX(26px);
}

.toggle-small .toggle-input:checked + .toggle-label:before {
    transform: translateX(20px);
}

.helper-plane-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.7rem 0;
}

.small-label {
    font-size: 0.8rem;
    color: var(--gray-700);
}

/* Form notes */
.form-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

.form-note.warning {
    color: #e67e22;
}

/* Compatibility note */
.compatibility-note {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.compatibility-note i {
    color: #2196f3;
    margin-right: 8px;
}

/* Disabled input styles */
input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* DNA sequence validation */
textarea.invalid {
    border-color: #f44336;
    box-shadow: 0 0 0 1px #f44336;
}

/* Surface strategy container */
#surfaceStrategyContainer {
    padding-top: 8px;
    border-top: 1px solid #eee;
    margin-top: 12px;
}

/* About page styles */
.about-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 0;
}

.about-section {
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: transform 0.3s ease;
}

.about-section:hover {
    transform: translateY(-5px);
}

.about-section h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-section h2 i {
    font-size: 1.3rem;
    color: var(--primary);
}

.about-section p {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-section ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.about-section ul li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--gray-700);
}

.about-section ul li:before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.team-member {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--gray-100);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.team-member:hover {
    background-color: var(--gray-200);
    transform: translateY(-3px);
}

.team-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-avatar i {
    font-size: 30px;
    color: var(--primary);
}

.team-info {
    flex-grow: 1;
}

.team-info h3 {
    margin: 0;
    color: var(--gray-900);
    font-size: 1.1rem;
}

.team-title {
    color: var(--primary);
    font-size: 0.9rem;
    margin: 0.3rem 0 0.8rem;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--gray-700);
    margin: 0;
    line-height: 1.4;
}

.contact-section {
    background-color: var(--primary-light);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
}

.contact-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

footer {
    background-color: var(--gray-900);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-logo i {
    color: var(--primary);
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--gray-400);
}

/* Documentation page styles */
.documentation-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

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

.nav-menu {
    list-style-type: none;
    padding: 0;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.5rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.content {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.doc-section {
    margin-bottom: 3rem;
}

.doc-section:last-child {
    margin-bottom: 0;
}

.doc-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.doc-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

/* Documentation table styles */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    border-bottom: 1px solid var(--gray-300);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.header {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

.cell {
    padding: 1rem;
    display: flex;
    align-items: center;
}

.table-row.header .cell {
    font-weight: 600;
}

.table-row:not(.header):nth-child(odd) {
    background-color: var(--gray-100);
}

.table-row:not(.header):hover {
    background-color: var(--gray-200);
}

/* Media queries for documentation */
@media (max-width: 992px) {
    .documentation-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .table-row {
        grid-template-columns: 1fr;
        padding: 0.5rem 0;
    }
    
    .table-row.header {
        display: none;
    }
    
    .cell {
        padding: 0.5rem 1rem;
    }
    
    .cell:not(:first-child)::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
    }
}

/* Media queries for about page */
@media (max-width: 768px) {
    .team-members {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Custom Protein Fields Styles */
.dimension-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.dimension-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#customProteinFields {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #e9ecef;
}

#customProteinFields .form-group {
    margin-bottom: 15px;
}

#customProteinFields label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#customProteinFields .numeric-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#customProteinFields select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* Hide static max coverage message in custom protein modal */
.custom-protein-active .static-max-coverage-message {
    display: none !important;
}

/* Custom Buffer Modal Styles */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #007bff;
}

.checkbox-item label {
    margin: 0;
    font-size: 0.9rem;
    cursor: pointer;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert i {
    font-size: 1.1rem;
}
