/* Base styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #ecf0f1;
    --alert-color: #e74c3c;
    --background-color: #1a1a1a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    direction: rtl;
}

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

h1 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 40px;
}

/* Camera feed styling */
.camera-feed {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
}

#video {
    width: 100%;
    height: auto;
    background: #000;
}

#startBtn {
    display: block;
    width: 200px;
    margin: 20px auto;
    padding: 15px 30px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
}

#startBtn:hover {
    background-color: #2980b9;
}

/* Vital signs grid */
.vitals-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.vital-card {
    background: var(--primary-color);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.vital-card:hover {
    transform: translateY(-5px);
}

.vital-card h2 {
    margin: 0 0 15px 0;
    font-size: 1.4em;
    color: var(--secondary-color);
}

.value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
    color: var(--text-color);
}

.unit {
    font-size: 1.2em;
    color: #95a5a6;
}

/* Status bar */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

/* Alert states */
.alert {
    animation: pulse 1.5s infinite;
    border: 2px solid var(--alert-color);
}

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

@media (max-width: 768px) {
    .vitals-container {
        grid-template-columns: 1fr;
    }
    
    .value {
        font-size: 2em;
    }
}