/* Player DNA 2.0 — private experience */

.pdna-page {
    --pdna-text: #3a4550;
    --pdna-heading: #1a2129;
    --pdna-muted: #6b7785;
    --pdna-surface: #ffffff;
    --pdna-surface-2: #f4f6f8;
    --pdna-border: #dde3ea;
    --pdna-input: #ffffff;
    --pdna-hover: #eef1f4;
    --pdna-deep: #e8ecf1;
    --pdna-shadow: rgba(0, 0, 0, 0.08);
    --pdna-page-bg:
        radial-gradient(ellipse at 50% 0%, rgba(249, 155, 29, 0.08), transparent 55%),
        transparent;
    --pdna-loading-bg:
        radial-gradient(ellipse at 50% 18%, rgba(224, 4, 63, 0.1), transparent 52%),
        radial-gradient(ellipse at 80% 80%, rgba(249, 155, 29, 0.1), transparent 45%),
        linear-gradient(180deg, #f7f9fb 0%, #eef1f4 100%);
    --pdna-hero-bg:
        radial-gradient(ellipse at 50% -10%, rgba(249, 155, 29, 0.14), transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(224, 4, 63, 0.08), transparent 50%),
        linear-gradient(165deg, #ffffff 0%, #f4f6f8 55%, #eef1f4 100%);
    --pdna-tag-bg: rgba(255, 255, 255, 0.85);
    --pdna-term-bg: rgba(244, 246, 248, 0.95);
    --pdna-summary: #5a6570;
    padding-bottom: 48px;
    color: var(--pdna-text);
    background: var(--pdna-page-bg);
}

html[data-theme="dark"] .pdna-page {
    --pdna-text: #c8d0d8;
    --pdna-heading: #e8ecef;
    --pdna-muted: #9aa7b5;
    --pdna-surface: #151b22;
    --pdna-surface-2: #1a2129;
    --pdna-border: #2a3440;
    --pdna-input: #0e1217;
    --pdna-hover: #1f2730;
    --pdna-deep: #0e1217;
    --pdna-shadow: rgba(0, 0, 0, 0.35);
    --pdna-page-bg:
        radial-gradient(ellipse at 50% 0%, rgba(249, 155, 29, 0.1), transparent 55%),
        transparent;
    --pdna-loading-bg:
        radial-gradient(ellipse at 50% 18%, rgba(224, 4, 63, 0.28), transparent 52%),
        radial-gradient(ellipse at 80% 80%, rgba(249, 155, 29, 0.16), transparent 45%),
        linear-gradient(180deg, #161d26 0%, #0e1217 100%);
    --pdna-hero-bg:
        radial-gradient(ellipse at 50% -10%, rgba(249, 155, 29, 0.22), transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(224, 4, 63, 0.18), transparent 50%),
        linear-gradient(165deg, #1a222c 0%, #10151b 55%, #0c1015 100%);
    --pdna-tag-bg: rgba(14, 18, 23, 0.72);
    --pdna-term-bg: rgba(14, 18, 23, 0.85);
    --pdna-summary: #b7c2cd;
}

.pdna-container { max-width: 720px; }

.pdna-loading {
    position: relative;
    text-align: center;
    margin: 12px 0 28px;
    padding: 40px 18px 32px;
    border: 1px solid var(--pdna-border);
    border-radius: 16px;
    overflow: hidden;
    color: var(--pdna-muted);
    background: var(--pdna-loading-bg);
    box-shadow:
        0 0 0 1px rgba(249, 155, 29, 0.08) inset,
        0 20px 50px var(--pdna-shadow);
}

.pdna-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(255, 255, 255, 0.03) 3px,
        rgba(255, 255, 255, 0.03) 6px);
    pointer-events: none;
    animation: pdna-crt 4s linear infinite;
    opacity: 0.6;
}

.pdna-loading-stage {
    position: relative;
    width: min(260px, 82vw);
    height: 210px;
    margin: 0 auto 16px;
}

.pdna-orbit {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 2px solid rgba(249, 155, 29, 0.35);
    border-top-color: #f99b1d;
    border-bottom-color: #e0043f;
    animation: pdna-spin 1.4s linear infinite;
}

.pdna-orbit--b {
    inset: 36px;
    border-width: 2px;
    border-top-color: #e0043f;
    border-bottom-color: #f99b1d;
    animation-duration: 2.2s;
    animation-direction: reverse;
    opacity: 0.85;
}

.pdna-dna {
    position: absolute;
    left: 50%;
    top: 28px;
    bottom: 28px;
    width: 72px;
    margin-left: -36px;
    z-index: 2;
}

.pdna-dna-strand {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f99b1d, #e0043f, #f99b1d);
    box-shadow: 0 0 14px rgba(249, 155, 29, 0.65);
    animation: pdna-strand-wave 1.2s ease-in-out infinite;
}

.pdna-dna-strand--l { left: 10px; }
.pdna-dna-strand--r {
    right: 10px;
    animation-delay: 0.6s;
    background: linear-gradient(180deg, #e0043f, #f99b1d, #e0043f);
}

.pdna-dna-rung {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f99b1d, #e0043f);
    box-shadow: 0 0 10px rgba(224, 4, 63, 0.55);
    top: calc(8px + var(--i) * 16px);
    animation: pdna-rung-flash 1.1s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.09s);
}

.pdna-dna-rung::before,
.pdna-dna-rung::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: #ffd27a;
    box-shadow: 0 0 10px #f99b1d;
}

.pdna-dna-rung::before { left: -4px; }
.pdna-dna-rung::after {
    right: -4px;
    background: #ff6b8a;
    box-shadow: 0 0 10px #e0043f;
}

.pdna-beam {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 40px;
    z-index: 3;
    border-radius: 12px;
    background: linear-gradient(180deg, transparent, rgba(249, 155, 29, 0.45), transparent);
    box-shadow: 0 0 30px rgba(249, 155, 29, 0.5);
    animation: pdna-beam-sweep 1.5s ease-in-out infinite;
    pointer-events: none;
}

.pdna-loading-core {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    z-index: 4;
    filter: drop-shadow(0 0 16px rgba(249, 155, 29, 0.7));
    animation: pdna-core-pulse 1.1s ease-in-out infinite;
}

.pdna-spark {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f99b1d;
    box-shadow: 0 0 12px #f99b1d;
    z-index: 5;
    animation: pdna-spark-fly 2s ease-in-out infinite;
}

.pdna-spark--1 { left: 18%; top: 30%; animation-delay: 0s; }
.pdna-spark--2 { right: 16%; top: 48%; background: #e0043f; box-shadow: 0 0 12px #e0043f; animation-delay: 0.4s; }
.pdna-spark--3 { left: 28%; bottom: 22%; animation-delay: 0.85s; }

.pdna-progress {
    position: relative;
    width: min(280px, 80%);
    height: 6px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: var(--pdna-hover);
    overflow: hidden;
    border: 1px solid var(--pdna-border);
}

.pdna-progress > i {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: inherit;
    background: linear-gradient(90deg, #e0043f, #f99b1d, #e0043f);
    background-size: 200% 100%;
    animation: pdna-progress-run 1.2s ease-in-out infinite;
}

.pdna-loading-title {
    position: relative;
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--pdna-heading);
    text-shadow: 0 0 18px rgba(249, 155, 29, 0.45);
    animation: pdna-title-pulse 1.4s ease-in-out infinite;
}

.pdna-loading-sub {
    position: relative;
    margin: 0 0 16px;
    min-height: 1.4em;
    color: #f99b1d;
    font-weight: 600;
    font-size: 0.92rem;
}

.pdna-loading-terminal {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    max-width: 340px;
    margin: 0 auto;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.pdna-term-line {
    display: block;
    padding: 5px 8px;
    border: 1px solid var(--pdna-border);
    border-radius: 4px;
    background: var(--pdna-term-bg);
    color: #6dcaa5;
    opacity: 0.35;
    animation: pdna-term-blink 2s ease-in-out infinite;
    animation-delay: calc(var(--d) * 0.4s);
}

.pdna-term-line::before {
    content: "> ";
    color: #f99b1d;
}

@keyframes pdna-spin {
    to { transform: rotate(360deg); }
}

@keyframes pdna-strand-wave {
    0%, 100% { transform: translateX(0); filter: brightness(1); }
    50% { transform: translateX(3px); filter: brightness(1.35); }
}

@keyframes pdna-rung-flash {
    0%, 100% { opacity: 0.45; transform: scaleX(0.92); }
    50% { opacity: 1; transform: scaleX(1); }
}

@keyframes pdna-beam-sweep {
    0% { top: 18px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 150px; opacity: 0; }
}

@keyframes pdna-core-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.18); opacity: 1; }
}

