/* --------------------------------------------------------------------------
   Moderne Frontend-Gestaltung & Stammbaum-Layout
   -------------------------------------------------------------------------- */
:root {
    --stammbaum-primary: #1f4c8f;
    --stammbaum-secondary: #3f8cff;
    --stammbaum-accent: #7c3aed;
    --stammbaum-success: #12b886;
    --stammbaum-warning: #f59f00;
    --stammbaum-danger: #f03e3e;
    --stammbaum-surface: #ffffff;
    --stammbaum-surface-muted: #f5f7fb;
    --stammbaum-border: #e2e8f0;
    --stammbaum-muted: #6c7785;
    --stammbaum-text: #1f2937;
}

.stammbaum-container {
    position: relative;
    padding: 32px;
    margin: 30px auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, #f1f5ff 100%);
    border-radius: 28px;
    box-shadow: 0 24px 65px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.stammbaum-container.modern-style::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(63, 140, 255, 0.18), transparent 55%),
                radial-gradient(circle at bottom left, rgba(124, 58, 237, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.stammbaum-container.modern-style > * {
    position: relative;
    z-index: 1;
}

.stammbaum-container .stammbaum-loading,
.modern-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    color: var(--stammbaum-muted);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.loading-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(63, 140, 255, 0.18);
    border-top-color: var(--stammbaum-secondary);
    border-radius: 50%;
    animation: stammbaum-spin 0.8s linear infinite;
}

@keyframes stammbaum-spin {
    to { transform: rotate(360deg); }
}

.stammbaum-profile-modern {
    position: relative;
    max-width: 1180px;
    margin: 40px auto;
    background: linear-gradient(160deg, rgba(34, 113, 177, 0.08) 0%, rgba(255, 255, 255, 0.92) 50%, #ffffff 100%);
    border-radius: 32px;
    box-shadow: 0 35px 90px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    color: var(--stammbaum-text);
}

.profile-hero {
    position: relative;
    overflow: hidden;
}

.profile-hero .hero-background {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(63, 140, 255, 0.25), transparent 55%),
                radial-gradient(circle at 90% 0%, rgba(124, 58, 237, 0.18), transparent 65%),
                linear-gradient(135deg, rgba(34, 113, 177, 0.12), rgba(19, 94, 150, 0.08));
    filter: blur(0.5px);
}

.hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 45px;
    padding: 60px 70px;
    z-index: 1;
}

.profile-main-image {
    position: relative;
    width: 260px;
    height: 260px;
    flex-shrink: 0;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(34, 113, 177, 0.35);
}

.profile-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-main-image .image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 56px;
    background: linear-gradient(135deg, #93c5fd, #c084fc);
    color: #fff;
}

.gender-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    backdrop-filter: blur(6px);
    background: rgba(31, 76, 143, 0.85);
    color: #fff;
    box-shadow: 0 12px 30px rgba(31, 76, 143, 0.4);
}

.gender-badge.female {
    background: rgba(236, 72, 153, 0.85);
}

.profile-hero-info {
    display: flex;
    flex-direction: column;
    gap: 22px;
    color: inherit;
}

.profile-name {
    margin: 0;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 0.6px;
}

.profile-registration {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(34, 113, 177, 0.12);
    color: var(--stammbaum-primary);
    font-weight: 600;
    font-size: 15px;
}

.profile-registration .reg-label {
    opacity: 0.7;
}

.profile-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-info-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 22px rgba(31, 76, 143, 0.12);
    font-weight: 600;
    color: var(--stammbaum-text);
}

.quick-info-item.external-indicator {
    background: rgba(240, 149, 12, 0.15);
    color: #c05621;
}

.profile-navigation {
    position: relative;
    margin: 0 40px;
    margin-top: -35px;
    padding: 12px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    z-index: 2;
}

.profile-navigation::-webkit-scrollbar {
    height: 6px;
}

.profile-navigation::-webkit-scrollbar-thumb {
    background: rgba(31, 76, 143, 0.25);
    border-radius: 999px;
}

