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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

h1 {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.nav-links {
    text-align: center;
    margin-bottom: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 10px 25px;
    border-radius: 25px;
    margin: 0 10px;
    transition: all 0.3s;
    display: inline-block;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.stats-info {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #666;
    font-weight: bold;
}

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.child-card {
    position: relative;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.health-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 50px 50px 0;
    z-index: 10;
    cursor: help;
}

.health-indicator.green {
    border-color: transparent #2ecc71 transparent transparent;
}

.health-indicator.blue {
    border-color: transparent #3498db transparent transparent;
}

.health-indicator.orange {
    border-color: transparent #e67e22 transparent transparent;
}

.health-indicator.red {
    border-color: transparent #e74c3c transparent transparent;
}

.health-indicator.blinking {
    border-color: transparent #2ecc71 transparent transparent;
    animation: blink 0.5s ease-in-out infinite alternate;
}

@keyframes blink {
    0% { border-color: transparent #2ecc71 transparent transparent; }
    100% { border-color: transparent #e74c3c transparent transparent; }
}

.health-text {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 11;
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
    cursor: help;
}

.child-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.child-info {
    padding: 12px;
}

.child-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.child-details {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.siblings-preview {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.siblings-title {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
    font-weight: normal;
}

.siblings-mini {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.sibling-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 60px;
    transition: transform 0.2s;
}

.sibling-mini:hover {
    transform: scale(1.05);
}

.sibling-mini-img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #667eea;
}

.sibling-mini-name {
    font-size: 10px;
    color: #555;
    text-align: center;
    margin-top: 3px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sibling-mini-age {
    font-size: 9px;
    color: #999;
}

.view-button {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 13px;
    transition: opacity 0.3s;
}

.view-button:hover {
    opacity: 0.8;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 10px 18px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: bold;
}

.pagination a:hover {
    background: #667eea;
    color: white;
}

.pagination .active {
    background: #667eea;
    color: white;
}

.no-results {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 15px;
    color: #999;
}

@media (max-width: 768px) {
    .children-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    .child-photo {
        height: 160px;
    }
    .health-indicator {
        border-width: 0 40px 40px 0;
    }
    .health-text {
        top: 6px;
        right: 10px;
        font-size: 10px;
    }
}