:root {
    --bg-dark: #0a1628;
    --bg-darker: #050d1a;
    --bg-card: #0f1e36;
    --bg-card-hover: #152a4a;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --teal: #00c9a7;
    --teal-light: #00e5c3;
    --cyan: #00d9ff;
    --deep-blue: #1e3a5f;
    --royal-blue: #2563eb;
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
    --gradient-teal: linear-gradient(135deg, #00c9a7 0%, #00b4d8 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    --gradient-blue: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    --gradient-pink: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    --gradient-orange: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-hero: linear-gradient(135deg, #050d1a 0%, #0a1628 25%, #1e3a5f 50%, #0a1628 75%, #050d1a 100%);
    --gradient-premium: linear-gradient(135deg, #d4af37 0%, #00c9a7 50%, #2563eb 100%);
    --gradient-animated: linear-gradient(270deg, #0a1628, #1e3a5f, #0f2847, #0a1628);
    --shadow-glow-teal: 0 0 30px rgba(0, 201, 167, 0.5);
    --shadow-glow-gold: 0 0 30px rgba(212, 175, 55, 0.5);
    --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.5);
    --shadow-glow-blue: 0 0 30px rgba(37, 99, 235, 0.5);
    --shadow-glow-pink: 0 0 30px rgba(236, 72, 153, 0.5);
    --shadow-glow-cyan: 0 0 30px rgba(0, 217, 255, 0.5);
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.gene-body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
}

.gene-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    animation: slideDown 0.6s ease-out;
}

.gene-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.gene-logo:hover {
    transform: scale(1.02);
}

.gene-logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 201, 167, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(3deg); }
}

.gene-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gene-language-toggle {
    display: flex;
    background: var(--bg-card);
    border-radius: 30px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.gene-language-toggle:hover {
    border-color: rgba(0, 201, 167, 0.3);
}

.gene-lang-btn {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 25px;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.gene-lang-btn.active {
    background: var(--gradient-teal);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 201, 167, 0.3);
}

.gene-lang-btn:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.gene-user-name {
    color: var(--text-secondary);
    font-size: 0.95rem;
    animation: fadeInText 0.8s ease-out 0.3s both;
}

@keyframes fadeInText {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.gene-main {
    flex: 1;
}

.gene-message {
    padding: 18px 24px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    animation: slideDown 0.4s ease, messageGlow 2s ease-in-out infinite;
    font-weight: 500;
}

.gene-message-success {
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.15) 0%, rgba(0, 180, 216, 0.15) 100%);
    border: 1px solid rgba(0, 201, 167, 0.4);
    color: #00e5c3;
}

.gene-message-error {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(244, 114, 182, 0.15) 100%);
    border: 1px solid rgba(236, 72, 153, 0.4);
    color: #ff6ba8;
}

@keyframes messageGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 201, 167, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 201, 167, 0.4); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.gene-hero {
    padding: 40px 40px 50px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1628 0%, #0f1e36 100%);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: rgbBoxGlow 12s ease-in-out infinite;
}

@keyframes rgbBoxGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 201, 167, 0.4),
                    0 0 40px rgba(0, 201, 167, 0.2),
                    0 0 60px rgba(0, 201, 167, 0.1);
    }
    16% { 
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.4),
                    0 0 40px rgba(0, 217, 255, 0.2),
                    0 0 60px rgba(0, 217, 255, 0.1);
    }
    33% { 
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.4),
                    0 0 40px rgba(37, 99, 235, 0.2),
                    0 0 60px rgba(37, 99, 235, 0.1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.4),
                    0 0 40px rgba(139, 92, 246, 0.2),
                    0 0 60px rgba(139, 92, 246, 0.1);
    }
    66% { 
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.4),
                    0 0 40px rgba(236, 72, 153, 0.2),
                    0 0 60px rgba(236, 72, 153, 0.1);
    }
    83% { 
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.4),
                    0 0 40px rgba(212, 175, 55, 0.2),
                    0 0 60px rgba(212, 175, 55, 0.1);
    }
}


@media (min-width: 1200px) {
    .gene-hero {
        padding: 50px 80px 60px;
    }
}


.gene-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.gene-hero-text {
    animation: heroTextSlide 0.8s ease-out;
    max-width: 600px;
}

@keyframes heroTextSlide {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gene-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gene-hero-highlight {
    background: var(--gradient-teal);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out infinite;
}

@keyframes shimmerText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gene-hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gene-hero-tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 35px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    animation: fadeInUp 0.8s ease-out 0.3s both, taglineGlow 3s ease-in-out infinite;
}

@keyframes taglineGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(212, 175, 55, 0.3); }
    50% { text-shadow: 0 0 40px rgba(212, 175, 55, 0.6), 0 0 60px rgba(212, 175, 55, 0.3); }
}

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

.gene-hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.gene-btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 600;
}

.gene-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.gene-btn-icon {
    font-size: 1.3rem;
    transition: var(--transition);
}

.gene-btn-primary {
    background: var(--gradient-gold);
    background-size: 200% 200%;
    color: #0a1628;
    border: none;
    box-shadow: 0 4px 25px rgba(212, 175, 55, 0.4);
    animation: pulseGold 2s ease-in-out infinite;
}