.profile-navigation .nav-tab {
    flex: none;
    border: none;
    background: rgba(31, 76, 143, 0.08);
    color: var(--stammbaum-primary);
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-navigation .nav-tab:hover {
    background: rgba(31, 76, 143, 0.18);
}

.profile-navigation .nav-tab.active {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(34, 113, 177, 0.28);
}

.profile-content {
    margin: 40px 40px 30px 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

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

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.info-card {
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.95) 0%, rgba(236, 242, 255, 0.92) 100%);
    border: 1px solid rgba(31, 76, 143, 0.1);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.info-card h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 14px;
    border: 1px solid rgba(31, 76, 143, 0.05);
}

.info-row .label {
    font-weight: 600;
    color: var(--stammbaum-muted);
}

.info-row .value {
    font-weight: 700;
    color: var(--stammbaum-text);
}

.empty-state {
    text-align: center;
    padding: 80px 40px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(244, 245, 250, 0.9), rgba(255, 255, 255, 0.95));
    border: 1px dashed rgba(31, 76, 143, 0.15);
    color: var(--stammbaum-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.profile-footer {
    display: flex;
    justify-content: center;
    padding: 0 0 40px 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    background: rgba(31, 76, 143, 0.1);
    color: var(--stammbaum-primary);
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: rgba(31, 76, 143, 0.2);
}

.modern-pedigree-container {
    position: relative;
    min-height: 320px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(246, 248, 255, 0.9) 0%, #ffffff 100%);
    border: 1px solid rgba(31, 76, 143, 0.08);
}

@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 45px;
    }

    .profile-main-image {
        width: 220px;
        height: 220px;
    }

    .profile-navigation {
        margin: 0 30px;
        margin-top: -30px;
    }

    .profile-content {
        margin: 30px;
    }
}

@media (max-width: 720px) {
    .hero-content {
        align-items: center;
        text-align: center;
    }

    .profile-hero-info {
        align-items: center;
    }

    .profile-quick-info {
        justify-content: center;
    }

    .profile-navigation {
        margin: 0 20px;
        margin-top: -25px;
    }

    .profile-content {
        margin: 25px 20px 30px 20px;
        padding: 30px 24px;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

.stammbaum-tree {
    position: relative;
    min-height: 360px;
    padding: 12px 12px 48px;
}

.ultra-modern-pedigree {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.pedigree-main-animal {
    display: flex;
    justify-content: center;
}

.main-animal-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    padding: 32px;
    background: var(--stammbaum-surface);
    border-radius: 26px;
    border: 1px solid rgba(31, 76, 143, 0.08);
    box-shadow: 0 25px 55px rgba(31, 76, 143, 0.18);
    position: relative;
    overflow: hidden;
}

.main-animal-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(63, 140, 255, 0.14), transparent 45%, rgba(124, 58, 237, 0.1));
    pointer-events: none;
}

.animal-image-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.animal-image {
    width: 210px;
    height: 210px;
    object-fit: cover;
    border-radius: 22px;
    border: 5px solid #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
}

.animal-image-placeholder {
    width: 210px;
    height: 210px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(63, 140, 255, 0.28), rgba(124, 58, 237, 0.22));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.animal-image-placeholder.main {
    position: relative;
}

.gender-indicator {
    position: absolute;
    bottom: 18px;
    right: 18px;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(63, 140, 255, 0.95), rgba(124, 58, 237, 0.9));
    box-shadow: 0 12px 25px rgba(63, 140, 255, 0.35);
    letter-spacing: 0.3px;
}

.gender-indicator.female {
    background: linear-gradient(135deg, #ef5da8, #bc4bff);
}

.gender-indicator.male {
    background: linear-gradient(135deg, #2563eb, #1f4c8f);
}

.animal-info-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1;
}

.animal-name {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    color: var(--stammbaum-text);
    letter-spacing: 0.4px;
}

.registration-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--stammbaum-secondary);
    background: rgba(63, 140, 255, 0.12);
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
}

.animal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 18px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(241, 245, 255, 0.9);
    border-radius: 14px;
    color: var(--stammbaum-text);
    font-weight: 600;
}

.detail-icon {
    font-size: 16px;
}

.genetics-preview {
    margin-top: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(63, 140, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.genetics-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--stammbaum-muted);
}

.genetics-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genetics-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(31, 76, 143, 0.1);
    color: var(--stammbaum-primary);
}

.genetics-badge.good {
    background: rgba(18, 184, 134, 0.14);
    color: var(--stammbaum-success);
}

