:root {
    --primary-color: #007bff;
    --secondary-color: #4a5568;
    --background-gradient-start: #e0c3fc;
    --background-gradient-end: #8ec5fc;
    --card-background: #ffffff;
    --text-color: #2d3748;
    --light-text-color: #718096;
    --accent-color: #dc3545; /* Red for emergency */
    --font-family: 'Poppins', sans-serif;
    --border-radius: 16px;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.04);
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--background-gradient-start) 0%, var(--background-gradient-end) 100%);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: var(--text-color);
}

.container {
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.app-header {
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.app-header .fa-shield-heart {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: var(--box-shadow);
}

.app-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.app-header p {
    margin: 0;
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
}

.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 1rem;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: fadeIn 0.5s ease-in-out;
}

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

.hidden {
    display: none;
}

/* Scanner Styles */
#qr-reader {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #eee;
}

#qr-reader-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--light-text-color);
}

/* Result Styles */
.profile-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1.5rem;
}

.profile-icon {
    font-size: 4.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

#full_name {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
}

#address {
    margin: 0;
    font-size: 1rem;
    color: var(--light-text-color);
}

.details-section h3 {
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    padding-bottom: 5px;
}

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

.info-item {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

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

.info-item .label {
    font-size: 0.8rem;
    color: var(--light-text-color);
    text-transform: uppercase;
    font-weight: 600;
}

.info-item .value {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-color);
}

/* Buttons */
.call-btn, .rescan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 40px);
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    margin: 10px 0 0 0;
}

.call-btn {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(220, 53, 69, 0.39);
    margin-top: 1.5rem;
}

.call-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(220, 53, 69, 0.5);
}

.call-btn i {
    margin-right: 10px;
}

.rescan-btn {
    background-color: var(--secondary-color);
    color: white;
}

.rescan-btn:hover {
    background-color: #2d3748;
}

footer {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}