@keyframes pdna-spark-fly {
    0%, 100% { transform: translate(0, 0) scale(0.7); opacity: 0.2; }
    40% { opacity: 1; }
    70% { transform: translate(18px, -22px) scale(1.2); opacity: 0.9; }
}

@keyframes pdna-progress-run {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

@keyframes pdna-title-pulse {
    0%, 100% { opacity: 0.88; letter-spacing: 0.04em; }
    50% { opacity: 1; letter-spacing: 0.07em; text-shadow: 0 0 24px rgba(249, 155, 29, 0.7); }
}

@keyframes pdna-term-blink {
    0%, 25% { opacity: 0.3; border-color: var(--pdna-border); }
    40%, 60% { opacity: 1; border-color: rgba(109, 202, 165, 0.55); color: #9dffd0; box-shadow: 0 0 10px rgba(109, 202, 165, 0.2); }
    75%, 100% { opacity: 0.4; }
}

@keyframes pdna-crt {
    from { transform: translateY(0); }
    to { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .pdna-loading::before,
    .pdna-orbit,
    .pdna-dna-strand,
    .pdna-dna-rung,
    .pdna-beam,
    .pdna-loading-core,
    .pdna-spark,
    .pdna-progress > i,
    .pdna-loading-title,
    .pdna-term-line,
    .pdna-bar-track > i {
        animation: none !important;
        transition: none !important;
    }
    .pdna-term-line,
    .pdna-dna-rung { opacity: 0.85; }
    .pdna-progress > i { width: 70%; transform: none; }
}
.pdna-hero {
    position: relative;
    text-align: center;
    margin: 0 0 18px;
    padding: 0;
    border: 1px solid var(--pdna-border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--pdna-hero-bg);
    box-shadow: 0 18px 40px var(--pdna-shadow);
}

.pdna-hero-glow {
    position: absolute;
    inset: -20% 20% auto;
    height: 55%;
    background: radial-gradient(circle, rgba(249, 155, 29, 0.2), transparent 70%);
    pointer-events: none;
    animation: pdna-hero-glow 4.5s ease-in-out infinite;
}

.pdna-hero-inner {
    position: relative;
    padding: 36px 22px 28px;
    z-index: 1;
}

.pdna-hero-badge {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
}

.pdna-hero-icon {
    position: relative;
    z-index: 2;
    font-size: 2.6rem;
    line-height: 1;
    filter: drop-shadow(0 0 16px rgba(249, 155, 29, 0.55));
    animation: pdna-hero-icon 2.8s ease-in-out infinite;
}

.pdna-hero-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(249, 155, 29, 0.45);
    box-shadow:
        0 0 0 8px rgba(249, 155, 29, 0.06),
        inset 0 0 24px rgba(224, 4, 63, 0.18);
    animation: pdna-spin 8s linear infinite;
}

.pdna-hero-icon-ring::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(224, 4, 63, 0.35);
    animation: pdna-spin 14s linear infinite reverse;
}

.pdna-kicker {
    margin: 0 0 10px;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #f99b1d;
    font-weight: 800;
}

.pdna-identity {
    margin: 0 0 14px;
    font-size: clamp(1.85rem, 6vw, 2.75rem);
    font-weight: 800;
    color: var(--pdna-heading);
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-wrap: balance;
    text-shadow: 0 0 28px rgba(249, 155, 29, 0.22);
}

.pdna-summary {
    margin: 0 auto 18px;
    max-width: 34rem;
    color: var(--pdna-summary);
    line-height: 1.55;
    font-size: 1.05rem;
    font-style: italic;
}

.pdna-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.pdna-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--pdna-border);
    background: var(--pdna-tag-bg);
    color: var(--pdna-heading);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pdna-hero-tag--primary {
    border-color: rgba(249, 155, 29, 0.55);
    color: #ffd27a;
    box-shadow: 0 0 18px rgba(249, 155, 29, 0.12);
}