@keyframes pulseGold {
    0%, 100% { 
        box-shadow: 0 4px 25px rgba(212, 175, 55, 0.4);
    }
    50% { 
        box-shadow: 0 6px 35px rgba(212, 175, 55, 0.6), 0 0 50px rgba(212, 175, 55, 0.3);
    }
}

.gene-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px rgba(212, 175, 55, 0.6);
    background-position: 100% 50%;
}

.gene-btn-primary:hover .gene-btn-icon {
    transform: scale(1.2) rotate(10deg);
}

.gene-btn-secondary {
    background: transparent;
    color: var(--teal);
    border: 2px solid var(--teal);
    position: relative;
}

.gene-btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(0, 201, 167, 0.1);
    transition: var(--transition);
    z-index: -1;
}

.gene-btn-secondary:hover::before {
    width: 100%;
}

.gene-btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-teal);
    border-color: var(--teal-light);
}

.gene-hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.gene-hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f1e36;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    animation: rgbBoxGlowSmall 12s ease-in-out infinite;
}

@keyframes rgbBoxGlowSmall {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 201, 167, 0.3), 0 0 20px rgba(0, 201, 167, 0.15); }
    16% { box-shadow: 0 0 10px rgba(0, 217, 255, 0.3), 0 0 20px rgba(0, 217, 255, 0.15); }
    33% { box-shadow: 0 0 10px rgba(37, 99, 235, 0.3), 0 0 20px rgba(37, 99, 235, 0.15); }
    50% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.3), 0 0 20px rgba(139, 92, 246, 0.15); }
    66% { box-shadow: 0 0 10px rgba(236, 72, 153, 0.3), 0 0 20px rgba(236, 72, 153, 0.15); }
    83% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.3), 0 0 20px rgba(212, 175, 55, 0.15); }
}

.gene-hero-feature.gene-visible {
    animation: featureBadgeIn 0.6s ease-out forwards;
}

.gene-hero-feature:nth-child(1).gene-visible { animation-delay: 0.1s; }
.gene-hero-feature:nth-child(2).gene-visible { animation-delay: 0.2s; }
.gene-hero-feature:nth-child(3).gene-visible { animation-delay: 0.3s; }

@keyframes featureBadgeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gene-hero-feature:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(0, 201, 167, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gene-feature-icon {
    font-size: 1.3rem;
    transition: var(--transition);
}

.gene-hero-feature:hover .gene-feature-icon {
    transform: scale(1.2);
}

/* Animated Tree Illustration */
.gene-hero-tree {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: treeSlideIn 1s ease-out 0.3s both;
    will-change: transform;
}

@keyframes treeSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.gene-tree-illustration {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    position: relative;
}

.gene-tree-level {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.gene-tree-ancestor {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.gene-ancestor-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--bg-card);
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    animation: ancestorFloat 4s ease-in-out infinite;
}

.gene-tree-level-1 .gene-ancestor-photo { animation-delay: 0s; }
.gene-tree-level-2 .gene-tree-ancestor:nth-child(1) .gene-ancestor-photo { animation-delay: 0.5s; }
.gene-tree-level-2 .gene-tree-ancestor:nth-child(2) .gene-ancestor-photo { animation-delay: 1s; }
.gene-tree-level-3 .gene-tree-ancestor:nth-child(1) .gene-ancestor-photo { animation-delay: 1.5s; }
.gene-tree-level-3 .gene-tree-ancestor:nth-child(2) .gene-ancestor-photo { animation-delay: 2s; }
.gene-tree-level-4 .gene-ancestor-photo { animation-delay: 2.5s; }

@keyframes ancestorFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.gene-ancestor-grand .gene-ancestor-photo {
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--gradient-purple) border-box;
}

.gene-ancestor-great .gene-ancestor-photo {
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--gradient-orange) border-box;
}

.gene-ancestor-parent .gene-ancestor-photo {
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--gradient-blue) border-box;
}

.gene-ancestor-child .gene-ancestor-photo {
    width: 80px;
    height: 80px;
    font-size: 2.2rem;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--gradient-teal) border-box;
    border-width: 4px;
    animation: ancestorFloat 4s ease-in-out infinite, childPulse 3s ease-in-out infinite;
}

@keyframes childPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 201, 167, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(0, 201, 167, 0); }
}

.gene-ancestor-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.gene-ancestor-grand .gene-ancestor-glow {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
}

.gene-ancestor-great .gene-ancestor-glow {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, transparent 70%);
}

.gene-ancestor-parent .gene-ancestor-glow {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
}

.gene-ancestor-child .gene-ancestor-glow {
    background: radial-gradient(circle, rgba(0, 201, 167, 0.5) 0%, transparent 70%);
}

.gene-tree-ancestor:hover .gene-ancestor-glow {
    opacity: 1;
    animation: pulse 1.5s ease-in-out infinite;
}

.gene-tree-ancestor:hover .gene-ancestor-photo {
    transform: scale(1.15);
    animation: none;
}

.gene-tree-ancestor::after {
    content: attr(data-label);
    position: absolute;
    bottom: -25px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    transition: var(--transition);
}

.gene-tree-ancestor:hover::after {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.3; }
}

.gene-tree-connector {
    width: 3px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(139, 92, 246, 0.5), rgba(0, 201, 167, 0.5));
    margin: 10px 0;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.gene-tree-connector::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: connectorFlow 2s ease-in-out infinite;
}

@keyframes connectorFlow {
    0% { top: -100%; }
    100% { top: 200%; }
}

.gene-tree-connector-split {
    position: relative;
    width: 120px;
    height: 40px;
    background: transparent;
}

.gene-tree-connector-split::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 20px;
    background: rgba(139, 92, 246, 0.5);
    transform: translateX(-50%);
}

.gene-tree-connector-split::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.5), rgba(139, 92, 246, 0.5), rgba(59, 130, 246, 0.5));
    background-size: 200% 100%;
    animation: connectorGradient 3s ease-in-out infinite;
}

@keyframes connectorGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Gallery Section */
.gene-gallery {
    padding: 60px 0;
    position: relative;
}

.gene-gallery-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 40px;
    background: var(--gradient-purple);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out infinite;
}

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

.gene-gallery-card {
    background: #0f1e36;
    border-radius: var(--border-radius-lg);
    padding: 35px 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: rgbBoxGlowMedium 12s ease-in-out infinite;
}

@keyframes rgbBoxGlowMedium {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 201, 167, 0.35), 0 0 30px rgba(0, 201, 167, 0.15); }
    16% { box-shadow: 0 0 15px rgba(0, 217, 255, 0.35), 0 0 30px rgba(0, 217, 255, 0.15); }
    33% { box-shadow: 0 0 15px rgba(37, 99, 235, 0.35), 0 0 30px rgba(37, 99, 235, 0.15); }
    50% { box-shadow: 0 0 15px rgba(139, 92, 246, 0.35), 0 0 30px rgba(139, 92, 246, 0.15); }
    66% { box-shadow: 0 0 15px rgba(236, 72, 153, 0.35), 0 0 30px rgba(236, 72, 153, 0.15); }
    83% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.35), 0 0 30px rgba(212, 175, 55, 0.15); }
}

.gene-gallery-card.gene-visible {
    animation: cardFadeIn 0.6s ease-out forwards;
}

.gene-gallery-card:nth-child(1).gene-visible { animation-delay: 0.1s; }
.gene-gallery-card:nth-child(2).gene-visible { animation-delay: 0.2s; }
.gene-gallery-card:nth-child(3).gene-visible { animation-delay: 0.3s; }
.gene-gallery-card:nth-child(4).gene-visible { animation-delay: 0.4s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gene-gallery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-teal);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.gene-gallery-card:hover::before {
    transform: scaleX(1);
}

.gene-gallery-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 201, 167, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.gene-gallery-card:hover::after {
    opacity: 1;
}

.gene-gallery-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 201, 167, 0.15);
    border-color: rgba(0, 201, 167, 0.3);
}

.gene-gallery-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    transition: var(--transition);
}

.gene-gallery-card:hover .gene-gallery-icon {
    transform: scale(1.15) rotate(5deg);
}

.gene-gallery-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    transition: var(--transition);
}

.gene-gallery-card:hover h4 {
    color: var(--teal);
}

.gene-gallery-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Auth Section */
.gene-auth-section {
    padding: 40px 0;
}

.gene-auth-container {
    max-width: 480px;
    margin: 0 auto;
    background: #0f1e36;
    border-radius: var(--border-radius-xl);
    padding: 45px 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    animation: authContainerIn 0.6s ease-out, rgbBoxGlow 12s ease-in-out infinite;
}

@keyframes authContainerIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientSlide {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gene-auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.gene-auth-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0, 201, 167, 0.4));
    animation: authIconPulse 2s ease-in-out infinite;
}

@keyframes authIconPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(0, 201, 167, 0.4)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 30px rgba(0, 201, 167, 0.6)); }
}

.gene-auth-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

.gene-auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 5px;
    position: relative;
}

.gene-auth-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50px;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.gene-auth-tab.active {
    background: var(--gradient-teal);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 201, 167, 0.4);
}

.gene-auth-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

.gene-auth-form {
    display: none;
}

.gene-auth-form.active {
    display: block;
    animation: formFadeIn 0.4s ease;
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gene-auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gene-auth-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Forgot Password Link */
.gene-forgot-password-link {
    text-align: center;
    margin-top: 15px;
}

.gene-forgot-password-link a {
    color: var(--teal);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.gene-forgot-password-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-teal);
    transition: var(--transition);
}

.gene-forgot-password-link a:hover::after {
    width: 100%;
}

.gene-forgot-password-link a:hover {
    color: var(--teal-light);
}

/* Auth Switch Link */
.gene-auth-switch {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gene-auth-switch span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.gene-auth-switch a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
    transition: var(--transition);
    position: relative;
}

.gene-auth-switch a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: var(--transition);
}

.gene-auth-switch a:hover::after {
    width: 100%;
}

.gene-auth-switch a:hover {
    color: var(--gold-light);
}

/* Modal Description */
.gene-modal-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Form Styles */
.gene-form-group {
    margin-bottom: 22px;
}

.gene-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.gene-label-icon {
    font-size: 1.1rem;
    transition: var(--transition);
}

.gene-form-group:focus-within label {
    color: var(--teal);
}

.gene-form-group:focus-within .gene-label-icon {
    transform: scale(1.1);
}

.gene-form-group input,
.gene-form-group select,
.gene-form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.gene-form-group input::placeholder,
.gene-form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.gene-form-group input:focus,
.gene-form-group select:focus,
.gene-form-group textarea:focus {
    outline: none;
    border-color: #00c9a7;
    box-shadow: 0 0 0 4px rgba(0, 201, 167, 0.15), 0 0 20px rgba(0, 201, 167, 0.1);
    background: rgba(0, 201, 167, 0.05);
    transform: translateY(-2px);
}

.gene-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.gene-privacy-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(139, 92, 246, 0.1);
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 22px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: var(--transition);
}

.gene-privacy-notice:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.15);
}

.gene-privacy-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.gene-privacy-notice p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.gene-recaptcha {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Buttons */
.gene-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Ripple Effect */
.gene-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.gene-btn-primary {
    background: var(--gradient-teal);
    background-size: 200% 200%;
    color: white;
}

.gene-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-teal);
    background-position: 100% 50%;
}

.gene-btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.gene-btn-glow:hover::before {
    left: 100%;
}

.gene-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gene-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.gene-btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.gene-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.gene-btn-full {
    width: 100%;
}

.gene-btn-icon-left,
.gene-btn-icon-right {
    font-size: 1.1rem;
    transition: var(--transition);
}

.gene-btn:hover .gene-btn-icon-left {
    transform: translateX(-3px);
}

.gene-btn:hover .gene-btn-icon-right {
    transform: translateX(3px);
}

.gene-btn-gradient-teal {
    background: var(--gradient-teal);
    background-size: 200% 200%;
    color: white;
}

.gene-btn-gradient-teal:hover {
    box-shadow: var(--shadow-glow-teal);
    transform: translateY(-3px);
    background-position: 100% 50%;
}

.gene-btn-gradient-purple {
    background: var(--gradient-purple);
    background-size: 200% 200%;
    color: white;
}

.gene-btn-gradient-purple:hover {
    box-shadow: var(--shadow-glow-purple);
    transform: translateY(-3px);
    background-position: 100% 50%;
}

.gene-btn-gradient-blue {
    background: var(--gradient-blue);
    background-size: 200% 200%;
    color: white;
}

.gene-btn-gradient-blue:hover {
    box-shadow: var(--shadow-glow-blue);
    transform: translateY(-3px);
    background-position: 100% 50%;
}

.gene-btn-gradient-pink {
    background: var(--gradient-pink);
    background-size: 200% 200%;
    color: white;
}

.gene-btn-gradient-pink:hover {
    box-shadow: var(--shadow-glow-pink);
    transform: translateY(-3px);
    background-position: 100% 50%;
}

.gene-btn-gradient-gold {
    background: linear-gradient(135deg, #d4a574 0%, #b8860b 50%, #daa520 100%);
    background-size: 200% 200%;
    color: white;
}

.gene-btn-gradient-gold:hover {
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.4);
    transform: translateY(-3px);
    background-position: 100% 50%;
}

.gene-btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
}

.gene-btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.15) rotate(5deg);
}

/* Dashboard */
.gene-dashboard {
    animation: fadeIn 0.4s ease;
}

.gene-welcome-banner {
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: var(--border-radius-lg);
    padding: 35px 40px;
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 201, 167, 0.2);
    position: relative;
    overflow: hidden;
    animation: bannerSlideIn 0.6s ease-out;
}

@keyframes bannerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gene-welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    animation: bannerShine 3s ease-in-out infinite;
}

@keyframes bannerShine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.gene-welcome-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.gene-welcome-content p {
    color: var(--text-secondary);
}

.gene-welcome-decoration {
    font-size: 4rem;
    opacity: 0.3;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    animation: decorFloat 4s ease-in-out infinite;
}

@keyframes decorFloat {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-60%) rotate(10deg); }
}

.gene-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.gene-stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
    animation: statCardIn 0.5s ease-out backwards;
}

.gene-stat-card:nth-child(1) { animation-delay: 0.1s; }
.gene-stat-card:nth-child(2) { animation-delay: 0.2s; }
.gene-stat-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes statCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gene-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 201, 167, 0.2);
}

.gene-stat-icon {
    font-size: 2.5rem;
    transition: var(--transition);
}

.gene-stat-card:hover .gene-stat-icon {
    transform: scale(1.1);
}

.gene-stat-info {
    display: flex;
    flex-direction: column;
}

.gene-stat-number {
    font-size: 2.2rem;
    font-weight: 800;
}

.gene-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.gene-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 45px;
}

.gene-section {
    margin-bottom: 45px;
}

.gene-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.gene-section-icon {
    font-size: 1.4rem;
    transition: var(--transition);
}

.gene-section:hover .gene-section-icon {
    transform: rotate(10deg) scale(1.1);
}

.gene-empty {
    text-align: center;
    padding: 50px 30px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.gene-empty:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.gene-empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
    animation: emptyIconFloat 3s ease-in-out infinite;
}

@keyframes emptyIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.gene-empty p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Person Cards */
.gene-persons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gene-person-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gene-person-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-teal);
}

.gene-person-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 201, 167, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-slow);
    pointer-events: none;
}

.gene-person-card:hover::after {
    opacity: 1;
}

.gene-person-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-glow-teal), 0 25px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 201, 167, 0.4);
}

.gene-person-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 4px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                var(--gradient-teal) border-box;
    transition: var(--transition);
}

.gene-person-card:hover .gene-person-photo {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 201, 167, 0.4);
}

.gene-person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gene-person-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-purple);
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
}

.gene-person-info h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    font-weight: 600;
    transition: var(--transition);
}

.gene-person-card:hover .gene-person-info h3 {
    color: var(--teal);
}

.gene-person-years {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.gene-person-gender {
    color: #00c9a7;
    font-size: 0.9rem;
    text-transform: capitalize;
    font-weight: 500;
}

.gene-person-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    position: relative;
    z-index: 10;
}

.gene-person-actions .gene-btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
}

.gene-person-actions .gene-btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 201, 167, 0.5);
    transform: scale(1.1);
}

.gene-person-actions .gene-edit-person:hover {
    border-color: rgba(0, 201, 167, 0.6);
    box-shadow: 0 0 15px rgba(0, 201, 167, 0.3);
}

.gene-person-actions .gene-delete-person:hover {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.2);
}

/* Relationships */
.gene-relationships-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gene-relationship-item {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gene-relationship-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.gene-rel-person {
    font-weight: 600;
    font-size: 1.05rem;
}

.gene-rel-type {
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    text-transform: capitalize;
    font-weight: 600;
    transition: var(--transition);
}

.gene-relationship-item:hover .gene-rel-type {
    transform: scale(1.05);
}

.gene-rel-parent {
    background: rgba(139, 92, 246, 0.2);
    color: #a855f7;
}

.gene-rel-child {
    background: rgba(0, 201, 167, 0.2);
    color: #00c9a7;
}

.gene-rel-spouse {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}

.gene-relationship-item .gene-btn-icon {
    margin-left: auto;
}

/* Modals */
.gene-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.gene-modal.active {
    display: flex;
    animation: modalBackdropIn 0.3s ease;
}

@keyframes modalBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gene-modal.active .gene-modal-content {
    animation: modalContentIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalContentIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gene-modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.gene-modal-large .gene-modal-content {
    max-width: 950px;
}

.gene-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gene-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.gene-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gene-modal-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.gene-modal form {
    padding: 30px;
}

.gene-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 25px;
}

/* Photo Upload */
.gene-photo-upload {
    display: flex;
    align-items: center;
    gap: 18px;
}

.gene-photo-preview {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition);
}

.gene-photo-preview:hover {
    border-color: rgba(0, 201, 167, 0.5);
    background: rgba(0, 201, 167, 0.05);
}

.gene-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tree Container - Glassmorphism Design */
.gene-tree-container {
    padding: 40px;
    min-height: 450px;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(15, 30, 54, 0.8) 0%, rgba(10, 22, 40, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-xl);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gene-tree-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-xl);
    padding: 2px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3), rgba(0, 201, 167, 0.3));
    background-size: 300% 300%;
    animation: borderGradientFlow 6s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes borderGradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.gene-tree-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
    border-radius: var(--border-radius-xl);
}

/* Base Node Styles */
.gene-tree-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: transparent;
    margin: 12px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    opacity: 0;
    animation: nodeAppear 0.6s ease-out forwards;
}

@keyframes nodeAppear {
    0% { opacity: 0; transform: scale(0.5) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.gene-tree-node:hover {
    transform: scale(1.15);
    z-index: 10;
}

/* Node Glow Effect */
.gene-tree-node-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.gene-tree-node:hover .gene-tree-node-glow {
    opacity: 1;
}

/* Node Circle */
.gene-tree-node-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: var(--bg-darker);
    padding: 4px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 4px solid transparent;
}

.gene-tree-node-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gene-tree-node-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-card) 100%);
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    border-radius: 50%;
}

/* Color 0: Gold/Orange */
.gene-tree-node-color-0 .gene-tree-node-circle {
    background: linear-gradient(var(--bg-darker), var(--bg-darker)) padding-box,
                linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%) border-box;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4), 0 0 40px rgba(212, 175, 55, 0.15);
    animation: pulseGoldNode 3s ease-in-out infinite;
}

.gene-tree-node-color-0 .gene-tree-node-glow {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
}

.gene-tree-node-color-0:hover .gene-tree-node-circle {
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.7), 0 0 70px rgba(212, 175, 55, 0.3);
}

@keyframes pulseGoldNode {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.4), 0 0 40px rgba(212, 175, 55, 0.15); }
    50% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.6), 0 0 50px rgba(212, 175, 55, 0.25); }
}

/* Color 1: Purple */
.gene-tree-node-color-1 .gene-tree-node-circle {
    background: linear-gradient(var(--bg-darker), var(--bg-darker)) padding-box,
                linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #8b5cf6 100%) border-box;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4), 0 0 40px rgba(139, 92, 246, 0.15);
    animation: pulsePurpleNode 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

.gene-tree-node-color-1 .gene-tree-node-glow {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
}

.gene-tree-node-color-1:hover .gene-tree-node-circle {
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.7), 0 0 70px rgba(139, 92, 246, 0.3);
}

@keyframes pulsePurpleNode {
    0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.4), 0 0 40px rgba(139, 92, 246, 0.15); }
    50% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.6), 0 0 50px rgba(139, 92, 246, 0.25); }
}

/* Color 2: Blue */
.gene-tree-node-color-2 .gene-tree-node-circle {
    background: linear-gradient(var(--bg-darker), var(--bg-darker)) padding-box,
                linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #3b82f6 100%) border-box;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.15);
    animation: pulseBlueNode 3s ease-in-out infinite;
    animation-delay: 1s;
}

.gene-tree-node-color-2 .gene-tree-node-glow {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
}

.gene-tree-node-color-2:hover .gene-tree-node-circle {
    box-shadow: 0 0 35px rgba(59, 130, 246, 0.7), 0 0 70px rgba(59, 130, 246, 0.3);
}

@keyframes pulseBlueNode {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.15); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), 0 0 50px rgba(59, 130, 246, 0.25); }
}

/* Color 3: Teal */
.gene-tree-node-color-3 .gene-tree-node-circle {
    background: linear-gradient(var(--bg-darker), var(--bg-darker)) padding-box,
                linear-gradient(135deg, #00c9a7 0%, #00e5c3 50%, #00c9a7 100%) border-box;
    box-shadow: 0 0 20px rgba(0, 201, 167, 0.4), 0 0 40px rgba(0, 201, 167, 0.15);
    animation: pulseTealNode 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

.gene-tree-node-color-3 .gene-tree-node-glow {
    background: radial-gradient(circle, rgba(0, 201, 167, 0.4) 0%, transparent 70%);
}

.gene-tree-node-color-3:hover .gene-tree-node-circle {
    box-shadow: 0 0 35px rgba(0, 201, 167, 0.7), 0 0 70px rgba(0, 201, 167, 0.3);
}

@keyframes pulseTealNode {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 201, 167, 0.4), 0 0 40px rgba(0, 201, 167, 0.15); }
    50% { box-shadow: 0 0 30px rgba(0, 201, 167, 0.6), 0 0 50px rgba(0, 201, 167, 0.25); }
}

/* Node Name Label */
.gene-tree-node-name {
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 10px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.85;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.gene-tree-node:hover .gene-tree-node-name {
    opacity: 1;
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Orbital Layout for Flat Trees */
.gene-tree-orbital {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gene-tree-orbital-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.gene-tree-orbital-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 0;
    animation: orbitalNodeAppear 0.8s ease-out forwards;
}

@keyframes orbitalNodeAppear {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    60% { transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.gene-tree-orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(rgba(15, 30, 54, 0), rgba(15, 30, 54, 0)) padding-box,
                linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3), rgba(0, 201, 167, 0.3)) border-box;
    animation: ringRotate 20s linear infinite, ringPulse 4s ease-in-out infinite;
    z-index: 1;
}

.gene-tree-orbital-ring-inner {
    animation: ringRotate 15s linear infinite reverse, ringPulse 3s ease-in-out infinite;
}

.gene-tree-orbital-ring-outer {
    animation: ringRotate 25s linear infinite, ringPulse 5s ease-in-out infinite;
}

@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.gene-tree-visual {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 25px;
}

.gene-tree-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px;
    font-size: 1.1rem;
}

/* Footer */
.gene-footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 50px;
    animation: footerFadeIn 0.6s ease-out;
}

@keyframes footerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gene-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gene-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.gene-footer-brand:hover {
    color: var(--text-primary);
}

.gene-footer-icon {
    font-size: 1.5rem;
    transition: var(--transition);
}

.gene-footer-brand:hover .gene-footer-icon {
    transform: scale(1.1) rotate(10deg);
}

.gene-footer-credit {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.gene-credit-link {
    color: #00c9a7;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.gene-credit-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-teal);
    transition: var(--transition);
}

.gene-credit-link:hover::after {
    width: 100%;
}

.gene-credit-link:hover {
    color: #00e5c3;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll triggered visibility */
.gene-animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.gene-animate-on-scroll.gene-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .gene-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .gene-hero-title {
        font-size: 2.2rem;
    }
    
    .gene-hero-features {
        justify-content: center;
    }
    
    .gene-hero-tree {
        order: -1;
        margin-bottom: 30px;
    }

    .gene-hero-cta {
        justify-content: center;
    }
    
    .gene-gallery {
        padding: 40px 20px;
    }
    
    .gene-gallery-grid {
        gap: 15px;
    }
    
    .gene-gallery-card {
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    .gene-header {
        flex-direction: column;
        text-align: center;
        padding: 12px 15px;
        margin-bottom: 15px;
    }
    
    .gene-logo {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .gene-logo-icon {
        font-size: 1.4rem;
    }
    
    .gene-header-actions {
        justify-content: center;
    }
    
    .gene-hero {
        padding: 15px 15px 25px;
    }
    
    .gene-hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .gene-hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 10px;
    }
    
    .gene-hero-tagline {
        font-size: 0.8rem;
        margin-bottom: 15px;
    }
    
    .gene-hero-tree {
        display: none;
    }
    
    .gene-hero-cta {
        flex-direction: column;
        gap: 8px;
    }
    
    .gene-hero-cta .gene-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .gene-hero-features {
        display: none;
    }
    
    .gene-gallery {
        display: none;
    }
    
    .gene-auth-section {
        padding: 20px 10px;
    }
    
    .gene-auth-container {
        padding: 20px 15px;
    }
    
    .gene-auth-header {
        margin-bottom: 15px;
    }
    
    .gene-auth-header h2 {
        font-size: 1.1rem;
    }
    
    .gene-auth-icon {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .gene-form-group {
        margin-bottom: 14px;
    }
    
    .gene-form-group label {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    
    .gene-form-group input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .gene-btn-full {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .gene-forgot-password-link {
        margin-top: 10px;
    }
    
    .gene-forgot-password-link a {
        font-size: 0.85rem;
    }
    
    .gene-auth-switch {
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .gene-auth-switch span,
    .gene-auth-switch a {
        font-size: 0.85rem;
    }
    
    .gene-auth-footer {
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .gene-auth-footer p {
        font-size: 0.75rem;
    }
    
    .gene-form-row {
        grid-template-columns: 1fr;
    }
    
    .gene-action-buttons {
        justify-content: center;
    }
    
    .gene-action-buttons .gene-btn {
        flex: 1;
        min-width: 140px;
    }
    
    .gene-welcome-banner {
        padding: 25px;
    }
    
    .gene-welcome-decoration {
        display: none;
    }
    
    .gene-privacy-notice {
        padding: 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gene-header {
        padding: 10px 10px;
        margin-bottom: 10px;
    }
    
    .gene-logo {
        font-size: 1rem;
        gap: 6px;
    }
    
    .gene-logo-icon {
        font-size: 1.2rem;
    }
    
    .gene-hero {
        padding: 8px 10px 12px;
    }
    
    .gene-hero-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .gene-hero-subtitle {
        display: none;
    }
    
    .gene-hero-tagline {
        display: none;
    }
    
    .gene-hero-cta {
        display: none;
    }
    
    .gene-auth-section {
        padding: 15px 8px;
    }
    
    .gene-auth-container {
        padding: 15px 12px;
    }
    
    .gene-auth-header {
        margin-bottom: 12px;
    }
    
    .gene-auth-header h2 {
        font-size: 1rem;
    }
    
    .gene-auth-icon {
        font-size: 1.4rem;
    }
    
    .gene-language-toggle {
        gap: 3px;
        padding: 3px;
    }
    
    .gene-lang-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .gene-form-group {
        margin-bottom: 12px;
    }
    
    .gene-form-group input {
        padding: 9px 10px;
    }
}

/* Loading State */
.gene-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.gene-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #00c9a7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Premium Loading Spinner */
.gene-spinner {
    width: 50px;
    height: 50px;
    position: relative;
}

.gene-spinner::before,
.gene-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.gene-spinner::before {
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--teal);
    border-right-color: var(--gold);
    animation: spinnerRotate 1.2s linear infinite;
}

.gene-spinner::after {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border: 3px solid transparent;
    border-bottom-color: var(--cyan);
    border-left-color: var(--royal-blue);
    animation: spinnerRotate 0.8s linear infinite reverse;
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.gene-toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 18px 30px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    z-index: 2000;
    animation: toastSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.gene-toast-success {
    background: var(--gradient-teal);
}

.gene-toast-error {
    background: var(--gradient-pink);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(120px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.gene-toast.gene-toast-out {
    animation: toastSlideOut 0.4s ease-in forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(120px) scale(0.9);
    }
}

/* Password Toggle */
.gene-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gene-password-wrapper input {
    flex: 1;
    padding-right: 50px;
}

.gene-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.gene-password-toggle:hover {
    opacity: 1;
    background: rgba(0, 217, 255, 0.1);
}

.gene-password-toggle:focus {
    outline: none;
    opacity: 1;
}

.gene-eye-icon {
    font-size: 18px;
    line-height: 1;
}

.gene-password-toggle.active {
    opacity: 1;
}

.gene-password-toggle.active .gene-eye-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 24px;
    background: rgba(255, 100, 100, 0.8);
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 1px;
}

/* User Profile Avatar in Header */
.gene-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.03);
}

.gene-user-profile:hover {
    background: rgba(0, 201, 167, 0.15);
    transform: translateY(-2px);
}

.gene-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--teal);
    box-shadow: 0 0 10px rgba(0, 201, 167, 0.3);
}

.gene-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gene-avatar-initial {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-dark);
}

/* Profile Modal Avatar */
.gene-profile-avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.gene-profile-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--teal);
    box-shadow: 0 0 20px rgba(0, 201, 167, 0.4);
}

.gene-profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gene-avatar-initial-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bg-dark);
}

/* Optional Label */
.gene-optional {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 4px;
}

/* Relationship Section in Add Person Modal */
.gene-relationship-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gene-section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.gene-section-divider span {
    padding: 4px 16px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Date Input Styling */
.gene-date-input {
    font-family: inherit;
    letter-spacing: 1px;
}

.gene-date-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* Outline Danger Button */
.gene-btn-outline-danger {
    background: transparent;
    border: 1px solid rgba(236, 72, 153, 0.5);
    color: #f472b6;
    font-size: 0.85rem;
    padding: 10px 16px;
}

.gene-btn-outline-danger:hover {
    background: rgba(236, 72, 153, 0.1);
    border-color: #f472b6;
}

/* Simplify action buttons layout */
.gene-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.gene-action-buttons .gene-btn-lg {
    min-width: 180px;
    padding: 14px 28px;
    font-size: 1rem;
}

/* Fix dropdown select colors */
.gene-form-group select {
    background-color: #0f1e36 !important;
    color: #ffffff !important;
}

.gene-form-group select option {
    background-color: #0f1e36 !important;
    color: #ffffff !important;
    padding: 12px 16px;
}

.gene-form-group select option:hover,
.gene-form-group select option:focus,
.gene-form-group select option:checked {
    background-color: #1e3a5f !important;
    color: #00c9a7 !important;
}

/* Ensure all select dropdowns have proper styling */
select,
.gene-modal select {
    background-color: #0f1e36 !important;
    color: #ffffff !important;
}

select option,
.gene-modal select option {
    background-color: #0f1e36 !important;
    color: #ffffff !important;
}

/* Ensure select dropdown text is visible */
select#rel-person1,
select#rel-person2,
select#inline-rel-person,
select#inline-rel-type,
select#rel-type {
    color: var(--text-primary);
    background-color: var(--bg-card);
}

select#rel-person1 option,
select#rel-person2 option,
select#inline-rel-person option,
select#inline-rel-type option,
select#rel-type option {
    color: var(--text-primary);
    background-color: var(--bg-card);
    padding: 8px;
}

/* Force dark dropdown options - browser override fix */
.gene-modal select,
.gene-modal select option,
.gene-form-group select,
.gene-form-group select option,
select#inline-rel-type,
select#inline-rel-type option,
select#inline-rel-person,
select#inline-rel-person option,
select#person-gender,
select#person-gender option {
    background: #0a1628 !important;
    background-color: #0a1628 !important;
    color: #ffffff !important;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Hierarchical Tree Layout - Stunning Design */
.gene-tree-hierarchical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 30px;
    position: relative;
    z-index: 2;
}

.gene-tree-hierarchical .gene-tree-level {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
}

/* Couple container */
.gene-tree-couple {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

/* Spouse connector with flowing gradient animation */
.gene-tree-spouse-connector {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, 
        rgba(212, 175, 55, 0.7),
        rgba(139, 92, 246, 0.7),
        rgba(59, 130, 246, 0.7),
        rgba(0, 201, 167, 0.7)
    );
    background-size: 300% 100%;
    animation: spouseConnectorFlow 4s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.35);
}

.gene-tree-spouse-connector::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: connectorShimmer 2s ease-in-out infinite;
}

@keyframes spouseConnectorFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes connectorShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Vertical connector between generations */
.gene-tree-connector-vertical {
    width: 4px;
    height: 40px;
    border-radius: 4px;
    position: relative;
    margin: 8px 0;
    background: linear-gradient(180deg, 
        rgba(212, 175, 55, 0.6),
        rgba(139, 92, 246, 0.6),
        rgba(59, 130, 246, 0.6),
        rgba(0, 201, 167, 0.6)
    );
    background-size: 100% 300%;
    animation: verticalConnectorFlow 3s ease-in-out infinite;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.3);
    overflow: hidden;
}

.gene-tree-connector-vertical::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: verticalShimmer 2.5s ease-in-out infinite;
}

@keyframes verticalConnectorFlow {
    0%, 100% { background-position: 50% 0%; }
    50% { background-position: 50% 100%; }
}

@keyframes verticalShimmer {
    0% { top: -100%; }
    100% { top: 200%; }
}

/* Legacy connector line (kept for compatibility) */
.gene-tree-hierarchical .gene-tree-connector-line {
    width: 4px;
    height: 40px;
    border-radius: 4px;
    position: relative;
    margin: 8px 0;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.6), rgba(0, 201, 167, 0.6));
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    overflow: hidden;
}

.gene-tree-connector-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: verticalShimmer 2.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Flat tree orbital layout */
.gene-tree-flat {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 30px;
}

/* Responsive tree styles */
@media (max-width: 768px) {
    .gene-tree-container {
        padding: 20px;
        min-height: 350px;
    }
    
    .gene-tree-node-circle {
        width: 70px;
        height: 70px;
    }
    
    .gene-tree-node-avatar {
        font-size: 1.4rem;
    }
    
    .gene-tree-node-name {
        font-size: 0.7rem;
        max-width: 80px;
    }
    
    .gene-tree-orbital {
        width: 300px;
        height: 300px;
    }
    
    .gene-tree-hierarchical .gene-tree-level {
        gap: 15px;
    }
    
    .gene-tree-spouse-connector {
        width: 25px;
    }
}
