/**
 * Content Distinction CSS - Polished Version
 * Visual styling to differentiate official content from user-contributed content
 * Includes entity type-specific accents and type-specific icons
 *
 * Features:
 * - Official vs Community content distinction
 * - Entity type color accents (deity, hero, creature, item, place)
 * - Type-specific icons and badges
 * - Text truncation with expand functionality
 * - Ability pills with overflow handling
 * - Responsive design
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES - Content Distinction Design Tokens
   ============================================================================ */

:root {
    /* Official Content Colors */
    --color-official: #6366f1;
    --color-official-rgb: 99, 102, 241;
    --color-official-light: rgba(99, 102, 241, 0.15);
    --color-official-border: rgba(99, 102, 241, 0.4);

    /* Community Content Colors */
    --color-community: #9333ea;
    --color-community-rgb: 147, 51, 234;
    --color-community-light: rgba(147, 51, 234, 0.15);
    --color-community-border: rgba(147, 51, 234, 0.4);

    /* Entity Type Colors */
    --color-deity: #FFD700;
    --color-deity-rgb: 255, 215, 0;
    --color-hero: #CD7F32;
    --color-hero-rgb: 205, 127, 50;
    --color-creature: #4CAF50;
    --color-creature-rgb: 76, 175, 80;
    --color-item: #C0C0C0;
    --color-item-rgb: 192, 192, 192;
    --color-place: #8B4513;
    --color-place-rgb: 139, 69, 19;
    --color-text-entity: #607D8B;
    --color-symbol: #9C27B0;
    --color-ritual: #795548;
    --color-herb: #8BC34A;

    /* Text Truncation */
    --truncate-lines-default: 4;
    --truncate-lines-compact: 2;
    --truncate-lines-ability: 1;

    /* Transition */
    --content-transition: 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================================================
   OFFICIAL CONTENT STYLING
   ============================================================================ */

.entity-card.official,
.content-card.official,
.entity-card--deity.official,
.entity-card--hero.official,
.entity-card--creature.official,
.entity-card--item.official,
.entity-card--place.official {
    position: relative;
    border-left: 4px solid var(--color-official);
}

.entity-card.official::before,
.content-card.official::before {
    content: "Official";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: linear-gradient(135deg, var(--color-official), rgba(var(--color-official-rgb), 0.8));
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   USER-SUBMITTED / COMMUNITY CONTENT STYLING
   ============================================================================ */

.entity-card.user-submitted,
.content-card.user-submitted,
.entity-card--deity.user-submitted,
.entity-card--hero.user-submitted,
.entity-card--creature.user-submitted,
.entity-card--item.user-submitted,
.entity-card--place.user-submitted {
    position: relative;
    border-left: 4px solid var(--color-community);
}

.entity-card.user-submitted::before,
.content-card.user-submitted::before {
    content: "Community";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: linear-gradient(135deg, var(--color-community), rgba(var(--color-community-rgb), 0.8));
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   ENTITY TYPE CARD VARIATIONS
   ============================================================================ */

/* Deity - Golden Accent */
.entity-card--deity {
    --entity-accent: var(--color-deity);
    --entity-accent-rgb: var(--color-deity-rgb);
    border-color: rgba(var(--color-deity-rgb), 0.4);
}

.entity-card--deity::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-deity), rgba(var(--color-deity-rgb), 0.4));
    opacity: 0;
    transition: opacity var(--content-transition);
}

.entity-card--deity:hover::after {
    opacity: 1;
}

.entity-card--deity .entity-type-badge {
    background: linear-gradient(135deg, rgba(var(--color-deity-rgb), 0.25), rgba(var(--color-deity-rgb), 0.15));
    border-color: rgba(var(--color-deity-rgb), 0.6);
    color: var(--color-deity);
}

/* Hero - Bronze Accent */
.entity-card--hero {
    --entity-accent: var(--color-hero);
    --entity-accent-rgb: var(--color-hero-rgb);
    border-color: rgba(var(--color-hero-rgb), 0.4);
}

