/* ============================================
   ModelNexus - Components
   ============================================ */

/* --- Buttons (with ripple, press feedback, glow) --- */
.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
    transform: translateY(0);
    transition: transform 150ms var(--ease-out-quart),
                box-shadow 300ms var(--ease-out-quart),
                background 250ms var(--ease-out-quart),
                color 200ms var(--ease-out-quart),
                border-color 200ms var(--ease-out-quart),
                filter 200ms var(--ease-out-quart);
    will-change: transform;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
    transition-duration: 80ms;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Ripple effect injected by JS */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    transform: scale(0);
    animation: btn-ripple-anim 600ms var(--ease-out-quart) forwards;
}

@keyframes btn-ripple-anim {
    to {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* --- Primary: animated aurora gradient --- */
.btn-primary {
    color: #fff;
    background: linear-gradient(
        110deg,
        var(--accent-primary) 0%,
        var(--accent-tertiary) 30%,
        var(--accent-secondary) 60%,
        var(--accent-primary) 100%
    );
    background-size: 200% 100%;
    background-position: 0% 50%;
    box-shadow: 0 4px 16px -4px var(--accent-primary-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:hover:not(:disabled) {
    background-position: 100% 50%;
    box-shadow: 0 8px 28px -6px var(--accent-primary-glow),
                0 0 24px rgba(124, 92, 255, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.06);
}

/* --- Secondary: subtle outlined --- */
.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    color: var(--text-white);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

/* --- Danger --- */
.btn-danger {
    background: linear-gradient(135deg, #ff5570, #ff7a8a);
    color: #fff;
    box-shadow: 0 4px 16px -4px rgba(255, 85, 112, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 8px 28px -6px rgba(255, 85, 112, 0.6),
                0 0 24px rgba(255, 85, 112, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.06);
}

/* --- Success --- */
.btn-success {
    background: linear-gradient(135deg, var(--accent-success), #4fe3b8);
    color: #0a1a14;
    font-weight: 700;
    box-shadow: 0 4px 16px -4px rgba(34, 211, 160, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-success:hover:not(:disabled) {
    box-shadow: 0 8px 28px -6px rgba(34, 211, 160, 0.6),
                0 0 24px rgba(34, 211, 160, 0.25);
    filter: brightness(1.08);
}

/* --- Ghost --- */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
}

.btn-ghost:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.06);
}

/* --- Sizes --- */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-xs);
}

.btn-lg {
    padding: 15px 32px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--accent-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border-radius: 999px;
    border: 2px solid var(--bg-secondary);
    pointer-events: none;
}

.btn-block {
    width: 100%;
}

/* --- Forms (with focus glow + label transition) --- */
.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    transition: color 260ms var(--ease-out-quart);
}

.form-group:focus-within .form-label {
    color: var(--accent-primary-hover);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 260ms var(--ease-out-quart),
                background 260ms var(--ease-out-quart),
                box-shadow 280ms var(--ease-out-quart),
                transform 260ms var(--ease-out-quart);
}

.form-input:hover:not(:focus):not(:disabled),
.form-textarea:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled) {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--accent-primary);
    background: rgba(124, 92, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12),
                0 0 24px -4px var(--accent-primary-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
    transition: opacity 200ms var(--ease-out-quart);
}

.form-input:focus::placeholder,
.form-textarea:focus::placeholder {
    opacity: 0.4;
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a5a7bd' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

.form-hint {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.form-error {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--accent-danger);
    animation: formErrorIn 400ms var(--ease-out-back);
}

@keyframes formErrorIn {
    0%   { opacity: 0; transform: translateX(-6px); }
    60%  { opacity: 1; transform: translateX(2px);  }
    100% { opacity: 1; transform: translateX(0);    }
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
    transition: transform 200ms var(--ease-out-back);
}

.form-checkbox input[type="checkbox"]:checked {
    animation: checkboxPop 400ms var(--ease-out-back);
}

@keyframes checkboxPop {
    0%   { transform: scale(1);    }
    40%  { transform: scale(1.25); }
    100% { transform: scale(1);    }
}

/* Honeypot field (hidden from humans) */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* --- Cards (aurora glow + 3D tilt on hover) --- */
.card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 400ms var(--ease-out-expo),
                box-shadow 400ms var(--ease-out-quart),
                border-color 400ms var(--ease-out-quart);
    will-change: transform;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--grad-card-hover);
    opacity: 0;
    transition: opacity 400ms var(--ease-out-quart);
    pointer-events: none;
    z-index: 1;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.6),
                0 0 32px -8px var(--accent-primary-glow);
    border-color: rgba(124, 92, 255, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card-body {
    padding: 16px;
    position: relative;
    z-index: 2;
}

/* Model Card */
.model-card {
    position: relative;
}

.model-card-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
}

.model-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 40%,
                rgba(124, 92, 255, 0.15) 0%,
                transparent 60%);
    opacity: 0;
    transition: opacity 400ms var(--ease-out-quart);
    pointer-events: none;
    z-index: 1;
}

