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

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

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.patient-info {
    display: flex;
    gap: 30px;
    color: #555;
    font-weight: 500;
}

/* Main Content Layout */
.content-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Patient Area */
.patient-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.bed-container {
    position: relative;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border: 3px solid #dee2e6;
    border-radius: 20px;
    padding: 40px;
    min-height: 600px;
}

/* Patient Body */
.patient-body {
    position: relative;
    width: 100%;
    height: 500px;
    margin: 0 auto;
}

/* Observation Points */
.observation-point {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.observation-point:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
}

/* Body Parts */
.head {
    width: 80px;
    height: 90px;
    background: #fdbcb4;
    border-radius: 50% 50% 45% 45%;
    border: 2px solid #e67e22;
}

.chest {
    width: 120px;
    height: 100px;
    background: #fdbcb4;
    border-radius: 20px;
    border: 2px solid #e67e22;
}

.abdomen {
    width: 100px;
    height: 80px;
    background: #fdbcb4;
    border-radius: 15px;
    border: 2px solid #e67e22;
}

.arm {
    width: 60px;
    height: 120px;
    background: #fdbcb4;
    border-radius: 30px;
    border: 2px solid #e67e22;
}

.pelvis {
    width: 90px;
    height: 60px;
    background: #fdbcb4;
    border-radius: 15px;
    border: 2px solid #e67e22;
}

.legs {
    width: 80px;
    height: 150px;
    background: #fdbcb4;
    border-radius: 40px;
    border: 2px solid #e67e22;
}

/* Positioning */
.head-area { top: 20px; left: 50%; transform: translateX(-50%); }
.chest-area { top: 120px; left: 50%; transform: translateX(-50%); }
.abdomen-area { top: 230px; left: 50%; transform: translateX(-50%); }
.arm-left { top: 130px; left: 20%; }
.arm-right { top: 130px; right: 20%; }
.pelvis-area { top: 320px; left: 50%; transform: translateX(-50%); }
.legs { top: 390px; left: 50%; transform: translateX(-50%); }

/* Medical Devices */
.medical-device {
    position: absolute;
    z-index: 10;
}

.endotracheal-tube {
    width: 4px;
    height: 40px;
    background: #3498db;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nasal-catheter {
    width: 2px;
    height: 30px;
    background: #e74c3c;
    top: 20px;
    left: 60%;
    border-radius: 1px;
}

.chest-tube {
    width: 6px;
    height: 60px;
    background: #f39c12;
    top: 30px;
    right: 10px;
    border-radius: 3px;
}

.iv-line {
    width: 3px;
    height: 80px;
    background: #27ae60;
    top: 20px;
    left: 10px;
    border-radius: 2px;
}

.central-line {
    width: 4px;
    height: 60px;
    background: #8e44ad;
    top: 20px;
    right: 10px;
    border-radius: 2px;
}

.urinary-catheter {
    width: 3px;
    height: 40px;
    background: #f1c40f;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.ecg-electrodes {
    width: 8px;
    height: 8px;
    background: #2c3e50;
    border-radius: 50%;
    top: 20px;
    left: 20px;
}

.ecg-electrodes::before,
.ecg-electrodes::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #2c3e50;
    border-radius: 50%;
}

.ecg-electrodes::before {
    top: 30px;
    left: 20px;
}

.ecg-electrodes::after {
    top: 0;
    left: 40px;
}

/* Monitoring Panel */
.monitoring-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.monitor {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.monitor-header {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

/* Vital Signs */
.vital-display {
    display: grid;
    gap: 10px;
}

.vital-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.vital-label {
    font-weight: 500;
    color: #555;
}

.vital-value {
    font-size: 20px;
    font-weight: bold;
    color: #27ae60;
}

.vital-unit {
    color: #777;
    font-size: 14px;
}

/* ECG Monitor */
.ecg-display {
    width: 100%;
    height: 150px;
    background: #000;
    border-radius: 5px;
}

/* Ventilator */
.ventilator-display {
    display: grid;
    gap: 10px;
}

.vent-param {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    font-family: monospace;
}

/* Assessment Panel */
.assessment-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.assessment-panel h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 5px;
}

.assessment-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.assessment-category h4 {
    color: #555;
    margin-bottom: 10px;
    font-size: 16px;
}

.assessment-category label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.assessment-category label:hover {
    background-color: #f8f9fa;
}

.assessment-category input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-container {
        grid-template-columns: 1fr;
    }
    
    .patient-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .assessment-checklist {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }
    
    .patient-body {
        height: 400px;
    }
    
    .bed-container {
        padding: 20px;
        min-height: 450px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* Animation for medical devices */
@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.medical-device {
    animation: pulse 2s infinite;
}

/* Hover effects for observation points */
.observation-point::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid transparent;
    border-radius: inherit;
    transition: border-color 0.3s ease;
}

.observation-point:hover::before {
    border-color: #3498db;
    animation: borderPulse 1s infinite;
}

@keyframes borderPulse {
    0%, 100% { border-color: #3498db; }
    50% { border-color: #52c3f1; }
}