.genetics-badge.carrier {
    background: rgba(245, 159, 0, 0.16);
    color: var(--stammbaum-warning);
}

.genetics-badge.affected {
    background: rgba(240, 62, 62, 0.14);
    color: var(--stammbaum-danger);
}

.pedigree-action-buttons button {
    font-family: inherit;
    font-weight: 700;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pedigree-action-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(34, 113, 177, 0.35);
}

.pedigree-parents-level {
    padding: 0 40px;
}

.parents-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.parent-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 18px;
    padding: 24px;
    background: var(--stammbaum-surface);
    border-radius: 22px;
    border: 1px solid rgba(31, 76, 143, 0.1);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.parent-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}

.parent-card.empty {
    opacity: 0.75;
    background: rgba(241, 245, 255, 0.7);
    box-shadow: none;
}

.parent-image {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(63, 140, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--stammbaum-primary);
}

.parent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.parent-image-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: rgba(63, 140, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--stammbaum-primary);
}

.parent-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.parent-type {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--stammbaum-muted);
}

.parent-name {
    font-size: 18px;
    margin: 0;
    color: var(--stammbaum-text);
}

.parent-reg,
.parent-breed,
.parent-birth {
    font-size: 14px;
    color: var(--stammbaum-muted);
}

.parent-genetics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.mini-genetics {
    padding: 4px 10px;
    background: rgba(63, 140, 255, 0.1);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: var(--stammbaum-secondary);
}

.external-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(240, 62, 62, 0.15);
    color: var(--stammbaum-danger);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.profile-hint {
    font-weight: 700;
}

.pedigree-grandparents-level {
    padding: 0 8px 24px;
}

.grandparents-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 26px;
}

.pedigree-great-grandparents-level {
    padding: 0 8px 24px;
}

.great-grandparents-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 26px;
}

.pedigree-great-grandparents-level .grandparent-group-title {
    color: #5a2ca0;
}

.grandparent-group {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 76, 143, 0.12);
    border-radius: 22px;
    padding: 20px 22px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.grandparent-group-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--stammbaum-primary);
    margin: 0 0 16px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.grandparent-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(241, 245, 255, 0.85), rgba(255, 255, 255, 0.95));
    border: 1px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.grandparent-card + .grandparent-card {
    margin-top: 12px;
}

.grandparent-card:hover {
    transform: translateY(-4px);
    border-color: rgba(63, 140, 255, 0.35);
    box-shadow: 0 20px 40px rgba(63, 140, 255, 0.16);
}

.grandparent-card.empty {
    opacity: 0.7;
    background: rgba(241, 245, 255, 0.6);
    box-shadow: none;
}

.grandparent-image {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(63, 140, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--stammbaum-primary);
}

.grandparent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grandparent-image-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(63, 140, 255, 0.14);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--stammbaum-primary);
}

.grandparent-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grandparent-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--stammbaum-text);
}

.grandparent-name.empty {
    color: var(--stammbaum-muted);
}

.grandparent-reg,
.grandparent-breed,
.grandparent-birth {
    font-size: 13px;
    color: var(--stammbaum-muted);
}

.grandparent-genetics {
    margin-top: 6px;
}

.mini-genetics-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: rgba(63, 140, 255, 0.12);
    color: var(--stammbaum-secondary);
}

.mini-genetics-badge.good { color: var(--stammbaum-success); background: rgba(18, 184, 134, 0.16); }
.mini-genetics-badge.carrier { color: var(--stammbaum-warning); background: rgba(245, 159, 0, 0.16); }
.mini-genetics-badge.affected { color: var(--stammbaum-danger); background: rgba(240, 62, 62, 0.16); }

.empty-card {
    padding: 24px;
    background: rgba(241, 245, 255, 0.8);
    border-radius: 20px;
    text-align: center;
    border: 1px dashed rgba(31, 76, 143, 0.25);
    color: var(--stammbaum-muted);
    font-weight: 600;
}

.empty-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(63, 140, 255, 0.16);
    color: var(--stammbaum-primary);
    font-size: 22px;
    font-weight: 700;
}

.clickable-animal {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-animal:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(63, 140, 255, 0.16);
}

svg.pedigree-line {
    pointer-events: none;
}