.model-card:hover .model-card-image::after {
    opacity: 1;
}

.model-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms var(--ease-out-expo),
                filter 400ms var(--ease-out-quart);
}

.model-card:hover .model-card-image img {
    transform: scale(1.08);
    filter: saturate(1.15) contrast(1.05);
}

.model-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top,
        rgba(7, 7, 16, 0.92) 0%,
        rgba(7, 7, 16, 0.6) 50%,
        transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    z-index: 2;
}

.model-card-type {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.model-card-access {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.model-card-access.free { background: var(--accent-success); color: white; }
.model-card-access.pro { background: var(--accent-primary); color: white; }
.model-card-access.premium { background: var(--accent-warning); color: black; }

/* NSFW */
.model-card-nsfw-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    background: var(--accent-danger);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 2;
}

.model-card-access + .model-card-nsfw-badge,
.model-card-nsfw-badge + .model-card-access {
    top: 36px;
}

.nsfw-blur {
    filter: blur(20px);
    transition: filter var(--transition-base);
    cursor: pointer;
}

.nsfw-blur:hover {
    filter: blur(10px);
}

.nsfw-blur.revealed,
.nsfw-card .nsfw-blur:active {
    filter: none;
}

.model-card-body {
    padding: 14px;
}

.model-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-card-title a {
    color: inherit;
}

.model-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.model-card-author-avatar {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--bg-secondary);
}

.model-card-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-card-author-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.model-card-stats {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.model-card-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.model-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Image Card (gallery) */
.image-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
}

.image-card img {
    width: 100%;
    display: block;
    transition: transform var(--transition-slow);
}

.image-card:hover img {
    transform: scale(1.03);
}

.image-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.image-card:hover .image-card-overlay {
    opacity: 1;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-default {
    background: var(--bg-card-hover);
    color: var(--text-secondary);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary-hover);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.badge-pro {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.2));
    color: var(--accent-primary-hover);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-premium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 179, 8, 0.2));
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* --- Tags --- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-hover);
    background: rgba(99, 102, 241, 0.08);
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: fadeSlideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.toast-success {
    border-left: 3px solid var(--accent-success);
}

.toast-error {
    border-left: 3px solid var(--accent-danger);
}

.toast-warning {
    border-left: 3px solid var(--accent-warning);
}

.toast-info {
    border-left: 3px solid var(--accent-info);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 4px;
}

/* --- Modal --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: var(--z-modal-backdrop);
    display: none;
    animation: fadeIn 0.2s ease;
}

.modal-backdrop.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    z-index: var(--z-modal);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab,
.tab-btn {
    padding: 12px 22px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    margin-bottom: -1px;
}

.tab:hover,
.tab-btn:hover {
    color: var(--text-primary);
}

.tab.active,
.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* --- Rating Stars --- */
.rating {
    display: flex;
    gap: 2px;
}

.rating .star {
    font-size: 1rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.rating .star.filled {
    color: var(--accent-warning);
}

.rating .star:hover,
.rating .star:hover ~ .star {
    color: var(--accent-warning);
}

/* --- Skeleton Loaders --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: pulse 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 20px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-image {
    aspect-ratio: 3/4;
    border-radius: var(--radius-md);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background: var(--bg-card);
    color: var(--text-white);
}

.pagination .active {
    background: var(--accent-primary);
    color: white;
    font-weight: 600;
}

.pagination .disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* --- Loading Spinner --- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* --- Progress Bar --- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

/* --- Alert --- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--accent-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--accent-warning);
}

.alert-info {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
    color: var(--accent-info);
}

/* --- Floating card delete button (top-right of cards for owner/admin) --- */
.card-delete-form {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    margin: 0;
}

.card-delete-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
    padding: 0;
    backdrop-filter: blur(4px);
}

