:root {
    --bg: #0b0e14;
    --card-bg: #161b22;
    --text: #c9d1d9;
    --accent: #58a6ff;
    --matern: #f85149;
    --patern: #1f6feb;
    --line: #30363d;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 900px;
}

header h1 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--line);
    padding-bottom: 20px;
}

.main-layout {
    display: flex;
    gap: 100px;
    justify-content: center;
}

.side-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.generation {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.gen-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #484f58;
    margin-bottom: 8px;
    letter-spacing: 1.5px;
}

.couple {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px;
    border-radius: 15px;
    border: 1px solid var(--line);
}

.card {
    background: var(--card-bg);
    width: 140px;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

/* Casetele goale cu "?" */
.card.empty {
    border: 1px dashed #333;
    background: transparent;
    color: #333;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px; /* Aliniat cu înălțimea medie a celorlalte */
    cursor: default;
}

/* EFECT CLICK FIX */
.card.active {
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.3);
    transform: translateY(-5px);
}

.card.matern { border-top: 3px solid var(--matern); }
.card.patern { border-top: 3px solid var(--patern); }
.card.me { border: 2px solid var(--accent); }

.role {
    font-size: 0.7rem;
    color: #8b949e;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.traits { font-size: 0.75rem; }
.trait { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; }

/* Conectori */
.line-v { width: 1px; height: 30px; background: var(--line); }
.join-area { display: flex; justify-content: center; width: 100%; margin: 10px 0; }
.join-connector { height: 40px; }

.dot { width: 10px; height: 10px; border-radius: 50%; }
.green { background: #3fb950; }
.blue { background: #388bfd; }
.brown { background: #d29922; }
.black { background: #f0f6fc; }

@media (max-width: 900px) {
    .main-layout { gap: 20px; }
    .card { width: 120px; }
}