* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1200px;
    width: 100%;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#person-select {
    padding: 10px 15px;
    border: 2px solid #b8daff;
    border-radius: 8px;
    font-size: 16px;
    min-width: 250px;
}

#generate-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#generate-btn:hover {
    transform: translateY(-2px);
}

.tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 400px;
}

.row {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    width: 100%;
    position: relative;
}

.parents-row {
    margin-bottom: 60px;
}

.couple-row {
    margin-bottom: 70px;
    height: 120px;
    position: relative;
}

.member {
    background: white;
    border: 2px solid #b8daff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    width: 160px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: absolute;
}

.member:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.parents-row .member {
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #dfe9f3 100%);
    border-color: #89aad3;
}

.main-person {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-color: #0099e6;
    color: white;
    z-index: 2;
}

.main-person h3, .main-person p {
    color: white;
}

.spouse {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    border-color: #ff6b6b;
}

.children-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    position: relative;
}

.children-row .member {
    position: relative;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0fbff 100%);
    border-color: #85d0ff;
    width: 140px;
}

.member h3 {
    font-size: 15px;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.member p {
    font-size: 13px;
    color: #7f8c8d;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #7f8c8d;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    #person-select {
        width: 100%;
        min-width: auto;
    }
    
    .member {
        width: 130px;
        padding: 12px;
    }
    
    .children-row .member {
        width: 120px;
    }
}
/* Style pour le cas sans parents */
.couple-row.without-parents {
    justify-content: center;
    gap: 60px;
    height: auto;
}

.couple-row.without-parents .member {
    position: relative;
    left: auto !important;
    transform: none !important;
}

/* Ajustements responsive pour le cas sans parents */
@media (max-width: 768px) {
    .couple-row.without-parents {
        flex-direction: column;
        gap: 30px;
    }
}
.person-id-display {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    border: 2px solid #4facfe;
}