.card-delete-btn:hover {
    background: var(--accent-danger);
    transform: scale(1.1);
}

.image-card,
.model-card,
.model-card-image {
    position: relative;
}

/* --- Avatar --- */
.avatar {
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    position: relative;
}

.avatar-sm { width: 28px; height: 28px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 120px; height: 120px; }

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-weight: 700;
    text-transform: uppercase;
}

.avatar-placeholder.avatar-sm { font-size: 0.85rem; }
.avatar-placeholder.avatar-md { font-size: 1.1rem; }
.avatar-placeholder.avatar-lg { font-size: 1.75rem; }
.avatar-placeholder.avatar-xl { font-size: 3rem; width: 100%; height: 100%; }

/* --- Stat Box --- */
.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.stat-box-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
}

.stat-box-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Ad Slots --- */
.ad-slot {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.ad-slot img {
    width: 100%;
    height: auto;
    display: block;
}

.ad-slot-label {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.6rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.5);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

/* --- Pricing Card --- */
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: white;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}

.pricing-card-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 4px;
}

.pricing-card-price .currency {
    font-size: 1.2rem;
    vertical-align: super;
}

.pricing-card-price .period {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-card-features {
    text-align: left;
    margin: 24px 0;
}

.pricing-card-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-card-features li::before {
    content: '\2713';
    color: var(--accent-success);
    font-weight: 700;
}

/* --- Creator Tier Card --- */
.tier-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.tier-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
}

.tier-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 8px 0;
}

.tier-card-price span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ============================================
   Addictive details
   ============================================ */

/* --- Like button burst animation --- */
.like-burst-wrapper {
    position: relative;
    display: inline-block;
}

.like-burst-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 1;
    transform: translate(-50%, -50%);
    animation: likeBurst 700ms var(--ease-out-expo) forwards;
}

@keyframes likeBurst {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx, 0)), calc(-50% + var(--dy, 0))) scale(0); opacity: 0; }
}

.like-heart-pop {
    animation: heartPop 500ms var(--ease-out-back) forwards;
}

@keyframes heartPop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.45); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* --- Trending badge pulse --- */
.trending-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #ff6b35, #ff5570);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 0 16px rgba(255, 107, 53, 0.5);
    animation: trendingPulse 2.4s var(--ease-in-out-quart) infinite;
    position: relative;
    overflow: hidden;
}

.trending-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg,
        transparent 30%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 70%);
    transform: translateX(-100%);
    animation: trendingShimmer 3s linear infinite;
}

@keyframes trendingPulse {
    0%, 100% { box-shadow: 0 0 16px rgba(255, 107, 53, 0.5); }
    50%      { box-shadow: 0 0 28px rgba(255, 107, 53, 0.85),
                           0 0 48px rgba(255, 85, 112, 0.35); }
}

@keyframes trendingShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Toast notifications polished --- */
.toast {
    animation: toastSlide 400ms var(--ease-out-back);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@keyframes toastSlide {
    0%   { transform: translateX(120%) scale(0.9); opacity: 0; }
    60%  { transform: translateX(-8%) scale(1.02); opacity: 1; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

/* --- Dropdown menu: stagger fade-in on items --- */
.dropdown-menu.show .dropdown-item {
    animation: dropdownItemIn 320ms var(--ease-out-quart) backwards;
}

.dropdown-menu.show .dropdown-item:nth-child(1) { animation-delay: 20ms; }
.dropdown-menu.show .dropdown-item:nth-child(2) { animation-delay: 50ms; }
.dropdown-menu.show .dropdown-item:nth-child(3) { animation-delay: 80ms; }
.dropdown-menu.show .dropdown-item:nth-child(4) { animation-delay: 110ms; }
.dropdown-menu.show .dropdown-item:nth-child(5) { animation-delay: 140ms; }
.dropdown-menu.show .dropdown-item:nth-child(6) { animation-delay: 170ms; }
.dropdown-menu.show .dropdown-item:nth-child(7) { animation-delay: 200ms; }
.dropdown-menu.show .dropdown-item:nth-child(8) { animation-delay: 230ms; }

@keyframes dropdownItemIn {
    0%   { opacity: 0; transform: translateX(-8px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* --- Scroll reveal classes (used by IntersectionObserver in components.js) --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms var(--ease-out-expo),
                transform 600ms var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 300ms; }

/* --- Back-to-top floating button --- */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(124, 92, 255, 0.3);
    background: rgba(23, 24, 40, 0.8);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    color: var(--text-white);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.55),
                0 0 24px -8px var(--accent-primary-glow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.85);
    transition: opacity 350ms var(--ease-out-quart),
                transform 420ms var(--ease-out-back),
                box-shadow 300ms var(--ease-out-quart),
                border-color 300ms var(--ease-out-quart);
    z-index: var(--z-sticky);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.7),
                0 0 32px -4px var(--accent-primary-glow),
                0 0 0 4px rgba(124, 92, 255, 0.08);
    transform: translateY(-2px) scale(1.05);
}

/* --- Infinite scroll sentinel / spinner --- */
.infinite-sentinel {
    padding: 40px 20px;
    text-align: center;
    min-height: 60px;
}

.infinite-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent-primary);
    border-right-color: var(--accent-tertiary);
    animation: spinnerRotate 900ms linear infinite;
    opacity: 0;
    transition: opacity 200ms;
}

