/* ============================================================
   BKG shared theme — used by tree.html and recruit.html.
   index.html keeps its own inline <style>; this file mirrors
   the same design tokens + shell so the new pages look native.
   ============================================================ */

:root {
    --brass: #D4AF37;
    --brass-light: #FFD700;
    --brass-dark: #B8860B;
    --black: #000000;
    --blood-red: #8B0000;
    --hot-pink: #FF1493;
    --lime: #39FF14;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">🤜</text></svg>') 16 16, auto;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Backgrounds */
.tiled-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    background:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="50" y="60" text-anchor="middle" font-size="40" opacity="0.15" fill="%23D4AF37">🤜</text></svg>'),
        repeating-linear-gradient(0deg, %23000 0px, %23000 2px, %23111 2px, %23111 4px);
    background-size: 100px 100px, 4px 4px;
}

.grunge-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.08"/></svg>');
    pointer-events: none;
}

.floating-knuckle {
    position: fixed;
    font-size: 60px;
    opacity: 0.6;
    animation: float 8s ease-in-out infinite;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
    pointer-events: none;
}
.floating-knuckle:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.floating-knuckle:nth-child(2) { top: 30%; right: 8%; animation-delay: -2s; transform: scaleX(-1); }
.floating-knuckle:nth-child(3) { top: 60%; left: 3%; animation-delay: -4s; }
.floating-knuckle:nth-child(4) { bottom: 20%; right: 5%; animation-delay: -6s; transform: scaleX(-1); }
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Header */
.header {
    background: linear-gradient(180deg, var(--brass) 0%, var(--brass-dark) 50%, #000 100%);
    padding: 10px;
    border-bottom: 5px ridge var(--brass);
    position: relative;
    overflow: hidden;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.logo-area { display: flex; align-items: center; gap: 15px; }
.logo-text {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: #000;
    text-shadow: 2px 2px 0 var(--brass-light), -1px -1px 0 var(--blood-red), 3px 3px 5px rgba(0,0,0,0.5);
    letter-spacing: -2px;
    text-decoration: none;
    display: block;
}
.logo-text span { color: var(--blood-red); animation: colorPulse 0.5s infinite alternate; }
@keyframes colorPulse { from { color: var(--blood-red); } to { color: #ff0000; } }
.tagline {
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    color: #000;
    background: var(--lime);
    padding: 2px 8px;
    transform: rotate(-2deg);
    display: inline-block;
    border: 2px dashed #000;
}
.nav-links { display: flex; gap: 5px; font-size: 0.75rem; flex-wrap: wrap; }
.nav-links a { color: #000; text-decoration: underline; font-weight: bold; }
.nav-links a:hover { color: var(--blood-red); }
.nav-links a.active { color: var(--blood-red); background: #000; padding: 1px 5px; border-radius: 3px; }

/* Marquee */
.marquee-container {
    background: var(--blood-red);
    border-top: 3px ridge var(--brass);
    border-bottom: 3px ridge var(--brass);
    overflow: hidden;
    padding: 5px 0;
}
.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 15s linear infinite;
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    color: var(--brass-light);
    text-shadow: 2px 2px 0 #000;
}
@keyframes marquee {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Layout */
.main-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}
.section-title {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    color: var(--brass);
    text-shadow: 3px 3px 0 var(--blood-red), -2px -2px 0 #000;
    text-align: center;
    margin-bottom: 10px;
    position: relative;
}
.section-title::before, .section-title::after { content: '🤜'; margin: 0 15px; }
.section-subtitle {
    text-align: center;
    font-family: 'Special Elite', monospace;
    color: var(--lime);
    margin-bottom: 25px;
    font-size: 0.95rem;
}
.section-divider {
    height: 30px;
    background: repeating-linear-gradient(90deg, var(--brass) 0px, var(--brass) 20px, #000 20px, #000 40px);
    margin: 30px 0;
    border: 3px ridge var(--brass);
    position: relative;
}
.section-divider::after {
    content: '⚡ BKG ⚡';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--blood-red);
    color: var(--brass-light);
    font-family: 'Bangers', cursive;
    font-size: 1rem;
    padding: 2px 20px;
    border: 3px double var(--brass);
}
.back-link {
    display: inline-block;
    font-family: 'Bangers', cursive;
    color: var(--brass-light);
    background: var(--blood-red);
    border: 3px outset var(--brass);
    padding: 5px 16px;
    text-decoration: none;
    letter-spacing: 1px;
    margin-bottom: 18px;
}
.back-link:hover { background: #a00000; box-shadow: 0 0 15px var(--brass); }

/* ============================================================
   DOWNLINE TREE (tree.html)
   ============================================================ */
.tree-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}
.tree-stat {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 3px ridge var(--brass);
    padding: 10px 18px;
    text-align: center;
    min-width: 110px;
}
.tree-stat-num {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: var(--brass-light);
    text-shadow: 2px 2px 0 var(--blood-red);
}
.tree-stat-label {
    font-family: 'Special Elite', monospace;
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
}

/* Kingpins leaderboard */
.kingpins {
    background: linear-gradient(135deg, #2a1a00 0%, #0a0500 100%);
    border: 4px ridge var(--brass-light);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
    padding: 16px;
    margin-bottom: 28px;
}
.kingpins-title {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--brass-light);
    text-shadow: 2px 2px 0 var(--blood-red);
    text-align: center;
    margin-bottom: 12px;
}
.kingpin-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.3);
}
.kingpin-row:last-child { border-bottom: none; }
.kingpin-rank { font-family: 'Bangers', cursive; font-size: 1.3rem; color: var(--brass); width: 38px; }
.kingpin-call { font-family: 'Bangers', cursive; font-size: 1.2rem; color: var(--brass-light); text-decoration: none; }
.kingpin-call:hover { text-shadow: 0 0 10px var(--brass); }
.kingpin-name { font-family: 'Comic Sans MS', cursive; font-size: 0.8rem; color: #888; flex: 1; }
.kingpin-count {
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    color: #000;
    background: var(--lime);
    padding: 2px 10px;
    border: 2px solid #000;
    white-space: nowrap;
}

/* Tree nodes (nested list) */
.tree-root { list-style: none; }
.tree-children { list-style: none; margin-left: 26px; border-left: 3px dotted var(--brass-dark); padding-left: 14px; }
.tree-node { margin: 8px 0; position: relative; }

.node-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #111;
    border: 3px ridge var(--brass);
    padding: 8px 12px;
    transition: all 0.2s;
}
.node-card:hover { box-shadow: 0 0 20px rgba(212, 175, 55, 0.5); transform: translateX(3px); }
.node-card.is-founder {
    background: linear-gradient(135deg, #2a1a00 0%, #0a0500 100%);
    border: 4px ridge var(--brass-light);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}
.node-toggle {
    font-family: 'Bangers', cursive;
    background: var(--blood-red);
    color: var(--brass-light);
    border: 2px outset var(--brass);
    width: 26px; height: 26px;
    line-height: 1;
    flex-shrink: 0;
    font-size: 1rem;
}
.node-toggle.leaf { visibility: hidden; }
.node-call {
    font-family: 'Bangers', cursive;
    font-size: 1.25rem;
    color: var(--brass);
    text-shadow: 1px 1px 0 var(--blood-red);
    text-decoration: none;
}
.node-call:hover { color: var(--brass-light); text-shadow: 1px 1px 0 var(--blood-red), 0 0 10px var(--brass); }
.node-num { font-family: 'Special Elite', monospace; font-size: 0.7rem; color: #666; }
.node-name { font-family: 'Comic Sans MS', cursive; font-size: 0.8rem; color: #888; flex: 1; }
.node-crown { font-size: 1rem; }
.node-downline {
    font-family: 'Special Elite', monospace;
    font-size: 0.7rem;
    color: var(--lime);
    border: 1px solid var(--lime);
    padding: 1px 7px;
    white-space: nowrap;
}
.node-collapsed > .tree-children { display: none; }
.tree-empty {
    text-align: center;
    font-family: 'Special Elite', monospace;
    color: #888;
    padding: 30px;
}

/* ---- View toggle (pyramid / list) ---- */
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 6px;
}
.view-btn {
    font-family: 'Bangers', cursive;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: var(--brass);
    background: #111;
    border: 3px outset var(--brass-dark);
    padding: 6px 18px;
}
.view-btn:hover { color: var(--brass-light); box-shadow: 0 0 12px rgba(212,175,55,0.4); }
.view-btn.is-active {
    color: #000;
    background: linear-gradient(180deg, var(--brass-light) 0%, var(--brass-dark) 100%);
    border-style: inset;
}

/* ============================================================
   DOWNLINE PYRAMID — top-down org chart, dollar-bill capstone
   ============================================================ */
.pyramid-view { margin-bottom: 10px; position: relative; }

/* Zoom controls (overlay, top-right of the pyramid) */
.zoom-controls {
    position: absolute;
    top: 34px;
    right: 12px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.72);
    border: 2px ridge var(--brass);
    padding: 4px 6px;
}
.zoom-btn {
    font-family: 'Bangers', cursive;
    font-size: 1.05rem;
    color: var(--brass-light);
    background: #111;
    border: 2px outset var(--brass-dark);
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    line-height: 1;
}
.zoom-btn:hover { color: #fff; box-shadow: 0 0 10px rgba(212,175,55,0.6); }
.zoom-btn:active { border-style: inset; }
.zoom-btn.zoom-fit { font-size: 0.8rem; letter-spacing: 1px; }
.zoom-level {
    font-family: 'Special Elite', monospace;
    font-size: 0.72rem;
    color: var(--brass);
    min-width: 44px;
    text-align: center;
}
.pyramid-stage { transform-origin: top center; }
.pyramid-hint {
    text-align: center;
    font-family: 'Special Elite', monospace;
    font-size: 0.72rem;
    color: #777;
    margin-bottom: 8px;
}
.pyramid-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 18px 0 24px;
    border: 3px ridge var(--brass);
    /* golden sunburst rays radiating from the apex (top-center) */
    background:
        repeating-conic-gradient(from 0deg at 50% 0%,
            rgba(212,175,55,0.07) 0deg 5deg, transparent 5deg 11deg),
        radial-gradient(120% 80% at 50% 0%, rgba(139,0,0,0.25) 0%, #050505 60%);
    cursor: grab;
}
.pyramid-scroll.is-grabbing { cursor: grabbing; }
.pyramid-stage {
    display: inline-block;
    min-width: 100%;
    padding: 0 30px;
}

/* Org-chart connectors (classic nested-ul tree) */
.ptree, .ptree ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding-top: 22px;
    position: relative;
}
.ptree { padding-top: 0; }
.pnode {
    position: relative;
    padding: 22px 10px 0;
    text-align: center;
}
/* connector lines up to the parent */
.pnode::before, .pnode::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    width: 50%;
    height: 22px;
    border-top: 3px solid var(--brass-dark);
}
.pnode::after {
    right: auto;
    left: 50%;
    border-left: 3px solid var(--brass-dark);
}
.pnode:first-child::before, .pnode:last-child::after { border: 0 none; }
.pnode:last-child::before { border-right: 3px solid var(--brass-dark); }
.pnode:only-child::before, .pnode:only-child::after { display: none; }
.pnode:only-child { padding-top: 22px; }
/* vertical drop from a parent down to its children row */
.ptree ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 22px;
    border-left: 3px solid var(--brass-dark);
}
/* the apex has no parent — kill its incoming connectors */
.pnode-apex::before, .pnode-apex::after { display: none; }
.pnode-apex { padding-top: 0; }
.pnode-collapsed > ul { display: none; }

/* Brick = a member node */
.pbrick {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 92px;
    background: linear-gradient(180deg, #1d1d1d 0%, #0a0a0a 100%);
    border: 3px ridge var(--brass);
    padding: 6px 10px;
    position: relative;
    transition: all 0.15s;
}
.pbrick.has-kids { cursor: pointer; }
.pbrick:hover { box-shadow: 0 0 18px rgba(212,175,55,0.55); transform: translateY(-2px); z-index: 5; }
.pbrick.is-founder {
    background: linear-gradient(180deg, #3a2600 0%, #0a0500 100%);
    border: 4px ridge var(--brass-light);
    box-shadow: 0 0 22px rgba(212,175,55,0.5);
}
.pbrick-crown { position: absolute; top: -14px; font-size: 1rem; }
.pbrick-call {
    font-family: 'Bangers', cursive;
    font-size: 1.05rem;
    color: var(--brass);
    text-shadow: 1px 1px 0 var(--blood-red);
    text-decoration: none;
    line-height: 1.1;
}
.pbrick.is-founder .pbrick-call { color: var(--brass-light); }
.pbrick-call:hover { color: var(--brass-light); text-shadow: 1px 1px 0 var(--blood-red), 0 0 8px var(--brass); }
.pbrick-num { font-family: 'Special Elite', monospace; font-size: 0.6rem; color: #777; }
.pbrick-name {
    font-family: 'Comic Sans MS', cursive;
    font-size: 0.6rem;
    color: #888;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pbrick-down {
    margin-top: 2px;
    font-family: 'Special Elite', monospace;
    font-size: 0.58rem;
    color: #000;
    background: var(--lime);
    border: 1px solid #000;
    padding: 0 6px;
}
.pnode-collapsed > .pbrick.has-kids::after {
    content: '▸ ' attr(data-kids);
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Special Elite', monospace;
    font-size: 0.6rem;
    color: var(--brass);
    white-space: nowrap;
}

/* Capstone — the all-seeing-eye apex */
.capstone {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 10px 8px;
    filter: drop-shadow(0 0 14px rgba(212,175,55,0.7));
    animation: capstonePulse 2.4s ease-in-out infinite;
}
@keyframes capstonePulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(212,175,55,0.5)); }
    50% { filter: drop-shadow(0 0 22px rgba(212,175,55,0.9)); }
}
.capstone-eye { width: 92px; height: 74px; display: block; }
.capstone-label {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--brass-light);
    text-shadow: 2px 2px 0 var(--blood-red);
    letter-spacing: 2px;
    margin-top: -6px;
}
.capstone-sub {
    font-family: 'Special Elite', monospace;
    font-size: 0.55rem;
    color: var(--brass);
    letter-spacing: 1px;
}

/* ============================================================
   RECRUIT FORM (recruit.html)
   ============================================================ */
.recruit-form {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 4px ridge var(--brass);
    padding: 22px;
    max-width: 640px;
    margin: 0 auto;
}
.form-fieldset { border: 2px dashed var(--brass-dark); padding: 14px; margin-bottom: 18px; }
.form-legend {
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    color: var(--brass-light);
    text-shadow: 2px 2px 0 var(--blood-red);
    padding: 0 8px;
}
.form-row { margin-bottom: 12px; }
.form-row label {
    display: block;
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    color: var(--brass);
    margin-bottom: 4px;
    text-transform: uppercase;
}
.form-row label .req { color: var(--hot-pink); }
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    font-family: 'Comic Sans MS', cursive;
    font-size: 0.95rem;
    padding: 8px;
    background: #000;
    color: var(--lime);
    border: 3px inset #444;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--brass-light);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
.form-hint { font-size: 0.7rem; color: #777; font-family: 'Special Elite', monospace; margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.submit-btn {
    display: block;
    width: 100%;
    font-family: 'Bangers', cursive;
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: var(--brass-light);
    background: linear-gradient(180deg, var(--blood-red) 0%, #5a0000 100%);
    border: 4px outset var(--brass);
    padding: 12px;
    text-shadow: 2px 2px 0 #000;
    transition: all 0.2s;
}
.submit-btn:hover { background: linear-gradient(180deg, #b00000 0%, #6a0000 100%); box-shadow: 0 0 25px var(--brass); }
.submit-btn:active { border-style: inset; }
.submit-btn:disabled { opacity: 0.5; }

.form-note {
    font-family: 'Special Elite', monospace;
    font-size: 0.78rem;
    color: #999;
    background: #000;
    border: 2px solid var(--brass-dark);
    padding: 12px;
    margin-bottom: 18px;
    line-height: 1.5;
}
.form-success {
    display: none;
    text-align: center;
    background: linear-gradient(135deg, #0a2a0a 0%, #001500 100%);
    border: 4px ridge var(--lime);
    padding: 30px;
    max-width: 640px;
    margin: 0 auto;
}
.form-success.show { display: block; }
.form-success h2 {
    font-family: 'Bangers', cursive;
    font-size: 2.2rem;
    color: var(--lime);
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 12px;
}
.form-success p { font-family: 'Comic Sans MS', cursive; color: #ccc; margin-bottom: 8px; }
.config-warning {
    background: var(--blood-red);
    color: var(--brass-light);
    border: 3px dashed var(--brass);
    padding: 12px;
    margin-bottom: 18px;
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    text-align: center;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, var(--brass-dark) 0%, #000 100%);
    border-top: 5px ridge var(--brass);
    padding: 20px;
    text-align: center;
}
.footer-text { font-family: 'Special Elite', monospace; color: var(--brass); font-size: 0.8rem; margin-bottom: 10px; }
.footer-links { margin-bottom: 5px; }
.footer-links a { color: var(--brass-light); font-family: 'Comic Sans MS', cursive; font-size: 0.9rem; margin: 0 10px; text-decoration: underline; }

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.8rem; }
    .logo-text { font-size: 1.5rem; }
    .node-name { display: none; }
}