.pdna-hero-plus {
    color: var(--pdna-muted);
    font-weight: 800;
}

.pdna-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: var(--pdna-muted);
    font-size: 0.88rem;
}

.pdna-hero-riot {
    color: var(--pdna-text);
    font-weight: 700;
}

.pdna-hero-dot { opacity: 0.55; }

.pdna-hero-conf {
    color: #6dcaa5;
    font-weight: 600;
}

.pdna-hero--forming .pdna-hero-icon-ring {
    border-color: rgba(139, 152, 165, 0.45);
}

@keyframes pdna-hero-glow {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes pdna-hero-icon {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.06); }
}

@media (max-width: 640px) {
    .pdna-hero-inner { padding: 28px 16px 22px; }
    .pdna-hero-badge { width: 76px; height: 76px; margin-bottom: 14px; }
    .pdna-hero-icon { font-size: 2.2rem; }
    .pdna-summary { font-size: 0.98rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pdna-hero-glow,
    .pdna-hero-icon,
    .pdna-hero-icon-ring,
    .pdna-hero-icon-ring::after {
        animation: none !important;
    }
}

.pdna-secondary { color: var(--pdna-text); margin-top: 10px; }
.pdna-meta { color: var(--pdna-muted); font-size: 0.9rem; margin-top: 12px; }

.pdna-card {
    background: var(--pdna-surface);
    border: 1px solid var(--pdna-border);
    border-radius: 12px;
    padding: 18px 16px 16px;
    margin-bottom: 14px;
}

.pdna-card-head h2 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--pdna-heading);
}