.infinite-sentinel.loading .infinite-spinner {
    opacity: 1;
}

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

.infinite-end {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font-mono);
    letter-spacing: 0.01em;
    padding: 20px 0;
}

/* --- Skeleton loading screens --- */
.skeleton {
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(124, 92, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.8s var(--ease-in-out-quart) infinite;
    border-radius: var(--radius-sm);
}

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

.skeleton-card {
    aspect-ratio: 3/4;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.skeleton-line {
    height: 12px;
    margin: 8px 0;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 90%; }

/* --- Clipboard feedback --- */
[data-copy] {
    cursor: pointer;
    transition: color 200ms var(--ease-out-quart);
}

[data-copy]:hover {
    color: var(--accent-primary-hover);
}

[data-copy].copied {
    color: var(--accent-success);
    animation: copiedBounce 500ms var(--ease-out-back);
}

@keyframes copiedBounce {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* --- Confetti canvas overlay --- */
.confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: var(--z-toast);
}

/* --- Aurora mesh background (for heroes) --- */
.aurora-mesh {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.aurora-mesh::before,
.aurora-mesh::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 900px;
    max-height: 900px;
    border-radius: 50%;
    filter: blur(120px);
    will-change: transform;
}

.aurora-mesh::before {
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, var(--aurora-1), transparent 70%);
    animation: auroraDrift1 22s var(--ease-in-out-quart) infinite alternate;
}

.aurora-mesh::after {
    bottom: -30%;
    right: -15%;
    background: radial-gradient(circle, var(--aurora-3), transparent 70%);
    animation: auroraDrift2 28s var(--ease-in-out-quart) infinite alternate;
}

@keyframes auroraDrift1 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(20vw, 10vh) scale(1.15); }
    100% { transform: translate(5vw, -8vh) scale(0.95); }
}

@keyframes auroraDrift2 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-15vw, -10vh) scale(1.1); }
    100% { transform: translate(-5vw, 12vh) scale(0.9); }
}

/* ============================================
   Phase "animations everywhere"
   ============================================ */

/* --- Tab panels smooth crossfade --- */
.tab-panel {
    display: none;
    animation: tabPanelIn 420ms var(--ease-out-expo);
}
.tab-panel.active {
    display: block;
}
@keyframes tabPanelIn {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0);    }
}

/* Tab buttons get a tiny scale pop on activation */
.tab-btn {
    position: relative;
}
.tab-btn.active {
    animation: tabBtnPop 400ms var(--ease-out-back);
}
@keyframes tabBtnPop {
    0%   { transform: scale(1);    }
    40%  { transform: scale(1.06); }
    100% { transform: scale(1);    }
}

/* --- Gallery thumbnails: Ken Burns idle + sharper zoom on hover --- */
.image-card img,
.model-card-image img {
    transition: transform 900ms var(--ease-out-expo),
                filter 500ms var(--ease-out-quart);
}

.image-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: transform 400ms var(--ease-out-expo),
                box-shadow 400ms var(--ease-out-quart);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.7),
                0 0 28px -8px var(--accent-primary-glow);
    border-color: rgba(124, 92, 255, 0.3);
}

.image-card:hover img {
    transform: scale(1.08);
    filter: saturate(1.15) contrast(1.04);
}