svg.pedigree-line path {
    stroke: rgba(31, 76, 143, 0.3);
    stroke-width: 2;
    stroke-linecap: round;
}

.stammbaum-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    z-index: 9999;
    padding: 40px 16px;
    overflow-y: auto;
    backdrop-filter: blur(6px);
}

.stammbaum-modal-content {
    position: relative;
    margin: auto;
    max-width: 980px;
    width: 100%;
    background: var(--stammbaum-surface);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
    padding: 36px 40px;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(63, 140, 255, 0.15);
    color: var(--stammbaum-primary);
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: rgba(63, 140, 255, 0.28);
}

.modal-header {
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(31, 76, 143, 0.12);
    padding-bottom: 18px;
}

.modal-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--stammbaum-text);
}

.modal-body #stammbaum-container {
    min-height: 360px;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 24px;
    border-radius: 22px;
    background: rgba(240, 62, 62, 0.08);
    border: 1px solid rgba(240, 62, 62, 0.22);
    color: var(--stammbaum-danger);
    font-weight: 600;
    text-align: center;
}

.error-icon {
    font-size: 32px;
}

.retry-button {
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, rgba(63, 140, 255, 0.95), rgba(124, 58, 237, 0.9));
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(63, 140, 255, 0.25);
}

/* Galerie-Karten */
.stammbaum-galerie {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stammbaum-card {
    position: relative;
    background: var(--stammbaum-surface);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(31, 76, 143, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stammbaum-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 32px 70px rgba(63, 140, 255, 0.22);
}

.card-image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.stammbaum-card:hover .card-image {
    transform: scale(1.05);
}

.card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 240px;
    background: linear-gradient(135deg, rgba(63, 140, 255, 0.3), rgba(124, 58, 237, 0.24));
    color: #fff;
    font-size: 48px;
}

.card-badges {
    position: absolute;
    top: 18px;
    left: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.18);
    font-size: 13px;
}