.entity-card--hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-hero), rgba(var(--color-hero-rgb), 0.4));
    opacity: 0;
    transition: opacity var(--content-transition);
}

.entity-card--hero:hover::after {
    opacity: 1;
}

.entity-card--hero .entity-type-badge,
.entity-type-badge--hero {
    background: linear-gradient(135deg, rgba(var(--color-hero-rgb), 0.25), rgba(var(--color-hero-rgb), 0.15));
    border-color: rgba(var(--color-hero-rgb), 0.6);
    color: var(--color-hero);
}

/* Creature - Green Accent */
.entity-card--creature {
    --entity-accent: var(--color-creature);
    --entity-accent-rgb: var(--color-creature-rgb);
    border-color: rgba(var(--color-creature-rgb), 0.4);
}

.entity-card--creature::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-creature), rgba(var(--color-creature-rgb), 0.4));
    opacity: 0;
    transition: opacity var(--content-transition);
}

.entity-card--creature:hover::after {
    opacity: 1;
}

.entity-card--creature .entity-type-badge {
    background: linear-gradient(135deg, rgba(var(--color-creature-rgb), 0.25), rgba(var(--color-creature-rgb), 0.15));
    border-color: rgba(var(--color-creature-rgb), 0.6);
    color: var(--color-creature);
}

/* Item - Silver Accent */
.entity-card--item {
    --entity-accent: var(--color-item);
    --entity-accent-rgb: var(--color-item-rgb);
    border-color: rgba(var(--color-item-rgb), 0.4);
}

.entity-card--item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-item), rgba(var(--color-item-rgb), 0.4));
    opacity: 0;
    transition: opacity var(--content-transition);
}

.entity-card--item:hover::after {
    opacity: 1;
}

.entity-card--item .entity-type-badge {
    background: linear-gradient(135deg, rgba(var(--color-item-rgb), 0.25), rgba(var(--color-item-rgb), 0.15));
    border-color: rgba(var(--color-item-rgb), 0.6);
    color: var(--color-item);
}

/* Place - Earth Tones */
.entity-card--place {
    --entity-accent: var(--color-place);
    --entity-accent-rgb: var(--color-place-rgb);
    border-color: rgba(var(--color-place-rgb), 0.4);
}

.entity-card--place::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-place), rgba(var(--color-place-rgb), 0.4));
    opacity: 0;
    transition: opacity var(--content-transition);
}

.entity-card--place:hover::after {
    opacity: 1;
}

.entity-card--place .entity-type-badge {
    background: linear-gradient(135deg, rgba(var(--color-place-rgb), 0.25), rgba(var(--color-place-rgb), 0.15));
    border-color: rgba(var(--color-place-rgb), 0.6);
    color: #D2691E;
}

/* ============================================================================
   TYPE-SPECIFIC ICONS
   ============================================================================ */

.entity-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
    line-height: 1;
}

/* Deity Icons - temple/lightning theme */
.entity-type-icon--deity::before {
    content: "\26A1"; /* Lightning bolt */
}

/* Hero Icons - sword/shield theme */
.entity-type-icon--hero::before {
    content: "\2694\FE0F"; /* Crossed swords */
}

/* Creature Icons - dragon/beast theme */
.entity-type-icon--creature::before {
    content: "\1F409"; /* Dragon */
}

/* Item Icons - artifact glow theme */
.entity-type-icon--item::before {
    content: "\2728"; /* Sparkles */
}

/* Place Icons - mountain/temple theme */
.entity-type-icon--place::before {
    content: "\1F3DB\FE0F"; /* Temple */
}

/* ============================================================================
   CONTENT SOURCE BADGE (Used in detail views)
   ============================================================================ */

.content-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all var(--content-transition);
}

.content-source-badge--official {
    background: var(--color-official-light);
    border: 1px solid var(--color-official-border);
    color: var(--color-official);
}

.content-source-badge--community {
    background: var(--color-community-light);
    border: 1px solid var(--color-community-border);
    color: var(--color-community);
}

.content-source-badge .badge-icon {
    font-size: 0.9rem;
}

