:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --bg-color: #ecf0f1;
    --text-color: #2c3e50;
    --well-size: 40px;
    --well-gap: 4px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.peebedu-link {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Alfa Slab One', cursive;
    font-size: 1.8rem;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.peebedu-link:hover {
    color: var(--secondary-color);
    transform: translateY(-50%) scale(1.05);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}


.btn-toggle {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    transition: background-color 0.3s;
}

.btn-toggle:hover {
    background-color: #2980b9;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 320px;
    background-color: white;
    padding: 1.5rem;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    overflow-y: auto;
    overflow-x: hidden;
}

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

.assay-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.assay-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #ddd;
    background-color: white;
    border-radius: 8px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    transition: all 0.3s;
}

.assay-btn img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.assay-btn.active {
    border-color: var(--secondary-color);
    background-color: #e3f2fd;
}

.assay-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.assay-btn:not(.locked):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.chemistry-selector {
    margin-bottom: 2rem;
}

#chemistry-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.protocol-steps {
    margin-left: -1rem;
    padding-left: 0;
}

.protocol-steps h3 {
    margin-left: 1rem;
}

.protocol-steps ol {
    counter-reset: step-counter;
    list-style: none;
    margin: 0;
    padding: 0;
}

.protocol-steps li {
    counter-increment: step-counter;
    padding: 0.75rem 0;
    position: relative !important;
    padding-left: 3.5rem;
    padding-right: 0.5rem;
    word-wrap: break-word;
}

.protocol-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1.8rem;
    height: 1.8rem;
    background-color: #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.protocol-steps li.current::before {
    background-color: var(--secondary-color);
    color: white;
}

.protocol-steps li.completed::before {
    background-color: var(--success-color);
    color: white;
    content: "✓";
}