.image-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    background: linear-gradient(to top,
        rgba(7, 7, 16, 0.9) 0%,
        rgba(7, 7, 16, 0.4) 40%,
        transparent 80%);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 400ms var(--ease-out-quart),
                transform 400ms var(--ease-out-quart);
    pointer-events: none;
    z-index: 2;
}

.image-card:hover .image-card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.image-card-prompt {
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Rating stars bounce fill --- */
.rating .star,
.rating-star {
    display: inline-block;
    font-size: 1.1rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color 180ms var(--ease-out-quart),
                transform 220ms var(--ease-out-back);
}

.rating .star:hover,
.rating-star:hover {
    transform: scale(1.25) rotate(-6deg);
    color: var(--accent-warning);
}

.rating .star.filled,
.rating-star.filled {
    color: var(--accent-warning);
    animation: starFill 500ms var(--ease-out-back);
}

@keyframes starFill {
    0%   { transform: scale(1) rotate(0);    }
    40%  { transform: scale(1.4) rotate(-8deg); }
    70%  { transform: scale(0.95) rotate(4deg);  }
    100% { transform: scale(1) rotate(0);    }
}

/* --- Modal (scale-in with backdrop blur) --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    background: rgba(5, 5, 12, 0.75);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    animation: modalBackdropIn 280ms var(--ease-out-quart);
}

@keyframes modalBackdropIn {
    0%   { opacity: 0; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
    100% { opacity: 1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: var(--z-modal);
    max-width: 90vw;
    max-height: 85vh;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid rgba(124, 92, 255, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 96px -24px rgba(0, 0, 0, 0.8),
                0 0 64px -16px var(--accent-primary-glow);
    overflow: auto;
    transform: translate(-50%, -50%);
    animation: modalIn 400ms var(--ease-out-back);
}

@keyframes modalIn {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1);    }
}

/* --- Empty states with bouncing icon --- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    animation: emptyStateIn 600ms var(--ease-out-expo);
}

@keyframes emptyStateIn {
    0%   { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0);    }
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: inline-block;
    animation: emptyIconFloat 3.2s var(--ease-in-out-quart) infinite;
    filter: drop-shadow(0 0 14px rgba(124, 92, 255, 0.35));
}

@keyframes emptyIconFloat {
    0%, 100% { transform: translateY(0) rotate(0);    }
    25%      { transform: translateY(-6px) rotate(-3deg); }
    50%      { transform: translateY(0) rotate(0);    }
    75%      { transform: translateY(-3px) rotate(3deg);  }
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
}

/* --- Notifications + comments stagger-in --- */
.notification-item,
.comment-item {
    position: relative;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    animation: listItemIn 520ms var(--ease-out-expo) backwards;
    transition: transform 280ms var(--ease-out-quart),
                border-color 280ms var(--ease-out-quart),
                background 280ms var(--ease-out-quart);
}

.notification-item:hover,
.comment-item:hover {
    transform: translateX(4px);
    border-color: rgba(124, 92, 255, 0.3);
    background: var(--bg-card-hover);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--grad-primary);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 12px var(--accent-primary-glow);
}

.notification-list > .notification-item:nth-child(1) { animation-delay: 30ms; }
.notification-list > .notification-item:nth-child(2) { animation-delay: 90ms; }
.notification-list > .notification-item:nth-child(3) { animation-delay: 150ms; }
.notification-list > .notification-item:nth-child(4) { animation-delay: 210ms; }
.notification-list > .notification-item:nth-child(5) { animation-delay: 270ms; }
.notification-list > .notification-item:nth-child(6) { animation-delay: 330ms; }
.notification-list > .notification-item:nth-child(7) { animation-delay: 390ms; }
.notification-list > .notification-item:nth-child(8) { animation-delay: 450ms; }

@keyframes listItemIn {
    0%   { opacity: 0; transform: translateX(-14px); }
    100% { opacity: 1; transform: translateX(0);     }
}

/* --- Admin table rows polish --- */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.admin-table tbody tr {
    transition: background 220ms var(--ease-out-quart);
    animation: listItemIn 400ms var(--ease-out-quart) backwards;
}

.admin-table tbody tr:nth-child(1) { animation-delay: 20ms; }
.admin-table tbody tr:nth-child(2) { animation-delay: 60ms; }
.admin-table tbody tr:nth-child(3) { animation-delay: 100ms; }
.admin-table tbody tr:nth-child(4) { animation-delay: 140ms; }
.admin-table tbody tr:nth-child(5) { animation-delay: 180ms; }
.admin-table tbody tr:nth-child(6) { animation-delay: 220ms; }
.admin-table tbody tr:nth-child(7) { animation-delay: 260ms; }
.admin-table tbody tr:nth-child(8) { animation-delay: 300ms; }

