/* === STAFF PAGE STYLES === */

/* === LOADING & ERROR STATES === */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-deep);
    color: var(--text-secondary);
    gap: 16px;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-deep);
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    gap: 16px;
}

.error-state svg {
    width: 64px;
    height: 64px;
    color: var(--primary);
    opacity: 0.5;
}

.error-state h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.error-state p {
    color: var(--text-secondary);
    max-width: 400px;
}

/* Spotlight effect for loading/error */
.loading-state::before,
.error-state::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: radial-gradient(ellipse 100% 80% at 50% 0%, rgba(var(--primary-rgb), 0.18), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}

/* === SEARCH VIEW === */
.search-view {
    min-height: 100vh;
    background: var(--bg-deep);
    padding: 80px 20px 60px;
}

/* Spotlight effect for search */
.search-view::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: radial-gradient(ellipse 100% 80% at 50% 0%, rgba(var(--primary-rgb), 0.18), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 60px;
    position: relative;
    z-index: 1;
}

.search-header {
    text-align: center;
    margin-bottom: 32px;
}

.search-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 32px;
    transition: all 0.2s;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-subtle);
}

.search-box svg {
    width: 22px;
    height: 22px;
    color: #9ca3af;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    font-size: 1.05rem;
    color: var(--text-primary);
    outline: none;
}

.search-box input::placeholder {
    color: #9ca3af;
}

/* Search clear button */
.search-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-surface);
    border: none;
    border-radius: 50%;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.search-clear-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.search-clear-btn svg {
    width: 14px;
    height: 14px;
}

/* Filter Bar - matches anime page layout */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Results count display */
.results-count {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}

.count-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.count-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 18px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== Mobile Responsive - Filter Controls ===== */
@media (max-width: 768px) {
    .search-view {
        padding: 70px 0 60px;
    }

    .search-container {
        padding: 0 12px;
    }

    .search-view .search-container {
        padding-top: 10px;
    }

    .search-header {
        margin-bottom: 20px;
    }

    .search-header h1 {
        font-size: 1.75rem;
        line-height: 1.2;
        letter-spacing: normal;
        margin-bottom: 10px;
    }

    .search-box {
        padding: 12px 16px;
        margin-bottom: 16px;
        max-width: 100%;
    }

    .search-box input {
        font-size: 16px; /* Prevent iOS zoom */
    }

    .filter-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0;
        margin-bottom: 16px;
        border-bottom: none;
    }

    .filter-tabs {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        width: 100%;
    }

    .filter-btn {
        padding: 10px 4px;
        font-size: 0.65rem;
        border-radius: 8px;
        white-space: nowrap;
        min-height: 40px;
        text-align: center;
    }

    .filter-actions {
        display: flex;
        gap: 6px;
        align-items: center;
        width: 100%;
    }

    .sort-select {
        flex: 1;
        padding: 10px 32px 10px 12px;
        font-size: 0.8rem;
        border-radius: 8px;
        min-height: 40px;
        background-position: right 10px center;
        background-size: 12px;
    }
}

@media (max-width: 480px) {
    .search-header h1 {
        font-size: 1.4rem;
    }

    /* Stack filters in 2x2 grid on very small screens */
    .filter-tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-btn {
        padding: 8px 6px;
        font-size: 0.7rem;
        min-height: 36px;
    }

    .sort-select {
        padding: 8px 28px 8px 10px;
        font-size: 0.75rem;
        min-height: 36px;
    }
}

/* Results Grid - card layout like anime page */
.results-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 16px;
}

@media (max-width: 1400px) { .results-grid { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 1200px) { .results-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1000px) { .results-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; } }
@media (max-width: 800px) { .results-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (max-width: 600px) { .results-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
@media (max-width: 400px) { .results-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; } }

/* Results Card - poster style with overlay */
.result-card {
    position: relative;
    text-decoration: none;
    display: block;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

.result-card:hover {
    z-index: 10;
}

.card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg-surface);
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.result-card:hover .card-poster img {
    transform: scale(1.08);
}

/* Info overlay at bottom of card */
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
}

.card-name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
}

.result-card:hover .card-name {
    color: var(--primary);
}

.card-meta {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.7);
}

.card-meta .role-badge {
    color: var(--primary);
    font-weight: 500;
}