.content-source-badge .badge-author {
    opacity: 0.8;
    font-weight: 400;
    font-style: italic;
}

/* ============================================================================
   CONTENT AUTHOR BADGE
   ============================================================================ */

.content-author-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all var(--content-transition);
}

.content-author-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

.content-author-badge .author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.content-author-badge .author-name {
    color: var(--color-text-secondary, rgba(255, 255, 255, 0.7));
    font-weight: 500;
}

.content-author-badge .author-level {
    padding: 0.1rem 0.35rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.content-author-badge .author-level.newcomer { color: #9ca3af; }
.content-author-badge .author-level.member { color: #60a5fa; }
.content-author-badge .author-level.contributor { color: #34d399; }
.content-author-badge .author-level.expert { color: #fbbf24; }
.content-author-badge .author-level.master { color: #f472b6; }
.content-author-badge .author-level.legend { color: #c084fc; }

/* ============================================================================
   TEXT TRUNCATION SYSTEM
   ============================================================================ */

/* Default truncation - 4 lines */
.section-prose--truncated,
.card-content--truncated,
.biography-card-content--truncated,
.deed-description--truncated,
.legacy-card-content--truncated,
.hero-description--truncated,
.creature-description--truncated,
.encounter-description--truncated,
.encounter-text--truncated,
.relationship-description--truncated,
.item-description--truncated {
    display: -webkit-box;
    -webkit-line-clamp: var(--truncate-lines-default, 4);
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact truncation - 2 lines */
[data-max-lines="2"] {
    -webkit-line-clamp: 2 !important;
}

/* Single line truncation for abilities */
.ability-pill-text,
.ability-description--truncated {
    display: -webkit-box;
    -webkit-line-clamp: var(--truncate-lines-ability, 1);
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Expandable prose */
.section-prose--expandable {
    position: relative;
    transition: max-height 0.4s ease;
}

.section-prose--expandable.collapsed {
    max-height: 8em;
    overflow: hidden;
}

.section-prose--expandable.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3em;
    background: linear-gradient(transparent, var(--color-surface, #1a1f3a));
    pointer-events: none;
}

.prose-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--content-transition);
}

.prose-expand-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

/* ============================================================================
   ABILITY PILLS SYSTEM (max 5 visible)
   ============================================================================ */

.abilities-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ability-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: rgba(var(--color-creature-rgb), 0.15);
    border: 1px solid rgba(var(--color-creature-rgb), 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-text-primary, #e5e7eb);
    transition: all var(--content-transition);
    animation: pillFadeIn 0.3s ease backwards;
    animation-delay: var(--animation-delay, 0s);
}

.ability-pill:hover {
    background: rgba(var(--color-creature-rgb), 0.25);
    border-color: rgba(var(--color-creature-rgb), 0.5);
    transform: translateY(-2px);
}

.ability-pill-icon {
    font-size: 1rem;
    line-height: 1;
}

.ability-pill-text {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ability-pill--hidden {
    display: none;
}

.abilities-hidden {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.abilities-hidden[aria-hidden="false"] {
    display: flex;
}

.abilities-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding: 0.4rem 0.85rem;
    background: transparent;
    border: 1px solid rgba(var(--color-creature-rgb), 0.3);
    border-radius: 6px;
    color: var(--color-creature);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--content-transition);
}

.abilities-expand-btn:hover {
    background: rgba(var(--color-creature-rgb), 0.1);
    border-color: rgba(var(--color-creature-rgb), 0.5);
}

.abilities-expand-btn .expand-icon {
    transition: transform var(--content-transition);
}

.ability-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-left: 0.5rem;
    opacity: 0.7;
}

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

/* ============================================================================
   QUICK INFO BAR
   ============================================================================ */

.quick-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.4s ease backwards;
    animation-delay: var(--animation-delay, 0s);
}

.quick-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all var(--content-transition);
}

.quick-info-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.quick-info-icon {
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.8;
}

.quick-info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.quick-info-value {
    font-size: 0.85rem;
    color: var(--color-text-primary);
    font-weight: 500;
}

/* Danger level styling */
.quick-info-item--extreme {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.quick-info-item--extreme .quick-info-value {
    color: #ef4444;
}

.quick-info-item--high {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
}
.quick-info-item--high .quick-info-value {
    color: #f97316;
}

.quick-info-item--moderate {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
}
.quick-info-item--moderate .quick-info-value {
    color: #eab308;
}

.quick-info-item--low {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.quick-info-item--low .quick-info-value {
    color: #22c55e;
}

/* ============================================================================
   CREATURE TYPE BADGES
   ============================================================================ */

.creature-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: rgba(var(--color-creature-rgb), 0.2);
    border: 1px solid rgba(var(--color-creature-rgb), 0.4);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-creature);
    text-transform: capitalize;
}

.creature-type-badge .badge-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Specific creature type colors */
.creature-type-badge--dragon { --badge-color: #ef4444; color: #ef4444; border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.15); }
.creature-type-badge--serpent { --badge-color: #22c55e; color: #22c55e; border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.15); }
.creature-type-badge--chimera { --badge-color: #a855f7; color: #a855f7; border-color: rgba(168, 85, 247, 0.4); background: rgba(168, 85, 247, 0.15); }
.creature-type-badge--beast { --badge-color: #8b5a2b; color: #d4a76a; border-color: rgba(139, 90, 43, 0.4); background: rgba(139, 90, 43, 0.15); }
.creature-type-badge--undead { --badge-color: #6b7280; color: #9ca3af; border-color: rgba(107, 114, 128, 0.4); background: rgba(107, 114, 128, 0.15); }
.creature-type-badge--spirit { --badge-color: #60a5fa; color: #60a5fa; border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.15); }
.creature-type-badge--divine { --badge-color: #fbbf24; color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.15); }

/* ============================================================================
   MYTHOLOGY BADGE - PROMINENT DISPLAY
   ============================================================================ */

.mythology-badge--prominent {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: rgba(var(--entity-accent-rgb, 139, 127, 255), 0.2);
    border: 1px solid rgba(var(--entity-accent-rgb, 139, 127, 255), 0.4);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--entity-accent, #8b7fff);
}

.mythology-badge--prominent .badge-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* ============================================================================
   OVERLAY FIELD INDICATORS (Perspective/Custom Fields)
   ============================================================================ */

.entity-field[data-overlayed="true"] {
    position: relative;
    border-left: 3px solid var(--color-perspective, #9b59b6);
    padding-left: 1rem;
    margin-left: -1rem;
}

.entity-field[data-overlayed="true"]::before {
    content: "\1F4DD"; /* Memo */
    position: absolute;
    left: -1.25rem;
    top: 0;
    font-size: 0.75rem;
    opacity: 0.8;
}

.perspective-custom-field {
    background: linear-gradient(135deg,
        rgba(155, 89, 182, 0.05),
        rgba(155, 89, 182, 0.1)
    );
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.perspective-custom-field::before {
    content: "Custom Insight";
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9b59b6;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.perspective-custom-field .field-label {
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.perspective-custom-field .field-value {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ============================================================================
   CONTENT SOURCE TOGGLE
   ============================================================================ */

.content-source-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.content-source-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.content-source-toggle input[type="checkbox"] {
    position: relative;
    width: 40px;
    height: 22px;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    cursor: pointer;
    transition: background var(--content-transition);
}

.content-source-toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform var(--content-transition);
}

.content-source-toggle input[type="checkbox"]:checked {
    background: var(--color-official);
}

.content-source-toggle input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}

.content-source-toggle .toggle-text {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* ============================================================================
   CONTRIBUTION INDICATOR
   ============================================================================ */

.contribution-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.8rem;
}

.contribution-indicator .indicator-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.contribution-indicator.official .indicator-icon {
    background: var(--color-official);
    box-shadow: 0 0 6px var(--color-official);
}

.contribution-indicator.community .indicator-icon {
    background: var(--color-community);
    box-shadow: 0 0 6px var(--color-community);
}

.contribution-indicator.verified .indicator-icon {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.contribution-indicator .indicator-text {
    color: var(--color-text-secondary);
}

/* ============================================================================
   APPROVAL STATUS BADGES
   ============================================================================ */

.approval-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.approval-badge.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.approval-badge.approved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.approval-badge.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.approval-badge.flagged {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.approval-badge .badge-icon {
    font-size: 0.75rem;
}

/* ============================================================================
   CONTENT FILTER PILLS
   ============================================================================ */

.content-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.content-filter-pill {
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--content-transition);
}

.content-filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}

.content-filter-pill.active {
    background: var(--color-official);
    border-color: var(--color-official);
    color: white;
}

.content-filter-pill .pill-count {
    display: inline-block;
    min-width: 1rem;
    text-align: center;
    margin-left: 0.35rem;
    padding: 0.1rem 0.3rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ============================================================================
   USER VS OFFICIAL COMPARISON VIEW
   ============================================================================ */

.content-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.content-comparison .comparison-column {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.content-comparison .comparison-column.official {
    border: 1px solid rgba(var(--color-official-rgb), 0.3);
}

.content-comparison .comparison-column.user {
    border: 1px solid rgba(var(--color-community-rgb), 0.3);
}

.content-comparison .column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-comparison .column-header .header-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.content-comparison .official .header-badge {
    background: var(--color-official);
    color: white;
}

.content-comparison .user .header-badge {
    background: var(--color-community);
    color: white;
}

.content-comparison .column-content {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Highlight differences */
.content-comparison .diff-added {
    background: rgba(34, 197, 94, 0.15);
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

.content-comparison .diff-removed {
    background: rgba(239, 68, 68, 0.15);
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    text-decoration: line-through;
}

/* ============================================================================
   DEEDS COUNT & SECTION HEADERS
   ============================================================================ */

.deeds-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-left: 0.75rem;
    opacity: 0.7;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

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

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .content-comparison {
        grid-template-columns: 1fr;
    }

    .entity-card.official::before,
    .entity-card.user-submitted::before,
    .content-card.official::before,
    .content-card.user-submitted::before {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }

    .quick-info-bar {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .quick-info-item {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
        padding: 0.4rem 0.5rem;
    }

    .quick-info-label {
        font-size: 0.6rem;
    }

    .quick-info-value {
        font-size: 0.75rem;
    }

    .abilities-pills-container {
        gap: 0.35rem;
    }

    .ability-pill {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .ability-pill-text {
        max-width: 100px;
    }

    .mythology-badge--prominent {
        padding: 0.3rem 0.65rem;
        font-size: 0.7rem;
    }

    .creature-type-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .quick-info-item {
        flex: 1 1 100%;
    }

    .ability-pill-icon {
        display: none;
    }

    .content-source-badge {
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .ability-pill,
    .quick-info-bar,
    .content-source-badge,
    .prose-expand-btn,
    .abilities-expand-btn,
    .content-filter-pill {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================================================
   HIGH CONTRAST MODE
   ============================================================================ */

@media (prefers-contrast: high) {
    .entity-card.official,
    .entity-card.user-submitted {
        border-left-width: 6px;
    }

    .entity-card.official::before,
    .entity-card.user-submitted::before {
        font-weight: 800;
        border: 2px solid white;
    }

    .ability-pill,
    .creature-type-badge,
    .mythology-badge--prominent {
        border-width: 2px;
        font-weight: 700;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .entity-card.official::before,
    .entity-card.user-submitted::before,
    .content-source-badge,
    .abilities-expand-btn,
    .prose-expand-btn,
    .edit-icon-btn {
        display: none;
    }

    .ability-pill,
    .creature-type-badge,
    .mythology-badge--prominent {
        background: transparent !important;
        border: 1px solid #333 !important;
        color: #333 !important;
    }

    .section-prose--truncated,
    .card-content--truncated,
    .biography-card-content--truncated {
        -webkit-line-clamp: unset !important;
        overflow: visible !important;
    }
}