.admin-table tbody tr:hover {
    background: linear-gradient(90deg,
        rgba(124, 92, 255, 0.06) 0%,
        rgba(124, 92, 255, 0.02) 100%);
}

/* --- Upload progress bar shimmer --- */
.upload-progress {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 12px 0;
}

.upload-progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: linear-gradient(90deg,
        var(--accent-primary),
        var(--accent-tertiary),
        var(--accent-secondary),
        var(--accent-primary));
    background-size: 200% 100%;
    border-radius: inherit;
    transition: width 400ms var(--ease-out-quart);
    animation: uploadShimmer 2s linear infinite;
    box-shadow: 0 0 16px var(--accent-primary-glow);
}

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

/* --- Settings sidebar active indicator (sliding pill) --- */
.settings-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-sidebar .settings-nav-item {
    position: relative;
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 250ms var(--ease-out-quart),
                background 250ms var(--ease-out-quart);
}

.settings-sidebar .settings-nav-item::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    width: 3px;
    height: 0;
    background: var(--grad-primary);
    border-radius: 3px;
    transform: translateY(-50%);
    transition: height 280ms var(--ease-out-back),
                box-shadow 280ms var(--ease-out-quart);
}

.settings-sidebar .settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-white);
}

.settings-sidebar .settings-nav-item.active {
    background: rgba(124, 92, 255, 0.08);
    color: var(--text-white);
}

.settings-sidebar .settings-nav-item.active::before {
    height: 60%;
    box-shadow: 0 0 12px var(--accent-primary-glow);
}

/* --- Profile hero: subtle gradient banner animation --- */
.profile-header {
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.12) 0%, transparent 60%);
    filter: blur(60px);
    animation: profileHeroDrift 14s var(--ease-in-out-quart) infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.profile-header::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 214, 0.1) 0%, transparent 60%);
    filter: blur(70px);
    animation: profileHeroDrift2 18s var(--ease-in-out-quart) infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.profile-header > * {
    position: relative;
    z-index: 1;
}

@keyframes profileHeroDrift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(40%, 10%); }
}

@keyframes profileHeroDrift2 {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-30%, -20%); }
}

.profile-username {
    position: relative;
}

/* Stats in profile: animate value on reveal */
.profile-stat-value {
    background: linear-gradient(135deg, var(--text-white), var(--accent-primary-hover));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

/* --- Subtle footer hover --- */
.footer {
    position: relative;
    margin-top: 80px;
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.03));
}

.footer-links a {
    display: block;
    padding: 4px 0;
    color: var(--text-muted);
    transition: color 200ms var(--ease-out-quart),
                transform 200ms var(--ease-out-quart);
}

.footer-links a:hover {
    color: var(--accent-primary-hover);
    transform: translateX(4px);
}

/* --- Avatar glow on hover --- */
.avatar {
    position: relative;
    transition: transform 300ms var(--ease-out-back);
}

.avatar:hover {
    transform: scale(1.04);
}

.avatar::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    opacity: 0;
    z-index: -1;
    transition: opacity 300ms var(--ease-out-quart);
    filter: blur(8px);
}

.avatar:hover::after {
    opacity: 0.6;
}

/* --- Badges pulse on appearance --- */
.badge,
.badge-admin,
.badge-pro,
.badge-premium {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    animation: badgeIn 500ms var(--ease-out-back);
}

.badge-admin {
    background: linear-gradient(135deg, var(--accent-danger), var(--accent-tertiary));
    color: #fff;
    box-shadow: 0 0 14px rgba(255, 85, 112, 0.35);
}

.badge-pro {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 0 14px var(--accent-primary-glow);
}

.badge-premium {
    background: linear-gradient(135deg, var(--accent-warning), #ff8a47);
    color: #1a0a00;
    box-shadow: 0 0 14px rgba(255, 181, 71, 0.4);
}

@keyframes badgeIn {
    0%   { opacity: 0; transform: scale(0.6); }
    60%  { opacity: 1; transform: scale(1.12); }
    100% { opacity: 1; transform: scale(1);   }
}