/* Matched anime indicator */
.card-matched {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Skeleton loading cards */
.skeleton-card {
    opacity: 1 !important;
    animation: none !important;
}

.skeleton-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--bg-surface) 0%, var(--bg-card) 50%, var(--bg-surface) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-text {
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-name {
    width: 80%;
    height: 14px;
    margin-bottom: 6px;
}

.skeleton-meta {
    width: 60%;
    height: 10px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty and loading states */
.search-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.results-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    gap: 12px;
}

/* === DETAIL VIEW === */
.detail-view {
    min-height: 100vh;
    background: var(--bg-deep);
}

/* Spotlight effect */
.detail-view::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: radial-gradient(ellipse 100% 80% at 50% 0%, rgba(var(--primary-rgb), 0.18), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Banner */
.detail-banner {
    position: relative;
    height: 300px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.detail-banner.banner-blur::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(50px);
    background: rgba(10, 10, 15, 0.3);
}

.detail-banner .banner-overlay {
    position: absolute;
    inset: 0;
    bottom: -1px;
    background: linear-gradient(to bottom,
        rgba(10, 10, 15, 0.2) 0%,
        rgba(10, 10, 15, 0.4) 50%,
        #0a0a0f 100%
    );
}

.detail-banner .back-btn {
    position: absolute;
    top: 80px;
    left: 24px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.detail-banner .back-btn:hover {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary);
}

.detail-banner .back-btn svg {
    width: 18px;
    height: 18px;
}

/* Header */
.detail-header {
    position: relative;
    margin-top: -120px;
    padding: 0 24px;
    z-index: 10;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
}

.header-poster {
    flex-shrink: 0;
}

.header-poster img {
    width: 180px;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: var(--bg-card);
}

.header-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 16px;
    min-width: 0;
}

.entity-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    width: fit-content;
}

.staff-badge {
    background: var(--primary-subtle);
    color: var(--primary);
}

.entity-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.1;
}

.entity-native {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

.entity-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Body */
.detail-body {
    padding: 48px 24px 80px;
}

.body-container {
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 48px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 24px 0;
}

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

/* Shared controls for roles and positions */
.works-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-surface);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.filter-checkbox input[type="checkbox"]:hover {
    border-color: var(--primary);
}

.filter-checkbox input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.filter-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid var(--bg-deep);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.sort-select {
    padding: 8px 32px 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    transition: all 0.2s;
}

.sort-select:hover {
    border-color: var(--primary);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

.sort-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}

/* === BIO SECTION === */
.bio-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.bio-grid {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
}

.bio-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 32px;
    flex: 1;
}

.bio-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bio-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.bio-value {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.bio-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.bio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.bio-link svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.bio-link:hover {
    background: var(--primary-subtle);
    border-color: var(--primary);
}

.bio-description {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.bio-description a {
    color: var(--primary);
}

/* === ROLES GRID === */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 12px;
}

.role-card {
    display: flex;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s var(--ease-out);
}

.role-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.char-side,
.anime-side {
    display: flex;
    gap: 12px;
    padding: 10px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.char-side:hover .char-name,
.anime-side:hover .anime-title {
    color: var(--primary);
}

.anime-side {
    text-align: right;
    flex-direction: row-reverse;
}

.char-img,
.anime-img {
    width: 58px;
    height: 82px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--bg-surface);
}

.char-info,
.anime-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.char-name,
.anime-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-role {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.anime-year {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* === POSITIONS GRID === */
.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.position-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.position-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.position-cover {
    width: 60px;
    height: 85px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--bg-surface);
}

.position-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.position-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.position-card:hover .position-title {
    color: var(--primary);
}

.position-role {
    font-size: 0.8rem;
    color: var(--primary);
}

.position-year {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-info {
        align-items: center;
    }

    .entity-stats {
        justify-content: center;
    }

    .bio-grid {
        flex-direction: column;
    }

    .bio-info {
        grid-template-columns: 1fr 1fr;
    }

    .bio-links {
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .roles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .entity-title {
        font-size: 1.75rem;
    }

    .entity-stats {
        gap: 20px;
    }

    .bio-info {
        grid-template-columns: 1fr;
    }

    .role-card {
        flex-direction: column;
    }

    .anime-side {
        flex-direction: row;
        text-align: left;
        border-top: 1px solid var(--border);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .works-controls {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .search-view .search-container {
        padding-top: 20px;
    }

    .search-header h1 {
        font-size: 1.75rem;
    }

    .positions-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   REVISION HISTORY SECTION
   ============================================ */
.revision-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.revision-history-item {
    background: var(--bg-card, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
    border-radius: 8px;
    padding: 14px 16px;
    transition: all 0.15s;
}

.revision-history-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.revision-item-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.revision-action-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.revision-action-badge.action-edit {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.revision-user-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary, #fafafa);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.revision-user-link:hover {
    color: var(--primary, #8b5cf6);
}

.revision-user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.revision-item-date {
    font-size: 0.8rem;
    color: var(--text-muted, #71717a);
    margin-left: auto;
}

.revision-points {
    font-size: 0.8rem;
    font-weight: 600;
    color: #22c55e;
}

.revision-changes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.revision-change-item {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary, #a1a1aa);
}

.revision-change-more {
    font-size: 0.75rem;
    color: var(--text-muted, #71717a);
}

#revisionHistorySection .btn-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
}

.revision-empty,
.revision-loading {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted, #71717a);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

#revisionHistorySection .btn-load-more:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary, #8b5cf6);
    color: var(--primary, #8b5cf6);
}

@media (max-width: 600px) {
    .revision-item-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .revision-item-date {
        margin-left: 0;
    }
}

/* ============================================
   INFINITE SCROLL - LOAD MORE TRIGGER
   ============================================ */
.load-more-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 0;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.85rem;
}

.load-more-trigger .loader-spinner {
    width: 24px;
    height: 24px;
}
