* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.top-header img {
    width: 100%;
    height: auto;
    display: block;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    direction: rtl; /* keeps Kurdish/Arabic text correct */
}

.container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
}

h1 {
    color: #c0392b;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1em;
}

select {
    width: 100%;
    padding: 20px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 1.2em;
    transition: all 0.3s;
    background: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.btn-search {
    width: 100%;
    padding: 15px;
    background: #c0392b;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-search:hover {
    background: #a93226;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(192, 57, 43, 0.3);
}

.btn-search:active {
    transform: translateY(0);
}

/* ===========================
   CENTER THE RESULT CARD
=========================== */
.results {
    margin-top: 30px;
    display: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.results.show {
    display: flex;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 5px solid #c0392b;
    width: 100%;
    max-width: 350px;
    text-align: center; /* centers text inside card */
}

.result-card h3 {
    margin-bottom: 15px; /* space below donor name */
}

.result-info {
    display: flex;
    flex-direction: column; /* stack items vertically */
    align-items: center;    /* center them horizontally */
    gap: 10px;              /* space between blood type, phone, whatsapp */
}

.blood-badge {
    background: #c0392b;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.2em;
}

/* Clickable Phone */
.phone, .whatsapp {
    font-size: 1.2em;
    font-weight: 600;
}

.phone a, .whatsapp a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 700;
}

.phone a:hover, .whatsapp a:hover {
    text-decoration: underline;
}

/* WhatsApp Icon */
.whatsapp i {
    margin-left: 5px;
    color: #25D366;
}

/* No results */
.no-results {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-size: 1.1em;
}

.blood-icon {
    text-align: center;
    font-size: 3em;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .result-info {
        flex-direction: column;
        align-items: center; /* keep centered even on small screens */
    }
}