.badge-gender.male { background: linear-gradient(135deg, #2563eb, #1f4c8f); }
.badge-gender.female { background: linear-gradient(135deg, #ef5da8, #bc4bff); }
.badge-achievement { background: linear-gradient(135deg, #f59f00, #f3722c); }

.card-content {
    padding: 26px 28px 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--stammbaum-text);
}

.card-registration {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(63, 140, 255, 0.12);
    color: var(--stammbaum-secondary);
    font-weight: 700;
    font-size: 13px;
}

.card-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px 18px;
}

.info-item {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--stammbaum-muted);
    font-weight: 600;
}

.card-genetics {
    padding: 12px;
    border-radius: 16px;
    background: rgba(63, 140, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.genetics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.genetics-item {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(31, 76, 143, 0.1);
    color: var(--stammbaum-primary);
    font-size: 12px;
    font-weight: 600;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn-details,
.btn-pedigree {
    flex: 1;
    text-align: center;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-details {
    background: rgba(31, 76, 143, 0.08);
    color: var(--stammbaum-primary);
}

.btn-pedigree {
    border: none;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(63, 140, 255, 0.95), rgba(124, 58, 237, 0.9));
    box-shadow: 0 16px 35px rgba(63, 140, 255, 0.24);
}

.btn-details:hover,
.btn-pedigree:hover {
    transform: translateY(-3px);
}

/* Profil Tabs Pedigree Container */
.pedigree-container.modern-pedigree-container {
    position: relative;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), #f3f5fb);
    box-shadow: inset 0 0 0 1px rgba(31, 76, 143, 0.08), 0 25px 60px rgba(15, 23, 42, 0.1);
}

.pedigree-container .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    font-weight: 600;
    color: var(--stammbaum-muted);
}

@media (max-width: 1024px) {
    .main-animal-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .animal-details {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .parents-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stammbaum-container {
        padding: 24px;
        border-radius: 22px;
    }

    .main-animal-card {
        padding: 24px;
        border-radius: 22px;
    }

    .animal-image,
    .animal-image-placeholder {
        width: 180px;
        height: 180px;
    }

    .grandparents-container,
    .great-grandparents-container {
        grid-template-columns: 1fr;
    }

    .stammbaum-card {
        border-radius: 22px;
    }

    .stammbaum-modal-content {
        padding: 28px 24px;
        border-radius: 22px;
    }
}

@media (max-width: 520px) {
    .stammbaum-container {
        padding: 20px;
    }

    .animal-details {
        grid-template-columns: 1fr;
    }

    .parent-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .parent-image,
    .grandparent-image {
        margin: 0 auto;
    }

    .card-actions {
        flex-direction: column;
    }

    .modal-close {
        top: 12px;
        right: 12px;
    }
}


/* Erweiterte Profil-Styles für verbesserte Darstellung */

/* Schnellübersicht Styles */
.genetics-quick-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.genetics-quick-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e0e0e6;
    transition: all 0.3s ease;
}

.genetics-quick-item:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 113, 177, 0.15);
}

.genetics-quick-item .test-type {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.genetics-quick-item .test-result {
    font-weight: 800;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.genetics-quick-item .test-result.frei,
.genetics-quick-item .test-result.a1,
.genetics-quick-item .test-result.a,
.genetics-quick-item .test-result.normal {
    background: #d4f4dd;
    color: #00a32a;
}

.genetics-quick-item .test-result.träger,
.genetics-quick-item .test-result.carrier,
.genetics-quick-item .test-result.b1,
.genetics-quick-item .test-result.b {
    background: #fff3e0;
    color: #f57c00;
}

.genetics-quick-item .test-result.betroffen,
.genetics-quick-item .test-result.affected,
.genetics-quick-item .test-result.c {
    background: #ffd4d4;
    color: #dc3232;
}

.genetics-more,
.achievements-more {
    padding: 12px 16px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    text-align: center;
    color: #1976d2;
    font-weight: 600;
    font-size: 14px;
    border: 2px dashed #2271b1;
}

.achievements-quick-overview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.achievement-quick-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
    border-radius: 12px;
    border-left: 4px solid #ff9800;
    transition: all 0.3s ease;
}

.achievement-quick-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.2);
}

.achievement-quick-item .achievement-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.achievement-quick-item .achievement-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    background: #f0f0f4;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Externe Tier Info Card */
.external-info-card {
    border-left: 6px solid #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

.external-info-content {
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e6;
    line-height: 1.6;
    color: #555;
}

/* Detaillierte Untersuchungen */
.genetics-full-list {
    max-width: 1200px;
    margin: 0 auto;
}

.genetics-header {
    margin-bottom: 40px;
    text-align: center;
}

.genetics-header h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.genetics-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.genetics-grid-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.genetics-card-detailed {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.4s ease;
    position: relative;
}

.genetics-card-detailed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    border-radius: 20px 20px 0 0;
}

.genetics-card-detailed:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border-color: #2271b1;
}