.lab-area {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.orientation-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.plate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.microplate {
    display: grid;
    grid-template-columns: auto auto repeat(12, var(--well-size));
    grid-template-rows: auto auto repeat(8, var(--well-size));
    gap: var(--well-gap);
    background-color: #333;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.well {
    width: var(--well-size);
    height: var(--well-size);
    border-radius: 50%;
    background-color: #f8f8f8;
    border: 2px solid #ccc;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g transform="scale(1.33)"><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/><circle cx="12" cy="22" r="1" fill="red" opacity="0.8"/></g><line x1="16" y1="29" x2="16" y2="32" stroke="rgba(0,0,0,0.5)" stroke-width="1"/><line x1="14" y1="31" x2="18" y2="31" stroke="rgba(0,0,0,0.5)" stroke-width="1"/></svg>') 16 29, crosshair;
    transition: all 0.3s;
    position: relative;
}

.well:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.well.selected {
    border-color: var(--secondary-color);
    border-width: 3px;
    box-shadow: 0 0 0 2px white, 0 0 0 5px var(--secondary-color);
}

.well.data-selected {
    border-color: var(--warning-color);
    border-width: 3px;
    box-shadow: 0 0 0 2px white, 0 0 0 5px var(--warning-color);
}

/* Ensure selection is visible even with glowing wells */
.well.fluorescent.selected,
.well.chemiluminescent.selected {
    box-shadow: 0 0 10px #00ff00, 0 0 0 2px white, 0 0 0 5px var(--secondary-color);
}

.well.fluorescent.data-selected,
.well.chemiluminescent.data-selected {
    box-shadow: 0 0 10px #00ff00, 0 0 0 2px white, 0 0 0 5px var(--warning-color);
}

.well.has-antigen {
    background-color: #ffe4b5;
}

.well.has-antibody {
    background-color: #b5e4ff;
}

.well.has-substrate {
    background-color: #ffff99;
}

.well.has-sample {
    background: linear-gradient(45deg, #ffebcd 50%, transparent 50%);
    background-color: #fff5ee;
}

.well.fluorescent {
    background-color: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

.well.chemiluminescent {
    background-color: white;
    animation: flash 0.5s ease-out;
}

@keyframes flash {
    0% { box-shadow: 0 0 20px white; }
    100% { box-shadow: none; }
}

.well-label {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f0f0f0;
    background-color: transparent;
}

.col-select-btn,
.row-select-btn {
    height: 20px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    font-size: 0.65rem;
    transition: all 0.2s;
    padding: 0;
    line-height: 20px;
}

.col-select-btn {
    width: var(--well-size);
}

.row-select-btn {
    width: var(--well-size);
    height: var(--well-size);
}

.col-select-btn:hover,
.row-select-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.col-select-btn.active,
.row-select-btn.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.plate-controls {
    display: flex;
    gap: 1rem;
}

.btn-action {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
}

.btn-action:hover {
    background-color: #2980b9;
}

.btn-action:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.btn-action.highlight {
    background-color: var(--success-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

.molecular-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a1a1a;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.molecular-controls {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    color: white;
}

.well-navigator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.well-navigator label {
    color: #ccc;
    font-size: 0.9rem;
}

.well-navigator select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #2c3e50;
    color: white;
    font-size: 1rem;
    min-width: 100px;
}

.well-navigator select:hover {
    border-color: var(--secondary-color);
}

.molecular-controls h3 {
    margin-bottom: 0.5rem;
    color: white;
}

.molecular-controls p {
    color: #ccc;
    margin-bottom: 1rem;
}

#molecular-canvas-container {
    flex: 1;
    position: relative;
    background-color: #0a0a0a;
    border-radius: 8px;
    overflow: hidden;
}

.molecular-legend {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    color: white;
}

.molecular-legend h4 {
    margin-bottom: 0.75rem;
    color: white;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    position: relative;
}

/* Add shape indicators to legend items */
.legend-item:nth-child(2) .legend-color::after { /* Antigen */
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: inherit;
    border-radius: 50%;
    top: 2px;
    left: 2px;
}

.legend-item:nth-child(6) .legend-color::after { /* HRP Enzyme */
    content: '★';
    position: absolute;
    top: -2px;
    left: 3px;
    color: white;
    font-size: 16px;
}

.legend-item:nth-child(7) .legend-color { /* Substrate */
    transform: rotate(45deg);
    border-radius: 0;
}

.legend-item:nth-child(8) .legend-color::after { /* Blocking proteins */
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: inherit;
    border-radius: 50%;
    top: 4px;
    left: 4px;
}

.reagent-shelf {
    margin-top: 2rem;
}

.reagent-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.reagent-item {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #ddd;
    cursor: grab;
    transition: all 0.3s;
    text-align: center;
}

.reagent-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.reagent-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.reagent-item.selected {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
    transform: scale(1.05);
}

.reagent-item.selected img {
    filter: brightness(0) invert(1);
}

body.pipette-mode {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g transform="scale(1.33)"><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/><circle cx="12" cy="22" r="1" fill="red" opacity="0.8"/></g><line x1="16" y1="29" x2="16" y2="32" stroke="rgba(0,0,0,0.5)" stroke-width="1"/><line x1="14" y1="31" x2="18" y2="31" stroke="rgba(0,0,0,0.5)" stroke-width="1"/></svg>') 16 29, crosshair;
}

body.pipette-mode .well:hover {
    box-shadow: 0 0 8px var(--secondary-color);
    transform: scale(1.15);
}

.reagent-item img {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 0.5rem;
}

/* Results panel removed - using popups instead */

.reader-module {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.reader-module h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.reader-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    background-color: white;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    transition: all 0.3s;
    border-radius: 4px;
    font-size: 0.9rem;
}

.tab-btn.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

#results-chart {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    background-color: white;
    border-radius: 4px;
    padding: 1rem;
}

.results-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.result-card {
    background-color: white;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.result-card.positive {
    border-color: var(--success-color);
}

.result-card.negative {
    border-color: #e0e0e0;
}

.result-card h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.result-card .value {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.result-card.positive .value {
    color: var(--success-color);
}

.result-card.negative .value {
    color: #999;
}

.wash-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 4px;
}

.wash-indicator .wash-count {
    font-weight: 600;
    color: var(--primary-color);
}

.signal-noise-ratio {
    background-color: white;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.signal-noise-ratio .ratio {
    font-size: 2rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.btn-secondary {
    background-color: white;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    transition: all 0.3s;
    display: inline-block;
    width: auto;
}

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

.header-badges {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.badge-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.badge-item.earned {
    background-color: #ffd700;
    box-shadow: 0 2px 8px rgba(255,215,0,0.5);
}

.footer {
    background-color: white;
    padding: 1rem 2rem;
    border-top: 1px solid #ddd;
}

.chemistry-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.chemistry-info img {
    height: 60px;
}

.analysis-modal,
.reader-popup,
.well-data-popup,
.case-study-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.reader-popup .popup-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.well-data-popup .popup-content {
    max-width: 500px;
}

.popup-content.small {
    max-width: 400px;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.info-text {
    text-align: center;
    color: #666;
    margin-top: 1rem;
    font-style: italic;
}

#well-data-content {
    margin: 1rem 0;
    max-height: 400px;
    overflow-y: auto;
}

.well-data-item {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--secondary-color);
}

.well-data-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.well-data-item .data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.well-data-item .data-row strong {
    color: #666;
}

.popup-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

#well-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

#quiz-container {
    margin-bottom: 1.5rem;
}

.quiz-question {
    margin-bottom: 1.5rem;
    text-align: left;
}

.quiz-question h4 {
    margin-bottom: 0.75rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, pointer;
    padding: 0.25rem 0;
}

.quiz-options label.correct-answer {
    background-color: #d4edda;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.feedback {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.feedback.correct {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.feedback.incorrect {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.feedback.no-answer {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.correct-feedback {
    font-weight: 600;
    color: #28a745;
}

.incorrect-feedback {
    font-weight: 600;
    color: #dc3545;
}

.quiz-score {
    background-color: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.quiz-score h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.badge-earned {
    color: #ffc107;
    font-weight: 600;
    margin-top: 0.5rem;
}

.error-heat-map {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
    max-width: 400px;
    margin: 0 auto;
}

.heat-cell {
    width: 30px;
    height: 30px;
    border-radius: 4px;
}

.heat-cell.error-low {
    background-color: #fff3cd;
}

.heat-cell.error-medium {
    background-color: #f8d7da;
}

.heat-cell.error-high {
    background-color: #dc3545;
}

@media (max-width: 1200px) {
    .sidebar, .results-panel {
        width: 240px;
    }
}

/* Tooltip styles */
.tooltip {
    position: relative;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24"><g><rect x="10" y="2" width="4" height="3" rx="0.5" fill="%232196F3"/><rect x="8" y="5" width="8" height="7" rx="1" fill="white" stroke="%23666" stroke-width="0.5"/><rect x="11" y="6" width="2" height="5" fill="%232196F3"/><rect x="10.5" y="12" width="3" height="2" fill="%23ddd"/><path d="M11 14 L11 21 L12 22 L13 21 L13 14 Z" fill="%232196F3"/><circle cx="12" cy="8.5" r="1" fill="white"/></g></svg>') 50 100, help;
}

/* CSS tooltips disabled - using JavaScript tooltips instead */
.tooltip::after,
.tooltip::before {
    display: none;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
}

.tooltip:hover::after {
    transform: translateX(-50%) translateY(-5px);
}

/* Specific tooltip adjustments */
.assay-btn.tooltip::after {
    bottom: auto;
    top: 125%;
}

.assay-btn.tooltip::before {
    bottom: auto;
    top: 115%;
    border-top-color: transparent;
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

.reagent-item.tooltip::after {
    width: 200px;
}

.well.tooltip::after {
    width: 150px;
    font-size: 0.75rem;
}

.protocol-steps li.tooltip::after {
    left: 100%;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    width: 250px;
}

.protocol-steps li.tooltip::before {
    left: 100%;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-right-color: rgba(0, 0, 0, 0.9);
    margin-left: 4px;
}


#chemistry-select option {
    padding: 0.5rem;
}

.chemistry-tooltip {
    display: inline-block;
    margin-left: 0.5rem;
    width: 16px;
    height: 16px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    cursor: help;
}

.modal-content.large {
    max-width: 900px;
    width: 95%;
}

.case-study-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.case-study-card {
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.case-study-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.case-study-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.case-study-card .case-type {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.case-study-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.case-materials {
    background-color: #e3f2fd;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

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

.material-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.material-icon {
    width: 24px;
    height: 24px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar, .results-panel {
        width: 100%;
    }
    
    .tooltip::after {
        width: 200px;
        font-size: 0.75rem;
    }
    
    .case-study-grid {
        grid-template-columns: 1fr;
    }
}

/* Phone home */
body::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    background: url("https://peebedu.com/mark.svg") no-repeat;
}