.pdna-big {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pdna-heading);
}

.pdna-bars { display: flex; flex-direction: column; gap: 8px; }

.pdna-bar {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--pdna-border);
    background: var(--pdna-deep);
    border-radius: 8px;
    padding: 10px 12px;
    color: inherit;
    cursor: pointer;
    transition: border-color .15s ease;
}

.pdna-bar:hover,
.pdna-bar.is-open { border-color: #f99b1d; }

.pdna-bar-head {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 6px;
}

.pdna-bar-head strong { color: var(--pdna-heading); }

.pdna-bar-track {
    height: 6px;
    background: var(--pdna-hover);
    border-radius: 999px;
    overflow: hidden;
}

.pdna-bar-track > i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #e0043f, #f99b1d);
    border-radius: inherit;
    transition: width .45s ease;
}

.pdna-bar-detail {
    margin-top: 10px;
    color: var(--pdna-muted);
    font-size: 0.9rem;
}

.pdna-bar-detail ul {
    margin: 6px 0 0;
    padding-left: 1.1rem;
}

.pdna-confidence-bar {
    height: 8px;
    background: var(--pdna-deep);
    border: 1px solid var(--pdna-border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.pdna-confidence-bar span {
    display: block;
    height: 100%;
    background: #f99b1d;
}

.pdna-why {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pdna-why li {
    padding: 6px 0;
    border-bottom: 1px solid var(--pdna-border);
    color: var(--pdna-text);
}

.pdna-champ-list,
.pdna-role-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdna-champ-list li {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    align-items: center;
}

.pdna-champ-list img { border-radius: 8px; }
.pdna-champ-list strong,
.pdna-role-list strong { color: var(--pdna-heading); display: block; }
.pdna-champ-list span,
.pdna-role-list span { display: block; color: var(--pdna-muted); font-size: 0.85rem; }
.pdna-champ-list a { color: #f99b1d; font-weight: 700; }

.pdna-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pdna-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--pdna-border);
    background: var(--pdna-deep);
    color: var(--pdna-heading) !important;
    text-decoration: none;
    font-weight: 700;
}

.pdna-btn:hover {
    border-color: #f99b1d;
    color: var(--pdna-heading) !important;
}

.pdna-btn--accent {
    background: #f99b1d;
    border-color: #f99b1d;
    color: #111 !important;
}

.pdna-btn--accent:hover {
    background: #ffb347;
    border-color: #ffb347;
    color: #111 !important;
}

.pdna-hint { color: var(--pdna-muted); font-size: 0.85rem; }
.pdna-empty { color: var(--pdna-muted); }
.pdna-changing { color: #f99b1d; font-weight: 600; }
.pdna-evo-compare {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--pdna-text);
}
.pdna-deltas {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pdna-deltas li {
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--pdna-deep);
    border: 1px solid var(--pdna-border);
    font-weight: 700;
    font-size: 0.85rem;
}
.pdna-deltas .is-up { color: #6dcaa5; }
.pdna-deltas .is-down { color: #e0043f; }

@media (max-width: 640px) {
    .pdna-champ-list li { grid-template-columns: 40px 1fr; }
    .pdna-champ-list a { grid-column: 2; }
}