.genetics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.genetics-test-type {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.genetics-date {
    font-size: 14px;
    color: #666;
    background: #f0f0f4;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.genetics-result-large {
    font-size: 36px;
    font-weight: 900;
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.genetics-result-large.frei,
.genetics-result-large.a1,
.genetics-result-large.a,
.genetics-result-large.normal {
    background: linear-gradient(135deg, #d4f4dd 0%, #e8f5e8 100%);
    color: #00a32a;
    text-shadow: 0 2px 10px rgba(0, 163, 42, 0.3);
}

.genetics-result-large.träger,
.genetics-result-large.carrier,
.genetics-result-large.b1,
.genetics-result-large.b {
    background: linear-gradient(135deg, #fff3e0 0%, #fff8f0 100%);
    color: #f57c00;
    text-shadow: 0 2px 10px rgba(255, 152, 0, 0.3);
}

.genetics-result-large.betroffen,
.genetics-result-large.affected,
.genetics-result-large.c {
    background: linear-gradient(135deg, #ffd4d4 0%, #ffe8e8 100%);
    color: #dc3232;
    text-shadow: 0 2px 10px rgba(220, 50, 50, 0.3);
}

.genetics-certificate {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #2271b1;
}

.cert-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.cert-number {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #2271b1;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
}

.genetics-notes {
    padding: 15px;
    background: #f0f0f4;
    border-radius: 12px;
    color: #555;
    font-style: italic;
    line-height: 1.5;
}

/* Detaillierte Erfolge */
.achievements-full-list {
    max-width: 1000px;
    margin: 0 auto;
}

.achievements-header {
    margin-bottom: 40px;
    text-align: center;
}

.achievements-header h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achievements-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.achievements-timeline-detailed {
    position: relative;
    padding-left: 80px;
}

.achievements-timeline-detailed::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-radius: 2px;
}

.achievement-item-detailed {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease;
}

.achievement-item-detailed::before {
    content: '';
    position: absolute;
    left: -60px;
    top: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border: 4px solid white;
    box-shadow: 0 0 0 4px #ff9800;
    z-index: 2;
}

.achievement-date-badge {
    flex-shrink: 0;
    text-align: center;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
    min-width: 80px;
}

.achievement-day {
    display: block;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.achievement-month-year {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-content-detailed {
    flex-grow: 1;
    background: white;
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.achievement-content-detailed:hover {
    border-color: #ff9800;
    transform: translateX(10px) translateY(-5px);
    box-shadow: 0 15px 50px rgba(255, 152, 0, 0.2);
}

.achievement-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 20px;
}

.achievement-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.achievement-type-badge {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-type-badge.show {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}

.achievement-type-badge.competition {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #c2185b;
}

.achievement-type-badge.title {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #f57c00;
}

.achievement-type-badge.other {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
}

.achievement-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #666;
    font-size: 16px;
}

.location-icon {
    font-size: 18px;
}

.location-text {
    font-weight: 600;
}

.achievement-description {
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #555;
    line-height: 1.6;
    border-left: 4px solid #ff9800;
}

/* Detaillierte Abstammung */
.ancestry-overview {
    max-width: 1200px;
    margin: 0 auto;
}

.ancestry-section {
    margin-bottom: 50px;
}

.ancestry-section-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 30px 0;
    color: #1a1a1a;
    text-align: center;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.parents-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.parent-card-detailed {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    transition: all 0.4s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.parent-card-detailed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
}

.parent-card-detailed.mother::before {
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
}

.parent-card-detailed.father::before {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.parent-card-detailed:hover:not(.empty) {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border-color: #2271b1;
}

.parent-card-detailed.empty {
    opacity: 0.6;
    border-style: dashed;
    cursor: default;
}

.parent-type-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    color: white;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
}

.parent-card-detailed.mother .parent-type-badge {
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
}

.parent-card-detailed.father .parent-type-badge {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.parent-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: 0 auto 20px;
}

.parent-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f4 0%, #e0e0e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #999;
    margin: 0 auto 20px;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.parent-placeholder.empty {
    border-style: dashed;
    border-color: #ccc;
}

.parent-name {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #1a1a1a;
}

.parent-name.empty {
    color: #999;
    font-style: italic;
    font-weight: 500;
}

.parent-reg,
.parent-breed,
.parent-birth {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.parent-reg {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
}

.external-badge-small {
    background: #ff9800;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
}

/* Großeltern Detailansicht */
.grandparents-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.great-grandparents-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.grandparents-group {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid #e0e0e6;
}

.great-grandparents-detailed .grandparents-group.maternal {
    border-left-color: #8e24aa;
}

.great-grandparents-detailed .grandparents-group.paternal {
    border-left-color: #3949ab;
}

.grandparents-group.maternal {
    border-left: 6px solid #E91E63;
}

.grandparents-group.paternal {
    border-left: 6px solid #2196F3;
}

.grandparents-group-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 25px 0;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.great-grandparents-detailed .grandparents-group-title {
    color: #5a2ca0;
}

.grandparents-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grandparent-card-detailed {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    cursor: pointer;
}

.grandparent-card-detailed:hover:not(.empty) {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #2271b1;
}

.grandparent-card-detailed.empty {
    opacity: 0.6;
    border-style: dashed;
    border-color: #ccc;
    cursor: default;
}

.grandparent-type {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.grandparent-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    margin: 0 auto 15px;
}

.grandparent-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f4 0%, #e0e0e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #999;
    margin: 0 auto 15px;
    border: 4px solid white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.grandparent-placeholder.empty {
    border-style: dashed;
    border-color: #ccc;
}

.grandparent-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.grandparent-name.empty {
    color: #999;
    font-style: italic;
    font-weight: 500;
}

.grandparent-reg {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #666;
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 8px;
}

.external-badge-mini {
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

/* Nachkommen detailliert */
.offspring-gallery-detailed {
    max-width: 1200px;
    margin: 0 auto;
}

.offspring-section {
    margin-bottom: 48px;
}

.offspring-subsection-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    text-align: left;
}

.offspring-name-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.offspring-name-link:hover,
.offspring-name-link:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

.offspring-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    color: #6b7280;
    font-size: 14px;
}

.offspring-meta-separator {
    color: #cbd5f5;
    font-weight: 700;
    margin: 0 2px;
}

.offspring-breed {
    margin-top: 6px;
    font-size: 14px;
    color: #4b5563;
}

.offspring-profile-cell {
    text-align: center;
}

.offspring-profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(46, 125, 50, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.offspring-profile-link:hover,
.offspring-profile-link:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(46, 125, 50, 0.35);
}

.no-offspring-message {
    text-align: center;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(46, 125, 50, 0.12) 100%);
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    color: #4b5563;
}

.no-offspring-message p {
    margin: 0;
}

.no-offspring-hint {
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
}

.offspring-header {
    margin-bottom: 40px;
    text-align: center;
}

.offspring-header h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.offspring-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.offspring-table-wrapper {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
    overflow-x: auto;
}

.offspring-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.15);
}

.offspring-table thead th {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 13px;
    font-weight: 700;
    padding: 14px 18px;
}

.offspring-table tbody tr {
    transition: background 0.2s ease;
}

.offspring-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.offspring-table tbody tr:hover {
    background: #edf7f1;
}

.offspring-table td {
    padding: 18px;
    font-size: 15px;
    color: #374151;
    vertical-align: middle;
}

.offspring-photo {
    width: 140px;
    text-align: center;
}

.offspring-photo img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.25);
    border: 4px solid rgba(76, 175, 80, 0.2);
}

.offspring-photo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 16px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 40px;
    border: 4px dashed rgba(100, 116, 139, 0.4);
}

