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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.lab-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-content i {
    font-size: 50px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
}

.header-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.header-content p {
    font-size: 16px;
    opacity: 0.9;
}

/* Tabs */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-btn i {
    font-size: 18px;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

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

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

.card {
    background: white;
}

.card h2 {
    font-size: 26px;
    color: #667eea;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Theory Section */
.theory-section {
    margin-bottom: 30px;
}

.theory-section h3 {
    color: #495057;
    font-size: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theory-section p {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.8;
}

.theory-section ul {
    list-style: none;
    padding-left: 20px;
}

.theory-section ul li {
    color: #6c757d;
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.theory-section ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.highlight {
    background: linear-gradient(120deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 18px;
}

.info-box {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.info-box p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-box i {
    color: #667eea;
    font-size: 20px;
    min-width: 25px;
}

.equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.equipment-list li {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.equipment-list li:before {
    display: none;
}

.equipment-list i {
    font-size: 24px;
    color: #667eea;
}

/* Virtual Student */
.virtual-student {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.student-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 30px;
}

.student-avatar {
    position: relative;
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.student-avatar > i {
    font-size: 80px;
    color: #667eea;
}

.heart-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: #ff6b6b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heartbeat 1.2s ease-in-out infinite;
}

.heart-icon i {
    color: white;
    font-size: 20px;
}

.heart-icon.fast {
    animation: heartbeat-fast 0.6s ease-in-out infinite;
}

@keyframes heartbeat-fast {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
}

.pulse-display {
    background: white;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pulse-value {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.pulse-label {
    font-size: 16px;
    color: #6c757d;
    font-weight: 500;
}

.student-status {
    margin-top: 20px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: #495057;
}

.status-indicator i {
    font-size: 12px;
    color: #28a745;
    animation: pulse 2s ease-in-out infinite;
}

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

.status-indicator.exercising i {
    color: #ffc107;
}

.status-indicator.measuring i {
    color: #17a2b8;
}

/* Experiment Steps */
.experiment-steps {
    display: grid;
    gap: 25px;
}

.step-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-card.active {
    background: white;
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.step-number {
    display: inline-block;
    background: #667eea;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 15px;
}

.step-card h3 {
    font-size: 20px;
    color: #495057;
    margin-bottom: 10px;
}

.step-card p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-action:active {
    transform: translateY(0);
}

.btn-action.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

.result-box {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #155724;
    font-weight: 600;
}

.result-box i {
    font-size: 20px;
    color: #28a745;
}

/* Exercise Progress */
.exercise-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
}

.exercise-counter {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

/* Recovery Buttons */
.recovery-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.recovery-results {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

/* Chart */
.chart-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
}

.chart-container h3 {
    color: #495057;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#pulseChart {
    max-height: 400px !important;
}

/* Protocol Form */
.protocol-form {
    display: grid;
    gap: 25px;
}

.form-group {
    display: grid;
    gap: 10px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group label i {
    color: #667eea;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

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

.form-textarea {
    resize: vertical;
    line-height: 1.6;
}

/* Results Table */
.results-table {
    overflow-x: auto;
}

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

.results-table th,
.results-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.results-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.results-table tbody tr:hover {
    background: #f8f9fa;
}

.results-table td {
    color: #495057;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Footer */
.lab-footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    border-top: 2px solid #e9ecef;
}

.lab-footer i {
    color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
    }

    body {
        padding: 0;
    }

    .tab-content {
        padding: 20px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-content h1 {
        font-size: 24px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 15px 10px;
    }

    .tab-btn span {
        display: none;
    }

    .student-visual {
        flex-direction: column;
        gap: 30px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }

    .recovery-buttons {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .tabs,
    .action-buttons,
    .lab-footer {
        display: none;
    }

    .container {
        box-shadow: none;
    }

    .card {
        page-break-inside: avoid;
    }
}
