/* Science Lab Visualization Styles */

/* Introduction Chapter Styles */
.environment-selection {
    display: flex;
    gap: 24px;
    margin: 32px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.selection-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: var(--surface-color);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.selection-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.selection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.selection-card .material-icons {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.selection-card h3 {
    margin-bottom: 16px;
    color: var(--primary-color);
}

.selection-card p {
    margin-bottom: 24px;
    line-height: 1.6;
}

.selection-card button {
    width: 100%;
}

/* Permanent Lab Styles */
.lab-bench {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.beaker-container {
    text-align: center;
    margin-bottom: 32px;
}

.beaker {
    width: 120px;
    height: 150px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #9e9e9e;
    border-bottom-width: 6px;
    border-radius: 0 0 40% 40%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.beaker::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -10px;
    right: -10px;
    height: 25px;
    background: #9e9e9e;
    border-radius: 50%;
}

.liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    transition: height 1s ease-in-out, background-color 0.5s ease;
    background: transparent;
}

.residue {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.beaker-label {
    margin-top: 16px;
    font-weight: 500;
    color: #666;
}

.scientists-queue {
    display: flex;
    gap: 32px;
    justify-content: center;
}

.scientist {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scientist img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.scientist h4 {
    margin-bottom: 12px;
    color: var(--primary-color);
}

.action-button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-button:hover:not(:disabled) {
    background: #E64A19;
    transform: translateY(-1px);
}

.action-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.wait-message {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

.results-panel {
    margin-top: 24px;
}

.result-message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: start;
    gap: 12px;
}

.result-message.success {
    background: #E8F5E9;
    color: #2E7D32;
}

.result-message.error {
    background: #FFEBEE;
    color: #C62828;
}

.result-message .material-icons {
    font-size: 24px;
}

.error-details {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    font-style: italic;
}

/* Cleanroom Kit Styles */
.parallel-labs {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 24px 0;
}

.cleanroom-lane {
    flex: 1;
    max-width: 300px;
    text-align: center;
}

.cleanroom-lane h4 {
    margin-bottom: 16px;
    color: var(--primary-color);
}

.experiment-kit {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.experiment-kit.opened {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.experiment-kit.disposing {
    opacity: 0.5;
    transform: scale(0.95);
}

.kit-status {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color);
}

.beaker.clean {
    margin: 16px auto;
}

.result-indicator {
    margin-top: 16px;
    min-height: 40px;
}

.success-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #E8F5E9;
    color: #2E7D32;
    border-radius: 20px;
    font-weight: 500;
}

.control-panel {
    text-align: center;
    margin: 32px 0;
}

.primary-button.large {
    padding: 12px 32px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.results-summary-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin-top: 24px;
    text-align: center;
}

.stats-grid {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 24px 0;
}

.stat {
    text-align: center;
}

.stat .material-icons {
    font-size: 48px;
    color: var(--primary-color);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 8px 0;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.summary-message {
    margin: 24px 0;
    line-height: 1.6;
}

/* Technical Deep Dive Styles */
.technical-content {
    margin: 24px 0;
}

.concept-section h3 {
    margin: 24px 0 16px;
    color: var(--primary-color);
}

.architecture-diagram {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.diagram-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.server-block {
    background: #f5f5f5;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    position: relative;
}

.server-block .material-icons {
    font-size: 48px;
    color: #666;
}

.warning-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.developer-queue {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dev-arrow {
    opacity: 0;
    transform: translateX(-20px);
}

.dev-arrow.animate-queue {
    animation: slideInQueue 0.5s forwards;
}

@keyframes slideInQueue {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.queue-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.workflow-step {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.workflow-step.animate-in {
    opacity: 1;
    transform: scale(1);
}

.workflow-step .material-icons {
    font-size: 32px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.workflow-step.success {
    background: #E8F5E9;
    color: #2E7D32;
}

.arrow {
    font-size: 24px;
    color: var(--primary-color);
}

.code-examples {
    margin-top: 32px;
}

.code-block {
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.code-header {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    font-family: monospace;
    font-size: 14px;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-block .keyword {
    color: #1976D2;
    font-weight: 600;
}

.code-block .string {
    color: #388E3C;
}

.code-block .comment {
    color: #666;
    font-style: italic;
}

/* Conclusion Styles */
.strategy-comparison {
    display: flex;
    gap: 24px;
    margin: 24px 0;
    justify-content: center;
}

.strategy-card {
    flex: 1;
    max-width: 400px;
    padding: 24px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.strategy-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.strategy-card.negative {
    background: #FFEBEE;
    border: 2px solid #FFCDD2;
}

.strategy-card.positive {
    background: #E8F5E9;
    border: 2px solid #C8E6C9;
}

.strategy-card h3 {
    margin-bottom: 16px;
}

.strategy-card ul {
    list-style: none;
    padding: 0;
}

.strategy-card li {
    margin: 8px 0;
    line-height: 1.6;
}

.quiz-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quiz-question p {
    margin-bottom: 20px;
    font-size: 16px;
}

.quiz-options {
    margin: 20px 0;
}

.quiz-option {
    display: block;
    margin: 12px 0;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.quiz-option:hover {
    background: #e0e0e0;
}

.quiz-option input {
    margin-right: 12px;
}

.quiz-feedback {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: start;
    gap: 12px;
}

.quiz-feedback.success {
    background: #E8F5E9;
    color: #2E7D32;
}

.quiz-feedback.warning {
    background: #FFF8E1;
    color: #F57C00;
}

.quiz-feedback .material-icons {
    font-size: 24px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

/* Button Styles */
.primary-button, .secondary-button {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

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

.primary-button:hover {
    background: var(--primary-variant-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.secondary-button {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .environment-selection,
    .scientists-queue,
    .parallel-labs,
    .strategy-comparison {
        flex-direction: column;
    }
    
    .selection-card,
    .cleanroom-lane,
    .strategy-card {
        max-width: 100%;
    }
    
    .stats-grid {
        flex-wrap: wrap;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons > * {
        width: 100%;
        justify-content: center;
    }
}