.offspring-table td:nth-child(2) {
    font-weight: 600;
    font-size: 17px;
    color: #1f2937;
}

.offspring-table td:last-child {
    color: #4b5563;
}

.offspring-table td span.age-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(46, 125, 50, 0.15);
    color: #2e7d32;
    font-size: 13px;
    font-weight: 600;
}

.offspring-table td .birth-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
}

.offspring-table td .note-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(76, 175, 80, 0.12);
    color: #2f855a;
    font-size: 13px;
}

.offspring-table td.empty-value {
    color: #9ca3af;
    font-style: italic;
}

/* Responsive Design für neue Elemente */
@media (max-width: 1200px) {
    .offspring-table-wrapper {
        padding: 20px;
    }

    .offspring-table td,
    .offspring-table thead th {
        padding: 12px 14px;
    }

    .genetics-grid-detailed {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .parents-detailed {
        gap: 30px;
    }
    
    .grandparents-detailed,
    .great-grandparents-detailed {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .offspring-table-wrapper {
        padding: 16px;
    }

    .offspring-photo {
        width: 110px;
    }

    .offspring-photo img,
    .offspring-photo-placeholder {
        width: 100px;
        height: 100px;
    }

    .offspring-table td,
    .offspring-table thead th {
        padding: 10px 12px;
        font-size: 14px;
    }

    .genetics-quick-overview {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .genetics-grid-detailed {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .parents-detailed {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .grandparents-detailed,
    .great-grandparents-detailed {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .grandparents-pair {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .achievement-item-detailed {
        padding-left: 0;
        flex-direction: column;
        gap: 15px;
    }
    
    .achievements-timeline-detailed {
        padding-left: 0;
    }
    
    .achievements-timeline-detailed::before {
        display: none;
    }
    
    .achievement-item-detailed::before {
        display: none;
    }
    
    .achievement-date-badge {
        align-self: flex-start;
    }
    
    .achievement-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .genetics-header h3,
    .achievements-header h3,
    .offspring-header h3 {
        font-size: 24px;
    }
    
    .genetics-card-detailed,
    .achievement-content-detailed,
    .parent-card-detailed {
        padding: 20px;
    }
    
    .parent-image,
    .parent-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .grandparent-image,
    .grandparent-placeholder {
        width: 70px;
        height: 70px;
    }
}