:root {
    --primary-color: #e63946; /* SOS Red */
    --secondary-color: #1d3557; /* Deep Blue */
    --accent-color: #a8dadc;
    --background-color: #f1faee;
    --text-color: #1d3557;
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f8f9fa;
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 50px;
}

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

/* Header & Photo */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.profile-photo-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: var(--shadow);
}

.sos-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.4);
    animation: pulse-sos 2s infinite;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Info Cards */
.info-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-card h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
}

.info-card h2 i {
    color: var(--primary-color);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item.full {
    grid-column: span 2;
}

.info-item label {
    font-size: 0.75rem;
    color: #adb5bd;
    text-transform: uppercase;
    font-weight: 600;
}

.info-item span {
    font-weight: 400;
}

/* Medical Styling */
.medical {
    border-left: 5px solid var(--primary-color);
}

.blood-type {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Contact Styling */
.emergency {
    background: linear-gradient(135deg, #1d3557 0%, #457b9d 100%);
}

.emergency h2, .emergency label, .emergency span {
    color: white;
}

.phone-link {
    color: #a8dadc !important;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    display: block;
    margin-top: 5px;
}

/* SOS Button */
.btn-sos-trigger {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 18px;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.btn-sos-trigger:active {
    transform: scale(0.98);
}

/* Animations */
@keyframes pulse-sos {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Status Modal */
.sos-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 0 100px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 1000;
    width: 80%;
    max-width: 300px;
}

.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error page */
.error-container {
    text-align: center;
    padding: 50px 20px;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}
