/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ЗАГОЛОВОК ЛАБОРАТОРИИ ===== */
.lab-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.lab-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 0.5rem;
    text-align: center;
}

.lab-header h1 i {
    color: #667eea;
    margin-right: 1rem;
}

.lab-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #718096;
    text-align: center;
    margin-bottom: 1.5rem;
}

.objectives {
    background: rgba(102, 126, 234, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.objectives h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 1rem;
}

.objectives ul {
    list-style: none;
}

.objectives li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.objectives li::before {
    content: "🎯";
    position: absolute;
    left: 0;
    top: 0.5rem;
}

/* ===== НАВИГАЦИЯ ===== */
.lab-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.nav-btn.active {
    background: linear-gradient(135deg, #4299e1 0%, #553c9a 100%);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.nav-btn i {
    margin-right: 0.5rem;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.lab-main {
    padding: 2rem 0;
}

.lab-section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: fadeInUp 0.5s ease-out;
}

.lab-section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
}

.section-header i {
    color: #667eea;
    margin-right: 0.5rem;
}

/* ===== СЕКЦИЯ ВВЕДЕНИЯ ===== */
.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.theory-box, .equipment-box {
    background: rgba(247, 250, 252, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.theory-box h3, .equipment-box h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.theory-box p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.key-facts {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

.key-facts h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.key-facts ul, .equipment-box ul {
    list-style: none;
    padding-left: 0;
}

.key-facts li, .equipment-box li {
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.key-facts li::before {
    content: "💡";
    position: absolute;
    left: 0;
}

.equipment-box li::before {
    content: "🔬";
    position: absolute;
    left: 0;
}

/* ===== СЕКЦИЯ ФАЗ МЕЙОЗА ===== */
.meiosis-container {
    space-y: 3rem;
}

.meiosis-division {
    margin-bottom: 3rem;
}

.division-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.phases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.phase-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.phase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.phase-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.phase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.phase-card:hover .phase-image img {
    transform: scale(1.05);
}

.phase-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.phase-card p {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.study-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.study-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ===== СЕКЦИЯ СРАВНЕНИЯ ===== */
.comparison-container {
    space-y: 2rem;
}

.comparison-visual {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.comparison-table {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-align: left;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* ===== СЕКЦИЯ СИМУЛЯЦИИ ===== */
.simulation-container {
    space-y: 2rem;
}

.simulation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 12px;
    flex-wrap: wrap;
}

.sim-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sim-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    font-weight: 500;
}

.speed-control input[type="range"] {
    width: 100px;
}

.simulation-display {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 2rem;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cell-display {
    text-align: center;
    width: 100%;
}

.cell-display h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2rem;
}

.chromosomes-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 200px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    background: rgba(247, 250, 252, 0.5);
}

.chromosome {
    width: 40px;
    height: 80px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.phase-info {
    background: rgba(247, 250, 252, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.phase-info h4 {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.phase-info p {
    color: #718096;
    line-height: 1.6;
}

/* ===== СЕКЦИЯ ПРОТОКОЛА ===== */
.protocol-container {
    max-width: 800px;
    margin: 0 auto;
}

.protocol-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.protocol-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.protocol-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.protocol-header h4 {
    font-size: 1.2rem;
    color: #718096;
}

.student-info {
    margin-bottom: 2rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.protocol-section {
    margin-bottom: 2rem;
}

.protocol-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.protocol-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.protocol-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.work-steps {
    space-y: 1.5rem;
}

.step {
    background: rgba(247, 250, 252, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin-bottom: 1.5rem;
}

.step h5 {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.observations {
    space-y: 1rem;
}

.observation-item {
    margin-bottom: 1rem;
}

.observation-item label {
    display: block;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.observation-item textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.observation-item textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.comparison-analysis {
    margin-top: 1rem;
}

.comparison-analysis label {
    display: block;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.comparison-analysis textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comparison-analysis textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.protocol-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.save-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.print-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.export-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 2% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .lab-header h1 {
        font-size: 2rem;
    }
    
    .lab-header h2 {
        font-size: 1.2rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 200px;
        text-align: center;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
    }
    
    .phases-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .simulation-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .protocol-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .lab-header h1 {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 1rem;
        width: 95%;
    }
}

/* ===== АНИМАЦИИ И ЭФФЕКТЫ ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ ===== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }