/* ============================================================
   Lineage Page Styles
   Modern Glassmorphism Design — v2
   ============================================================ */

/* ---- Keyframes ---- */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes floatLock {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(249, 104, 84, 0.3);
    }

    50% {
        box-shadow: 0 0 35px rgba(249, 104, 84, 0.55), 0 0 60px rgba(249, 104, 84, 0.15);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(47, 239, 206, 0.2);
    }

    50% {
        border-color: rgba(47, 239, 206, 0.5);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Page Layout ---- */
.lineage-page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 30px;
}

.lineage-main {
    max-width: 860px;
    margin: 30px auto 40px;
    padding: 0 20px;
    width: 100%;
}

/* ---- Header ---- */
.lineage-page-header {
    text-align: center;
    margin-bottom: 36px;
}

.lineage-page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0 0 8px 0;
    text-shadow: 0 0 30px rgba(47, 239, 206, 0.4);
    background: linear-gradient(135deg, #fff 0%, #2fefce 50%, #8b9bff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Neutralize the global h1 from style.css */
    position: static;
    top: auto;
    padding: 0;
    z-index: auto;
}

.lineage-page-header .lineage-subtitle {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.92rem;
    letter-spacing: 0.3px;
}

/* ---- Glass Content Box ---- */
.lineage-content-box {
    background: rgba(7, 28, 36, 0.75);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(47, 239, 206, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.2),
        0 0 80px rgba(47, 239, 206, 0.04);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
}

.lineage-content-box::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(47, 239, 206, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- Access Granted ---- */
.lineage-unlocked-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(47, 239, 206, 0.15), rgba(47, 239, 206, 0.06));
    border: 1px solid rgba(47, 239, 206, 0.3);
    color: #2fefce;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: borderGlow 3s ease-in-out infinite;
}

.lineage-tree-box {
    text-align: left;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.25), rgba(47, 239, 206, 0.02));
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(47, 239, 206, 0.08);
}

.lineage-tree-box h3 {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    margin: 0 0 18px 0;
}

.lineage-node {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 8px;
}

.lineage-branch {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 2px dashed rgba(47, 239, 206, 0.25);
}

.lineage-step {
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

.lineage-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lineage-steps-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.lineage-steps-list li:last-child {
    border-bottom: none;
    color: #2fefce;
    font-weight: 600;
}

/* ---- Access Denied / Locked State ---- */
.lineage-locked-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.lineage-lock-icon {
    font-size: 3.8rem;
    animation: floatLock 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 100, 100, 0.35));
}

.lineage-locked-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.3px;
}

.lineage-locked-msg {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.92rem;
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

/* ---- Login CTA ---- */
.lineage-login-cta {
    text-align: center;
    margin-top: 10px;
}

.lineage-login-cta p {
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 20px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.lineage-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(47, 239, 206, 0.18), rgba(47, 239, 206, 0.06));
    border: 1px solid rgba(47, 239, 206, 0.35);
    color: #2fefce;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    text-decoration: none;
}

.lineage-login-btn:hover {
    background: linear-gradient(135deg, rgba(47, 239, 206, 0.28), rgba(47, 239, 206, 0.12));
    border-color: rgba(47, 239, 206, 0.65);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(47, 239, 206, 0.2);
    color: #2fefce;
    text-decoration: none;
}

.lineage-login-btn.discord-btn {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(88, 101, 242, 0.12));
    border-color: rgba(88, 101, 242, 0.5);
    color: #8b9bff;
}

.lineage-login-btn.discord-btn:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.45), rgba(88, 101, 242, 0.2));
    border-color: rgba(88, 101, 242, 0.8);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.25);
    color: #a5b2ff;
}

/* ---- Countdown Timer ---- */
.lineage-countdown-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.lineage-countdown-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(47, 239, 206, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.lineage-countdown-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    font-weight: 600;
}

.lineage-countdown-timer {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.countdown-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    min-width: 72px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(4px);
}

.countdown-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.countdown-sep {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    align-self: center;
    margin-top: -12px;
}

/* Skip the wait CTA */
.lineage-skip-cta {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.lineage-skip-cta a {
    font-size: 0.82rem;
    color: #f96854;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lineage-skip-cta a:hover {
    color: #ff7a68;
    text-shadow: 0 0 12px rgba(249, 104, 84, 0.3);
}

/* ---- Upsell / Patreon Banner ---- */
.lineage-upsell-banner {
    background: linear-gradient(135deg,
            rgba(249, 104, 84, 0.1) 0%,
            rgba(255, 180, 0, 0.06) 40%,
            rgba(249, 104, 84, 0.04) 100%);
    border: 1px solid rgba(249, 104, 84, 0.25);
    border-radius: 22px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.lineage-upsell-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(249, 104, 84, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.lineage-upsell-banner::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

.upsell-inner {
    position: relative;
    z-index: 1;
}

.upsell-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.upsell-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 8px rgba(249, 104, 84, 0.3));
}

.upsell-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.3px;
}

.upsell-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    margin: 0 0 22px 0;
    line-height: 1.5;
}

.upsell-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.upsell-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}

.upsell-benefits li:hover {
    background: rgba(255, 255, 255, 0.06);
}

.upsell-benefits li .benefit-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* How it works stepper */
.upsell-how-it-works {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.upsell-how-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
    font-weight: 700;
}

.upsell-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upsell-step {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
}

.upsell-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.upsell-step-num.step-patreon {
    background: rgba(249, 104, 84, 0.25);
    color: #f96854;
}

.upsell-step-num.step-connect {
    background: rgba(47, 239, 206, 0.15);
    color: #2fefce;
}

/* Action buttons */
.upsell-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-patreon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f96854, #e05141);
    border: none;
    color: #fff;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(249, 104, 84, 0.35);
    cursor: pointer;
    animation: glowPulse 3s ease-in-out infinite;
}

.btn-patreon:hover {
    background: linear-gradient(135deg, #ff7a68, #f96854);
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(249, 104, 84, 0.5);
    color: #fff;
    text-decoration: none;
}

.btn-check-pro {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 13px 26px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.btn-check-pro:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Quick-connect nudge */
.lineage-nudge {
    margin-top: 14px;
    padding: 12px 18px;
    background: rgba(47, 239, 206, 0.06);
    border: 1px solid rgba(47, 239, 206, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.lineage-nudge span {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.7);
}

.lineage-nudge a {
    background: rgba(47, 239, 206, 0.15);
    border: 1px solid rgba(47, 239, 206, 0.35);
    color: #2fefce;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.lineage-nudge a:hover {
    background: rgba(47, 239, 206, 0.25);
    border-color: rgba(47, 239, 206, 0.55);
}

/* Already a supporter link */
.lineage-supporter-link {
    margin-top: 14px;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
}

.lineage-supporter-link a {
    color: #f96854;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.lineage-supporter-link a:hover {
    color: #ff7a68;
}

/* ---- Pro Badge ---- */
.lineage-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 180, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #ffd700;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    background-image: linear-gradient(110deg,
            rgba(255, 215, 0, 0.15) 0%,
            rgba(255, 215, 0, 0.15) 40%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 215, 0, 0.15) 60%,
            rgba(255, 215, 0, 0.15) 100%);
}

/* ---- Patreon Return Banner ---- */
.lineage-patreon-return {
    background: rgba(47, 239, 206, 0.06);
    border: 1px solid rgba(47, 239, 206, 0.2);
    border-radius: 16px;
    padding: 16px 22px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    animation: fadeInUp 0.4s ease;
}

.lineage-patreon-return.return-success {
    border-color: rgba(47, 239, 206, 0.35);
    background: rgba(47, 239, 206, 0.08);
}

.lineage-patreon-return.return-warning {
    border-color: rgba(255, 180, 0, 0.35);
    background: rgba(255, 180, 0, 0.06);
}

.lineage-patreon-return.return-error {
    border-color: rgba(255, 100, 100, 0.35);
    background: rgba(255, 100, 100, 0.06);
}

.lineage-patreon-return .return-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ---- Back Link ---- */
/* ---- Back Link ---- */
.lineage-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(47, 239, 206, 0.1);
    border: 1px solid rgba(47, 239, 206, 0.3);
    color: #2fefce;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 16px auto 0 auto;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

.lineage-back-link:hover {
    background: rgba(47, 239, 206, 0.2);
    border-color: rgba(47, 239, 206, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(47, 239, 206, 0.15);
    color: #fff;
    text-decoration: none;
}

/* ---- Section Headers ---- */
.lineage-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lineage-section-header:not(:first-child) {
    margin-top: 32px;
}

.lineage-section-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 6px rgba(47, 239, 206, 0.3));
}

.lineage-section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    flex: 1;
    border: none;
    padding: 0;
}

.lineage-steps-badge {
    background: rgba(47, 239, 206, 0.1);
    border: 1px solid rgba(47, 239, 206, 0.2);
    color: #2fefce;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ---- Base Elements ---- */
.lineage-base-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.lineage-base-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.lineage-base-pill:hover {
    background: linear-gradient(135deg, rgba(47, 239, 206, 0.12), rgba(47, 239, 206, 0.04));
    border-color: rgba(47, 239, 206, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(47, 239, 206, 0.1);
}

.lineage-base-pill .base-emoji {
    font-size: 1.1rem;
}

.lineage-base-pill .base-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* ---- Steps Timeline ---- */
.lineage-steps-timeline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.lineage-step-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid rgba(47, 239, 206, 0.15);
    border-radius: 14px;
    padding: 14px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.4s ease backwards;
}

.lineage-step-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(47, 239, 206, 0.2);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.lineage-step-card.lineage-step-final {
    background: rgba(47, 239, 206, 0.06);
    border-color: rgba(47, 239, 206, 0.25);
    border-left: 3px solid rgba(47, 239, 206, 0.5);
}

.lineage-step-card.lineage-step-final:hover {
    background: rgba(47, 239, 206, 0.1);
    border-color: rgba(47, 239, 206, 0.4);
}

/* ---- Step Completion ---- */
.lineage-step-card.is-completed {
    background: rgba(47, 239, 206, 0.04);
    border-left-color: rgba(47, 239, 206, 0.6);
}

.lineage-step-card.is-completed .lineage-step-number {
    background: rgba(47, 239, 206, 0.15);
    border-color: rgba(47, 239, 206, 0.3);
    color: #2fefce;
}

.lineage-step-card.is-completed .ing-name,
.lineage-step-card.is-completed .res-name {
    color: rgba(47, 239, 206, 0.6);
}

.lineage-step-check {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    opacity: 0.7;
}

.lineage-step-check:hover {
    opacity: 1;
    transform: scale(1.15);
    background: rgba(47, 239, 206, 0.08);
}

.lineage-step-check.checked {
    opacity: 1;
}

/* Step number circle */
.lineage-step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-variant-numeric: tabular-nums;
}

.lineage-step-final .lineage-step-number {
    background: rgba(47, 239, 206, 0.15);
    border-color: rgba(47, 239, 206, 0.3);
    color: #2fefce;
}

/* Step content / recipe */
.lineage-step-content {
    flex: 1;
    min-width: 0;
}

.lineage-step-recipe {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Ingredient pill */
.lineage-ingredient {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.lineage-ingredient.is-base {
    border-color: rgba(47, 239, 206, 0.15);
    background: rgba(47, 239, 206, 0.04);
}

.lineage-ingredient .ing-emoji {
    font-size: 0.95rem;
}

.lineage-ingredient .ing-name {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.lineage-ingredient.is-base .ing-name {
    color: rgba(47, 239, 206, 0.7);
}

/* Ingredient/result links */
a.lineage-ingredient,
a.lineage-result {
    text-decoration: none;
    cursor: pointer;
}

a.lineage-ingredient:hover,
a.lineage-result:hover {
    background: rgba(47, 239, 206, 0.1);
    border-color: rgba(47, 239, 206, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(47, 239, 206, 0.1);
}

/* Operator (+) */
.lineage-operator {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

/* Arrow (→) */
.lineage-arrow {
    font-size: 0.9rem;
    color: rgba(47, 239, 206, 0.5);
    flex-shrink: 0;
    margin: 0 2px;
}

/* Result element */
.lineage-result {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 14px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.lineage-result.is-final {
    background: rgba(47, 239, 206, 0.1);
    border-color: rgba(47, 239, 206, 0.3);
}

.lineage-result .res-emoji {
    font-size: 0.95rem;
}

.lineage-result .res-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.lineage-result.is-final .res-name {
    color: #2fefce;
}

/* Connector between steps */
.lineage-connector {
    width: 2px;
    height: 12px;
    background: linear-gradient(to bottom, rgba(47, 239, 206, 0.25), rgba(88, 101, 242, 0.15));
    margin: 0 0 0 33px;
    /* aligns with step-number center (16px offset + half of 32px width) */
    border-radius: 1px;
}

/* ---- Final Result ---- */
.lineage-final-result {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(47, 239, 206, 0.1), rgba(88, 101, 242, 0.05));
    border: 1px solid rgba(47, 239, 206, 0.25);
    border-radius: 20px;
    overflow: hidden;
}

.final-result-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(47, 239, 206, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.lineage-final-result .final-emoji {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 12px rgba(47, 239, 206, 0.4));
    position: relative;
    z-index: 1;
}

.lineage-final-result .final-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(47, 239, 206, 0.3);
}

.lineage-final-result .final-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(47, 239, 206, 0.6);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* ---- Post-Unlock Nudge (non-Pro users) ---- */
.lineage-post-unlock-nudge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    flex-wrap: wrap;
}

.nudge-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.nudge-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.nudge-info strong {
    color: rgba(255, 255, 255, 0.8);
}

.nudge-pro-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(249, 104, 84, 0.2), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(249, 104, 84, 0.35);
    border-radius: 50px;
    color: #f96854;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nudge-pro-link:hover {
    background: linear-gradient(135deg, rgba(249, 104, 84, 0.35), rgba(255, 215, 0, 0.18));
    border-color: rgba(249, 104, 84, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(249, 104, 84, 0.25);
    color: #ff7a68;
}

@media (max-width: 480px) {
    .lineage-post-unlock-nudge {
        flex-direction: column;
        text-align: center;
        padding: 12px 14px;
        gap: 10px;
    }

    .nudge-info {
        justify-content: center;
    }
}

.lineage-no-data {
    text-align: center;
    padding: 40px 20px;
}

.lineage-no-data .no-data-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.lineage-no-data h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 8px 0;
    border: none;
    padding: 0;
}

.lineage-no-data p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .lineage-main {
        margin: 100px auto 20px;
        padding: 0 14px;
    }

    .lineage-content-box {
        padding: 24px 18px;
    }

    .lineage-page-header h1 {
        font-size: 1.5rem;
    }

    .countdown-value {
        font-size: 1.8rem;
        min-width: 54px;
        padding: 10px 12px;
    }

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

    .upsell-benefits {
        grid-template-columns: 1fr;
    }

    .btn-patreon,
    .btn-check-pro {
        width: 100%;
        justify-content: center;
    }

    .lineage-upsell-banner {
        padding: 22px 16px;
    }

    .lineage-locked-header {
        padding: 16px;
    }

    .lineage-nudge {
        flex-direction: column;
        text-align: center;
    }

    .lineage-step-card {
        padding: 12px 14px;
        gap: 12px;
    }

    .lineage-step-recipe {
        gap: 6px;
    }

    .lineage-ingredient,
    .lineage-result {
        padding: 4px 10px;
    }

    .lineage-ingredient .ing-name,
    .lineage-result .res-name {
        font-size: 0.78rem;
    }

    .lineage-connector {
        margin-left: 27px;
    }

    .lineage-final-result {
        padding: 22px 16px;
    }

    .lineage-final-result .final-emoji {
        font-size: 2rem;
    }

    .lineage-final-result .final-name {
        font-size: 1.1rem;
    }

    .lineage-base-elements {
        gap: 8px;
    }

    .lineage-base-pill {
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .lineage-main {
        margin: 80px auto 16px;
        padding: 0 10px;
    }

    .lineage-content-box {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .lineage-page-header h1 {
        font-size: 1.3rem;
    }

    .lineage-step-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }

    .lineage-step-recipe {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
    }

    .lineage-operator,
    .lineage-arrow {
        align-self: center;
    }

    .lineage-step-number {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: 0.7rem;
    }

    .lineage-step-check {
        align-self: flex-end;
        margin-top: -32px;
    }

    .lineage-connector {
        margin-left: 20px;
    }

    .lineage-ingredient,
    .lineage-result {
        padding: 4px 8px;
        width: fit-content;
    }

    .lineage-ingredient .ing-name,
    .lineage-result .res-name {
        font-size: 0.75rem;
    }

    .lineage-base-pill {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .lineage-final-result {
        padding: 18px 14px;
    }

    .lineage-final-result .final-emoji {
        font-size: 1.8rem;
    }

    .lineage-final-result .final-name {
        font-size: 1rem;
    }

    .lineage-countdown-box {
        padding: 20px 14px;
    }

    .countdown-value {
        font-size: 1.5rem;
        min-width: 46px;
        padding: 8px 10px;
    }

    .lineage-login-btn {
        padding: 12px 22px;
        font-size: 0.88rem;
    }
}

/* ============================================================
   Lineage Landing Page (no ID)
   ============================================================ */

.lineage-landing {
    animation: fadeInUp 0.5s ease;
}

.lineage-landing-hero {
    text-align: center;
    margin-bottom: 40px;
}

.lineage-landing-h1 {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #fff 0%, #2fefce 40%, #8b5cf6 70%, #f96854 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    /* Neutralize global h1 */
    position: static;
    top: auto;
    padding: 0;
    z-index: auto;
}

.lineage-landing-tagline {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto;
}

/* Feature Cards Grid */
.lineage-landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.lineage-feature-card {
    background: rgba(7, 28, 36, 0.6);
    border: 1px solid rgba(47, 239, 206, 0.1);
    border-radius: 18px;
    padding: 24px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(6px);
    position: relative;
    overflow: hidden;
}

.lineage-feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 0%, rgba(47, 239, 206, 0.06) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.lineage-feature-card:hover {
    border-color: rgba(47, 239, 206, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(47, 239, 206, 0.08);
}

.lineage-feature-card:hover::before {
    opacity: 1;
}

.feature-card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 8px rgba(47, 239, 206, 0.3));
}

.lineage-feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    border: none;
    padding: 0;
}

.lineage-feature-card p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* CTA Box */
.lineage-landing-cta {
    margin-top: 10px;
}

.lineage-landing-cta-inner {
    background: rgba(7, 28, 36, 0.7);
    border: 1px solid rgba(47, 239, 206, 0.15);
    border-radius: 22px;
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.lineage-landing-cta-inner::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(47, 239, 206, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-lock-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 14px;
}

.lineage-landing-cta-inner h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px 0;
}

.lineage-landing-cta-inner p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 22px 0;
}

@media (max-width: 600px) {
    .lineage-landing-h1 {
        font-size: 2rem;
    }

    .lineage-landing-features {
        grid-template-columns: 1fr;
    }

    .lineage-landing-cta-inner {
        padding: 28px 20px;
    }
}

/* ============================================================
   Lineage Search — Redesigned
   ============================================================ */

.lineage-search-container {
    position: relative;
    z-index: 50;
    max-width: 860px;
    margin: 140px auto 30px;
    padding: 0 20px;
    text-align: center;
}

/* Override search-container positioning for lineage page */
.lineage-search-bar.search-container {
    position: relative;
    top: 0;
}

/* Big search input */
#lineageSearch {
    width: 100%;
    padding: 20px 20px 20px 60px;
    font-size: 26px;
    border: 2px solid rgba(47, 239, 206, 0.3);
    border-radius: 20px;
    margin-bottom: 0;
    z-index: 2;
    position: relative;
    background: rgba(7, 28, 36, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#lineageSearch::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

#lineageSearch:focus {
    outline: none;
    border-color: rgba(47, 239, 206, 0.4);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(47, 239, 206, 0.08);
}

/* Search icon */
.lineage-search-bar .search-icon {
    position: absolute;
    left: 20px;
    top: 22px;
    width: 28px;
    height: 28px;
    z-index: 10;
    opacity: 0.85;
}

/* Close button */
#lineage-close-search {
    position: absolute;
    right: 16px;
    top: 8px;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    z-index: 10;
    display: none;
    transition: color 0.2s ease;
}

#lineage-close-search:hover {
    color: #fff;
}

/* Results display — inline pills matching main site */
.lineage-display {
    background: rgba(7, 28, 36, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(47, 239, 206, 0.25);
    border-top: none;
    border-radius: 0 0 20px 20px;
    max-height: 700px;
    overflow-y: auto;
    text-align: center;
    display: none;
    z-index: 10;
    position: relative;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
    padding: 10px;
    box-sizing: border-box;
}

.lineage-display h3 {
    margin: 0;
    padding: 14px 20px 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.lineage-display ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-width: 100%;
}

.lineage-display ul li {
    padding: 10px 14px;
    cursor: pointer;
    display: inline flow-root list-item;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin: 5px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    color: #fff;
}

.lineage-display ul li:hover {
    background: rgba(47, 239, 206, 0.12);
    border-color: rgba(47, 239, 206, 0.4);
    transform: translateY(-1px);
}

.lineage-display a {
    color: #fff;
    text-decoration: none;
}

/* Spinner */
.lineage-display .spinnerr {
    border: 4px solid rgba(47, 239, 206, 0.15);
    border-radius: 50%;
    border-top: 4px solid #2fefce;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
    margin: 24px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* When search is focused, round only top corners of input */
.lineage-search-container.has-results #lineageSearch {
    border-radius: 20px 20px 0 0;
    border-bottom-color: transparent;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .lineage-search-container {
        margin-top: 100px;
    }

    #lineageSearch {
        font-size: 20px;
        padding: 16px 16px 16px 50px;
        border-radius: 16px;
    }

    .lineage-search-bar .search-icon {
        left: 16px;
        top: 18px;
        width: 24px;
        height: 24px;
    }

    #lineage-close-search {
        right: 12px;
        top: 4px;
        font-size: 34px;
    }

    .lineage-display {
        border-radius: 0 0 16px 16px;
    }

    .lineage-display ul li {
        font-size: 15px;
        padding: 12px 14px;
    }

    .lineage-search-container.has-results #lineageSearch {
        border-radius: 16px 16px 0 0;
    }
}