/* Additional styles for Virtual Biology Lab */

/* Custom animations */
@keyframes bacteriaGrowth {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes inhibitionAppear {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 0.9; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Enhanced bacteria colony styles */
.bacteria-colony {
    animation: bacteriaGrowth 0.8s ease-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bacteria-colony:nth-child(odd) {
    animation-delay: 0.2s;
}

.bacteria-colony:nth-child(even) {
    animation-delay: 0.4s;
}

/* Enhanced inhibition zone */
.inhibition-zone {
    animation: inhibitionAppear 1s ease-out 0.5s both;
    box-shadow: inset 0 0 20px rgba(255,107,107,0.3);
}

/* Interactive card hover effects */
.substance-card:hover,
.bacteria-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.substance-card.selected,
.bacteria-card.selected {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Petri dish enhancements */
.petri-dish {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background: 
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8) 1px, transparent 2px),
        radial-gradient(circle at 70% 70%, rgba(255,255,255,0.6) 1px, transparent 2px),
        radial-gradient(circle, #f0f8ff 0%, #e6f3ff 100%);
}

/* Lab equipment styling */
.substance-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.substance-icon::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

/* Protocol section styling */
.protocol-section {
    position: relative;
}

.protocol-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #4a90e2 0%, #357abd 100%);
    border-radius: 2px;
}

/* Form input enhancements */
input[type="text"], 
input[type="date"], 
textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="date"]:focus, 
textarea:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: #e2e8f0;
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #4a90e2;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-track {
    background: #e2e8f0;
    height: 6px;
    border-radius: 3px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    background: #4a90e2;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

/* Button enhancements */
button {
    transition: all 0.3s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

/* Loading spinner customization */
.animate-spin {
    border-right-color: transparent;
    border-top-color: transparent;
}

/* Results display */
.results-appear {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Observation cards */
.observation-card {
    transition: all 0.3s ease;
}

.observation-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Theory section cards */
.theory-card {
    transition: transform 0.3s ease;
}

.theory-card:hover {
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .petri-dish {
        width: 250px;
        height: 250px;
    }
    
    .substance-icon {
        width: 30px;
        height: 45px;
    }
    
    .protocol-section {
        margin-bottom: 1rem;
    }
}

/* Print styles */
@media print {
    .bg-gradient-to-br {
        background: white !important;
    }
    
    .shadow-lg {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
    
    .text-indigo-800,
    .text-indigo-600 {
        color: #1f2937 !important;
    }
    
    button {
        display: none !important;
    }
}

/* Accessibility improvements */
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

.substance-card:focus,
.bacteria-card:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Will be implemented if requested */
}