
.fighter-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* New Clean Header */
.fighter-header-clean {
    background: #000000;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Killmarks pinned to top-right of header */
.killmarks-top{ position:absolute; top:10px; right:12px; display:flex; gap:6px; align-items:center; }
.killmarks-top.few .kill-skull{ font-size:2rem; }
.killmarks-top.some .kill-skull{ font-size:1.4rem; }
.killmarks-top.many .kill-skull{ font-size:1.1rem; }

.fighter-title h2 {
    font-size: 2.5rem;
    margin: 0 0 12px 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.fighter-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.team-badge, .class-badge, .creator-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-badge {
    background: #1a1a1a;
    color: #4ecdc4;
    border: 1px solid #4ecdc4;
}

.class-badge {
    background: #1a1a1a;
    color: #ffd700;
    border: 1px solid #ffd700;
}

.creator-badge {
    background: #1a1a1a;
    color: #ff6b9d;
    border: 1px solid #ff6b9d;
    font-size: 0.8rem;
}

.fighter-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.record-display {
    display: flex;
    gap: 16px;
    align-items: center;
}

.record-label {
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 2px;
    font-weight: 700;
}

.record-value {
    display: flex;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: bold;
}

.wins-num { color: #00ff00; }
.losses-num { color: #ff4444; }
.draws-num { color: #ffaa00; }

.killmarks { display:flex; align-items:center; gap:6px; margin-left:12px; }
.kill-skull { filter: drop-shadow(0 0 6px rgba(255,255,255,0.15)); }

/* Postmortem highlight reused from schedule (for past fight victims) */
.postmortem-name{
    color:#ff5f5f !important;
    text-shadow:0 0 6px rgba(255,95,95,0.45), 0 0 18px rgba(255,71,71,0.40);
    display:inline-block;
    animation:postmortemShake 400ms steps(2) infinite, postmortemPulse 2000ms ease-in-out infinite;
}
@keyframes postmortemShake{
    0%{ transform:translate(0,0) rotate(0deg); }
    25%{ transform:translate(-1px,-0.5px) rotate(-0.2deg); }
    50%{ transform:translate(1px,0.5px) rotate(0.2deg); }
    75%{ transform:translate(-0.5px,1px) rotate(-0.1deg); }
    100%{ transform:translate(0,0) rotate(0deg); }
}
@keyframes postmortemPulse{
    0%{ opacity:0.35; }
    50%{ opacity:0.8; }
    100%{ opacity:0.35; }
}

.status-badge {
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.status-badge.alive {
    background: #0a3d0a;
    color: #00ff00;
    border: 1px solid #00ff00;
}

.status-badge.dead {
    background: #3d0a0a;
    color: #ff4444;
    border: 1px solid #ff4444;
    box-shadow: 0 0 6px rgba(255, 68, 68, 0.15);
}

.status-badge.undead {
    background: #2a1033; /* dark lavender */
    color: #c4b5fd;      /* lavender text */
    border: 1px solid #a78bfa;
    position: relative;
}

/* Sickly zombie effect: faint inner glow plus slow pulse of lavender-green tint */
@keyframes undeadPulseBadge {
    0% { box-shadow: inset 0 0 0 0 rgba(196,181,253,0.25), 0 0 0 0 rgba(0,255,128,0.0); }
    50% { box-shadow: inset 0 0 12px 2px rgba(196,181,253,0.35), 0 0 10px 2px rgba(0,255,128,0.08); }
    100% { box-shadow: inset 0 0 0 0 rgba(196,181,253,0.25), 0 0 0 0 rgba(0,255,128,0.0); }
}

.status-badge.undead {
    animation: undeadPulseBadge 2200ms ease-in-out infinite;
}

/* Top Grid: Avatar (col 1) + Lore (col 2-3) */
.fighter-top-grid {
    display: grid;
    grid-template-columns: 300px 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.lore-wide {
    grid-column: span 2;
}

/* Stats Grid */
.fighter-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.fighter-main-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Profile Cards */
.profile-card {
    background: #000000;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}

.card-header h3 {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
}

.edit-btn {
    background: none;
    border: 1px solid #666;
    color: #aaa;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: #1a1a1a;
    border-color: #fff;
    color: #fff;
}

/* Avatar Card */
.avatar-card .avatar-display {
    text-align: center;
    margin-bottom: 12px;
}

.fighter-avatar-large {
    max-width: 100%;
    height: auto;
    border: 2px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.avatar-edit {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.avatar-edit.open {
    display: block;
}

/* Lore Card */
.lore-text {
    color: #ddd;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.lore-edit {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.lore-edit.open {
    display: block;
}

.lore-textarea {
    width: 100%;
    min-height: 150px;
    background: #1a1a1a;
    border: 1px solid #555;
    color: #fff;
    padding: 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

/* Form Styling */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 0.9rem;
}

.file-input {
    display: block;
    width: 100%;
    padding: 8px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    gap: 10px;
}

.clear-form {
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 900px) {
    .fighter-top-grid {
        grid-template-columns: 1fr;
    }
    
    .lore-wide {
        grid-column: span 1;
    }
    
    .fighter-status-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Fighter Header */
.fighter-header {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    align-items: start;
    background: #000000;
    border: 2px solid #ffffff;
    padding: 32px;
    margin-bottom: 28px;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

/* Fighter name section */
.fighter-name-section h2 {
    font-size: 3rem;
    margin: 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.fighter-name-section .team {
    color: #ccc;
    font-size: 1.2rem;
    margin: 5px 0;
    font-style: italic;
}

.fighter-name-section .fighter-class {
    color: #ffd700;
    font-size: 1rem;
    margin: 5px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.fighter-name-section .creator-info {
    color: #4ecdc4;
    font-size: 0.9rem;
    margin: 8px 0 0 0;
    font-style: italic;
    opacity: 0.9;
}

.fighter-record {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-box {
    background: #000000;
    border: 1px solid #ffffff;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.record-box h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    color: #cccccc;
}

.record-numbers {
    display: flex;
    gap: 15px;
    font-size: 1.4rem;
    font-weight: bold;
}

.wins { color: #00ff00; }
.losses { color: #ff4444; }
.draws { color: #ffaa00; }

.status-box {
    text-align: center;
}

.status-alive, .status-dead {
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.status-alive {
    background: #004400;
    color: #00ff00;
    border: 1px solid #00ff00;
}

.status-dead {
    background: #440000;
    color: #ff4444;
    border: 1px solid #ff4444;
}

/* Avatar embedded in header */
.fighter-avatar-section {
    width: 100%;
    background: #000000;
    border: 1px solid #222222;
    border-radius: 6px;
    padding: 16px;
    grid-column: 1 / -1; /* span full width under the two columns */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.fighter-avatar-section h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1rem;
    border-bottom: 1px solid #333333;
    padding-bottom: 8px;
    text-align: left;
}

.avatar-header h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin: 0;
}

.avatar-edit-toggle {
    background: #111;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.avatar-edit-toggle:hover {
    background: #1a1a1a;
    border-color: #666;
}

.avatar-actions .cta,
.avatar-actions .cta-secondary {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    border-radius: 8px;
}

/* Lore embedded in header */
.fighter-lore {
    width: 100%;
    background: #000000;
    border: 1px solid #222222;
    border-radius: 6px;
    padding: 16px;
    grid-column: 1 / -1; /* span full width under the two columns */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.fighter-lore h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1rem;
    border-bottom: 1px solid #333333;
    padding-bottom: 8px;
    text-align: left;
}

.lore-header h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin: 0;
}

.lore-edit-toggle {
    background: #111;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.lore-edit-toggle:hover {
    background: #1a1a1a;
    border-color: #666;
}

.fighter-lore .lore-text {
    color: #e6e6e6;
    line-height: 1.7;
    font-size: 1.05rem;
    font-family: 'Times New Roman', serif;
    white-space: pre-wrap;
}

.fighter-lore .lore-edit h4 {
    margin: 0 0 8px 0;
    color: #ffaa00;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.fighter-lore .lore-edit textarea {
    width: 100%;
    padding: 12px 14px;
    background: #000000;
    color: #ffffff;
    border: 1px solid #555555;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Times New Roman', serif;
    resize: vertical;
    min-height: 120px;
}

.fighter-lore .lore-edit textarea:focus {
    outline: none;
    border-color: #ffaa00;
    box-shadow: 0 0 0 2px rgba(255, 170, 0, 0.15);
}

.lore-actions .cta,
.lore-actions .cta-secondary {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    border-radius: 8px;
}

.cta-secondary {
    background: #222;
    color: #fff;
    border: 1px solid #555;
}

.cta-secondary:hover {
    background: #2a2a2a;
    border-color: #777;
}

/* Responsive header layout improvements */
@media (max-width: 992px) {
    .fighter-header {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 24px;
    }
    .fighter-record {
        text-align: center;
        align-items: center;
    }
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.stats-card {
    background: #000000;
    border: 1px solid #444444;
    border-radius: 8px;
    padding: 25px;
}

.stats-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 10px;
}

/* Combat Stats with Bars */
.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-label {
    min-width: 100px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.stat-bar {
    flex: 1;
    height: 24px;
    background: #333333;
    border: 1px solid #666666;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: #000000;
    transition: width 0.3s ease;
}

/* Red-orange colors for each stat */
.stat-row:nth-child(1) .stat-fill { /* Strength */
    background: #ff4400;
}

.stat-row:nth-child(2) .stat-fill { /* Speed */
    background: #ff6600;
}

.stat-row:nth-child(3) .stat-fill { /* Endurance */
    background: #ff8800;
}

.stat-row:nth-child(4) .stat-fill { /* Technique */
    background: #ffaa00;
}

.stat-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 0.9rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px #000000, -1px -1px 2px #000000;
    z-index: 10;
}

/* Chaos Stats Grid */
.chaos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.chaos-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    background: #000000;
    border: 1px solid #333333;
    border-radius: 4px;
}

.chaos-label {
    font-size: 0.8rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chaos-value {
    font-weight: bold;
    font-size: 1rem;
    color: #ffffff;
}

/* Redacted styling */
.redacted-item {
    opacity: 0.6;
    border: 1px solid #444444 !important;
    background: #111111 !important;
}

.redacted-value {
    color: #666666 !important;
    font-family: monospace;
    letter-spacing: 2px;
}

/* Actions */
.fighter-actions {
    text-align: center;
    margin-top: 30px;
}

.lineage-card {
    background: #040404;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

.lineage-header {
    align-items: center;
    gap: 12px;
}

.license-pill {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.license-pill.active {
    border-color: rgba(255,92,126,0.8);
    color: #ff5c7e;
    box-shadow: 0 0 18px rgba(255,92,126,0.25);
}

.license-pill.pending {
    border-style: dashed;
}

.license-pill a {
    color: inherit;
    text-decoration: none;
    margin-left: 4px;
}

.lineage-text {
    margin-top: 20px;
    padding: 22px 26px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(130deg, rgba(255,255,255,0.02), rgba(255,255,255,0.08));
    box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
}

.lineage-tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
}

.lineage-tree-list > li {
    position: relative;
    margin: 14px 0;
    padding-left: 18px;
}

.lineage-tree-list > li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 2px;
    color: #ff5c7e;
    font-size: 1.15rem;
    line-height: 1;
}

.lineage-tree-list ul {
    list-style: none;
    margin: 10px 0 0;
    padding-left: 26px;
    border-left: 1px dashed rgba(255,255,255,0.18);
}

.lineage-tree-list ul li {
    position: relative;
    margin: 10px 0;
    padding-left: 14px;
}

.lineage-tree-list ul li::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 14px;
    width: 18px;
    height: 1px;
    background: rgba(255,255,255,0.18);
}

.node-link {
    color: #f0fff6;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.node-link:hover {
    text-shadow: 0 0 12px rgba(255,255,255,0.45);
}

.ancestor-link {
    color: #7dffd1;
}

.hybrid-link {
    color: #ff5c7e;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.descendant-link {
    color: #ffd394;
}

.lineage-meta {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    letter-spacing: 0.08em;
}

.lineage-meta-note {
    font-style: italic;
    color: rgba(255,255,255,0.5);
    margin-top: 8px;
}

.lineage-empty {
    border: 1px dashed rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 12px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    background: rgba(0,0,0,0.35);
}

.fighter-championships {
    margin-top: 20px;
    padding: 20px;
    background: #000000;
    border: 1px solid #444444;
    border-radius: 8px;
    text-align: left;
}

.champion-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffaa00, #ff6f00);
    color: #000;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

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

.champion-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid #222;
    font-size: 0.95rem;
}

.champion-list li:first-child {
    border-top: none;
}

.champion-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.champion-right {
    font-weight: bold;
    color: #ffaa00;
    white-space: nowrap;
}

.champion-list a {
    color: #ffaa00;
    text-decoration: none;
    font-weight: bold;
}

.champion-list a:hover {
    text-decoration: underline;
}

.champion-meta {
    color: #cccccc;
    font-style: italic;
    margin-left: 0;
    font-size: 0.85rem;
}

.back-button {
    display: inline-block;
    padding: 12px 25px;
    background: #222222;
    border: 2px solid #ffffff;
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: #ffffff;
    color: #000000;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 50px;
    background: #222222;
    border: 1px solid #444444;
    border-radius: 8px;
}

.error-message h2 {
    color: #ff4444;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fighter-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .fighter-record {
        text-align: center;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chaos-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .stat-label {
        min-width: auto;
    }

    .champion-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .champion-right {
        align-self: flex-end;
    }
} 

/* --- Fighter Page Navigation Arrows (match fight page) --- */
.fight-nav-left,
.fight-nav-right{
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}
.fight-nav-left{ left: 15px; }
.fight-nav-right{ right: 15px; }
.nav-arrow{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #000000;
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}
.nav-arrow:hover{ background:#333; transform: translateY(-50%) scale(1.1); }