/* =========================================================================
   PixAI Studio — Stylesheet
   ========================================================================= */

:root {
    --pixai-accent:       #009ef7;
    --pixai-accent-hover: #008be1;
    --pixai-accent-alpha: rgba(0, 158, 247, 0.1);
    --pixai-success:      #50cd89;
    --pixai-danger:       #f1416c;
}

/* =========================================================================
   Studio Header
   ========================================================================= */
.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--color14);
	border: 1px solid var(--al-border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.studio-title h2 {
    margin: 0;
    font-size: 20px;
    color: var(--color02);
}
.studio-credits {
    display: inline-block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--pixai-accent);
    font-weight: 600;
    background: rgba(0,158,247,0.1);
    padding: 4px 10px;
    border-radius: 5px;
}
.studio-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* =========================================================================
   Studio Layout
   ========================================================================= */
.studio-dashboard {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
}
.studio-panel {
    background: var(--color14);
	border: 1px solid var(--al-border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.panel-title {
    margin: 0 0 20px 0;
    font-size: 15px;
    color: var(--color02);
    border-bottom: 1px solid var(--al-border-color);
    padding-bottom: 10px;
}

/* =========================================================================
   Formulario
   ========================================================================= */
.pix-field {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}
.pix-field label {
    font-size: 12px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.pix-input {
    background: var(--color04);
	border: 1px solid var(--border01);
	color: var(--color01);
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.pix-flex-row {
    display: flex;
    gap: 15px;
}
.pix-flex-row .pix-field {
    flex: 1;
}
.pix-textarea-large {
    height: 120px;
    resize: vertical;
}
.pix-textarea-small {
    height: 60px;
    resize: vertical;
}
.studio-submit-row {
    margin-top: 20px;
    text-align: right;
    border-top: 1px solid var(--border01);
    padding-top: 20px;
}

/* =========================================================================
   Botón generar
   ========================================================================= */
.studio-btn-generate {
    background: var(--pixai-accent);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.studio-btn-generate:hover {
    background: var(--pixai-accent-hover);
}
.studio-btn-disabled {
    opacity: 0.5;
}

/* =========================================================================
   Mini galería
   ========================================================================= */
.studio-mini-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}
.mini-gallery-item {
    flex: 0 0 100px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e1e4e8;
}
.mini-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.mini-gallery-item:hover img {
    transform: scale(1.1);
}
.pix-empty {
    color: #6c757d;
    font-size: 13px;
}

/* Studio — utilidades reemplazo inline */
.pix-model-custom      { margin-top: 5px; }
.pix-lora-select       { margin-bottom: 8px; }
.pix-lora-inputs       { display: flex; gap: 8px; }
.pix-lora-id           { width: 40%; flex: none; }
.pix-lora-name         { width: 60%; flex: none; }
.studio-result-hidden  { display: none; }
.studio-panel-gallery  { margin-top: 20px; }
.studio-spinner-wrap   { padding: 40px; text-align: center; }
.studio-spinner-icon   { color: var(--pixai-accent); }
.studio-spinner-label  { margin-top: 15px; color: #6c757d; font-weight: 600; }
.studio-image-result   { margin-top: 15px; }
.studio-result-img     { max-width: 100%; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* =========================================================================
   Header de sección
   ========================================================================= */
.pix-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
	margin-top: 20px;	
    margin-bottom: 20px;
    padding-bottom: 10px;
    background: var(--color14);
	padding: 20px;
	border-radius: 10px;
}

/* =========================================================================
   Botones
   ========================================================================= */
.pix-btn-primary {
    background: var(--pixai-accent);
    color: var(--color14) !important;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.pix-btn-primary:hover {
    background: var(--pixai-accent-hover);
    color: #fff;
    text-decoration: none;
}
.pix-btn-secondary {
    background: var(--color04);
	color: var(--color01);
	border: 1px solid var(--border01);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.pix-btn-copy {
    background: var(--border04);
    border: none;
    color: #495057;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}
.pix-btn-copy:hover {
    background: var(--pixai-accent);
    color: #fff;
}
.pix-btn-copy-sm {
    background: transparent;
    border: 1px solid var(--border04);
    color: var(--color13);
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}
.pix-btn-copy-sm:hover {
    background: var(--pixai-accent);
    color: #fff;
    border-color: var(--pixai-accent);
}
.pix-btn-action {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 12px;
    border-radius: 50%;
    font-size: 20px;
}

/* =========================================================================
   Galería pública
   ========================================================================= */
.pix-gallery-public {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.pix-card-public {
    background: var(--color04);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    border: 1px solid var(--border05);
    display: flex;
    flex-direction: column;
}
.pix-card-img-wrap {
    position: relative;
    cursor: pointer;
    height: 300px;
    overflow: hidden;
}
.pix-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.pix-card-img-wrap:hover img {
    transform: scale(1.05);
}
.pix-card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.pix-card-img-wrap:hover .pix-card-overlay {
    opacity: 1;
}
.pix-card-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color08);
}
.pix-card-meta {
    display: flex;
    flex-direction: column;
}
.pix-card-meta h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 14px;
}
.pix-card-title {
    margin: 0 0 3px 0 !important;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}
.pix-card-author {
    color: var(--pixai-accent);
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}
.pix-card-time {
    color: #6c757d;
    font-size: 11px;
}
.pix-card-actions {
    display: flex;
    gap: 8px;
}

/* =========================================================================
   Modal de galería
   ========================================================================= */
.pix-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.pix-modal-container {
    background: #1e1e2d;
    border-radius: 8px;
    width: 1000px;
    max-width: 95%;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #2b2b40;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.pix-modal-header {
    padding: 15px 25px;
    border-bottom: 1px solid #2b2b40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #151521;
}
.pix-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}
.pix-modal-close {
    background: transparent;
    border: none;
    color: #a1a5b7;
    font-size: 20px;
    cursor: pointer;
}
.pix-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.pix-modal-col-img {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.pix-modal-col-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.pix-modal-col-data {
    width: 380px;
    background: var(--color14);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-left: 1px solid var(--border04);
}
.pix-data-block label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #6c757d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 700;
}
.pix-data-text {
    background: var(--color04);
    padding: 12px;
    border-radius: 5px;
    color: var(--color01);
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid var(--border04);
    max-height: 150px;
    overflow-y: auto;
}
.pix-data-value {
    color: var(--color01);
    font-weight: 600;
    font-size: 14px;
}
.pix-data-sub {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
}

/* =========================================================================
   Comentarios
   ========================================================================= */
.pix-comments-section {
    margin-top: auto;
    border-top: 1px solid var(--border01);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pix-comments-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pix-empty-comments {
    color: #6c757d;
    font-size: 12px;
    text-align: center;
    padding: 15px 0;
}
.pix-comment-item {
    background: var(--color04);
    padding: 10px 12px;
    border-radius: 5px;
    color: var(--color01);
    font-size: 13px;
    border-left: 3px solid var(--pixai-accent);
    border-top: 1px solid var(--border04);
	border-right: 1px solid var(--border04);
	border-bottom: 1px solid var(--border04);
    line-height: 1.4;
}
.pix-comment-item strong {
    color: var(--pixai-accent);
}
.pix-comment-form {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

/* =========================================================================
   LoRA Tags
   ========================================================================= */
.lora-tags-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.lora-tag {
    background: #f8f9fa;
    border: 1px solid var(--pixai-accent);
    border-radius: 5px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 4px var(--pixai-accent-alpha);
}
.lora-tag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lora-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--pixai-accent);
    letter-spacing: 0.5px;
}
.lora-remove {
    background: transparent;
    border: none;
    color: var(--pixai-danger);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: transform 0.2s;
}
.lora-remove:hover {
    transform: scale(1.2);
}
.lora-tag-body label {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 6px;
    display: block;
    font-weight: 600;
    text-transform: uppercase;
}
.lora-slider {
    width: 100%;
    cursor: pointer;
    accent-color: var(--pixai-accent);
}

/* =========================================================================
   Tienda — Grid de paquetes
   ========================================================================= */
.pix-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}
.pix-shop-card {
    text-align: center;
    padding: 35px 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color14);
	border: 1px solid var(--border04);
    border-radius: 8px;
}
.pix-shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: var(--pixai-accent);
}
.pix-shop-icon {
    font-size: 32px;
    color: var(--pixai-accent);
    margin-bottom: 15px;
}
.pix-shop-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--color01);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border01);
    padding-bottom: 15px;
}
.pix-shop-credits {
    font-size: 38px;
    font-weight: 800;
    color: var(--pixai-accent);
    margin: 10px 0 5px 0;
    line-height: 1;
}
.pix-shop-credits span {
    font-size: 12px;
    text-transform: uppercase;
    color: #b5b5c3;
    font-weight: 600;
    display: block;
    margin-top: 5px;
}
.pix-shop-price {
    font-size: 18px;
    color: var(--color01);
    font-weight: 700;
    margin-bottom: 30px;
}
.pix-shop-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    justify-content: center;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* =========================================================================
   Tienda — Tabs de método de pago
   ========================================================================= */
.pix-payment-tabs {
    margin-bottom: 24px;
}
.pix-tab-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pix-tab-btn {
    padding: 8px 18px;
    border: 2px solid var(--border01);
    background: transparent;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    color: #495057;
}
.pix-tab-btn:hover,
.pix-tab-btn.pix-tab-active {
    background: var(--pixai-accent);
    color: #fff;
    border-color: var(--pixai-accent);
}
.pix-tab-hidden {
    display: none;
}
.pix-stripe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================================================
   Tienda — Pantalla de pago exitoso
   ========================================================================= */
.pix-payment-success {
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
    padding: 40px;
}
.pix-success-icon {
    font-size: 64px;
    color: var(--pixai-success);
    display: block;
    margin-bottom: 16px;
}
.pix-payment-success h2 {
    margin-bottom: 8px;
}
.pix-balance-label {
    color: #6c757d;
    margin-bottom: 0;
}
.pix-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
    .studio-dashboard {
        grid-template-columns: 1fr;
    }
    .studio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .studio-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
@media (max-width: 850px) {
    .pix-modal-overlay {
        align-items: flex-start;
        overflow: hidden;
    }
    .pix-modal-container {
        height: 100dvh;
        height: 100vh;
        max-height: 100vh;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    .pix-modal-header {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 15px;
        flex-shrink: 0;
    }
    .pix-modal-header h3 {
        font-size: 14px;
        flex: 1 1 100%;
    }
    .pix-modal-header-actions {
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }
    .pix-modal-body {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }
    .pix-modal-col-img {
        height: auto;
        min-height: 40vw;
        max-height: 60vh;
        flex: none;
        overflow: hidden;
    }
    .pix-modal-col-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .pix-modal-col-data {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e1e4e8;
        overflow: visible;
        flex: none;
        box-sizing: border-box;
        max-width: 100%;
        padding-bottom: 30px;
    }
    .pix-modal-col-data * {
        max-width: 100%;
        box-sizing: border-box;
    }
    .pix-comments-list {
        max-height: none;
    }
    .pix-data-text {
        max-height: none;
        overflow: visible;
    }
    .pix-comment-form {
        flex-wrap: wrap;
    }
    .pix-comment-form .pix-input {
        width: 100%;
        flex: none;
    }
    .pix-comment-form .pix-btn-primary {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
}

/* =========================================================================
   NSFW — Sistema de filtro +18
   ========================================================================= */
.pix-nsfw-hidden {
    display: none !important;
}
.pix-img-blurred {
    filter: blur(20px);
    pointer-events: none;
    user-select: none;
}
.pix-nsfw-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    text-align: center;
    padding: 15px;
    box-sizing: border-box;
}
.pix-nsfw-overlay i {
    font-size: 28px;
    opacity: 0.9;
}
.pix-nsfw-overlay span {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pix-btn-reveal {
    background: var(--pixai-accent);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.pix-btn-reveal:hover {
    background: var(--pixai-accent-hover);
}
.pix-nsfw-badge {
    background: var(--pixai-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Modal NSFW gate */
.pix-modal-nsfw-gate {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 3;
    color: #fff;
    text-align: center;
}
.pix-modal-nsfw-gate i {
    opacity: 0.8;
}
.pix-modal-nsfw-gate p {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}
.pix-modal-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Mini galería NSFW */
.mini-gallery-nsfw {
    position: relative;
}
.mini-nsfw-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--pixai-danger);
    color: #fff;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 11px;
    line-height: 1.4;
    z-index: 2;
}

/* Checkbox +18 en el studio */
.pix-nsfw-field {
    margin-bottom: 0;
}
.pix-nsfw-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--pixai-danger);
    text-transform: none;
    letter-spacing: 0;
    padding: 6px 10px;
    border: 1px solid var(--pixai-danger);
    border-radius: 5px;
    transition: background 0.2s;
    user-select: none;
}
.pix-nsfw-label:hover {
    background: rgba(241,65,108,0.1);
}
.pix-nsfw-checkbox {
    accent-color: var(--pixai-danger);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* LoRA entry en modal */
.pix-lora-entry {
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--color01);
}
.pix-lora-entry i {
    color: var(--pixai-accent);
}
.pix-lora-weight {
    display: block;
    color: #6c757d;
    font-size: 11px;
    text-transform: uppercase;
    margin-top: 2px;
}
.pix-loras-transparent {
    background: transparent;
    border: none;
    padding: 0;
}

/* Botón re-ocultar en modal */
.pix-btn-rehide {
    background: transparent;
    color: #f1416c;
    border: 1px solid #f1416c;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pix-btn-rehide:hover {
    background: #f1416c;
    color: #fff;
}

/* Buscador de modelos dinámico */
.pix-model-search-wrap {
    margin-top: 6px;
}

/* Nota informativa en campos */
.pix-field-note {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    font-style: italic;
}

/* =========================================================================
   Moderación de comentarios
   ========================================================================= */
.pix-comment-item {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
}
.pix-comment-text {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}
.pix-comment-hidden {
    opacity: 0.55;
    border-left-color: #6c757d;
}
.pix-comment-hidden-badge {
    font-size: 11px;
    color: #6c757d;
    font-style: italic;
    display: block;
    width: 100%;
}
.pix-comment-mod-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}
.pix-btn-mod-hide,
.pix-btn-mod-delete {
    background: transparent;
    border: 1px solid var(--color05);
    border-radius: 3px;
    padding: 3px 6px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    line-height: 1;
}
.pix-btn-mod-hide {
    color: #6c757d;
}
.pix-btn-mod-hide:hover {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}
.pix-btn-mod-delete {
    color: #f1416c;
    border-color: #f1416c;
}
.pix-btn-mod-delete:hover {
    background: #f1416c;
    color: #fff;
}

/* =========================================================================
   Paginación de galería
   ========================================================================= */
.pix-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.pix-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: #fff;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.pix-page-btn:hover {
    background: #009ef7;
    color: #fff;
    border-color: #009ef7;
    text-decoration: none;
}
.pix-page-active {
    background: #009ef7;
    color: #fff;
    border-color: #009ef7;
    pointer-events: none;
}
.pix-loadmore-wrap {
    text-align: center;
    margin: 30px 0;
}
.pix-loadmore-btn {
    padding: 12px 40px;
    font-size: 15px;
}

/* =========================================================================
   Reacciones
   ========================================================================= */
.pix-reactions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 15px 10px;
    background: var(--color04);
	border-top: 1px solid var(--al-border-color);
}
.pix-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color04);
	border: 1px solid var(--border03);
    border-radius: 20px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    line-height: 1;
}
.pix-reaction-btn:hover {
    border-color: #009ef7;
    background: rgba(0,158,247,0.06);
}
.pix-reaction-btn.pix-reaction-active {
    background: rgba(0,158,247,0.12);
    border-color: #009ef7;
    color: #009ef7;
    font-weight: 600;
}
.pix-reaction-emoji {
    font-size: 16px;
    line-height: 1;
}
.pix-reaction-count {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    min-width: 8px;
}
.pix-reaction-active .pix-reaction-count {
    color: #009ef7;
}
.pix-modal-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0;
}

.pix-lora-inputs {
    flex-wrap: wrap;
}
.pix-lora-inputs .pix-btn-secondary {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .pix-lora-id   { width: 35%; }
    .pix-lora-name { width: 100%; flex: none; order: 3; }
    .pix-lora-inputs .pix-btn-secondary { order: 2; }
}

/* =========================================================================
   v114 — Low Credits Banner
   ========================================================================= */
.pix-low-credits-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff8f0;
    border: 1px solid #f1c40f;
    border-left: 4px solid #f1c40f;
    border-radius: 6px;
    padding: 12px 18px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #856404;
}
.pix-low-credits-banner i {
    font-size: 18px;
    color: #f39c12;
    flex-shrink: 0;
}
.pix-low-credits-banner strong {
    color: #664d03;
}
.pix-low-credits-banner a {
    margin-left: auto;
    white-space: nowrap;
    font-weight: 600;
    color: var(--pixai-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 158, 247, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}
.pix-low-credits-banner a:hover {
    background: rgba(0, 158, 247, 0.2);
    text-decoration: none;
}
@media (max-width: 600px) {
    .pix-low-credits-banner {
        flex-wrap: wrap;
    }
    .pix-low-credits-banner a {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================================
   v114 — Payments Table
   ========================================================================= */
.pix-payments-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    font-size: 13px;
}
.pix-payments-table thead {
    background: #f8f9fa;
}
.pix-payments-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e1e4e8;
    white-space: nowrap;
}
.pix-payments-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.pix-payments-table tbody tr:last-child {
    border-bottom: none;
}
.pix-payments-table tbody tr:hover {
    background: #f8f9fa;
}
.pix-payments-table tbody td {
    padding: 12px 16px;
    color: #333;
    vertical-align: middle;
}
.pix-td-date {
    color: #6c757d !important;
    font-size: 12px !important;
    white-space: nowrap;
}
@media (max-width: 700px) {
    .pix-payments-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* =========================================================================
   v114 — Status Badges
   ========================================================================= */
.pix-status-ok {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(80, 205, 137, 0.12);
    color: var(--color01);
    border: 1px solid rgba(80, 205, 137, 0.4);
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pix-status-pending {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 193, 7, 0.12);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.4);
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pix-status-failed {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(241, 65, 108, 0.1);
    color: #c0143c;
    border: 1px solid rgba(241, 65, 108, 0.3);
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* =========================================================================
   v114 — Gateway Badges
   ========================================================================= */
.pix-badge-paypal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #003087;
    color: #fff;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.pix-badge-paypal::before {
    content: "P";
    background: #009cde;
    border-radius: 2px;
    padding: 0 3px;
    font-weight: 900;
}
.pix-badge-stripe {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #635bff;
    color: #fff;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.pix-badge-stripe::before {
    content: "S";
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    padding: 0 3px;
    font-weight: 900;
}
.pix-badge-unknown {
    display: inline-flex;
    align-items: center;
    background: #6c757d;
    color: #fff;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* =========================================================================
   v114 — Empty State
   ========================================================================= */
.pix-empty-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--color14);
	border: 1px solid var(--border04);
    border-radius: 8px;
    color: #6c757d;
}
.pix-empty-state p {
    font-size: 15px;
    margin: 0 0 10px 0;
    color: #495057;
}

/* =========================================================================
   v117/v118 — Model preview, manage & favorites
   ========================================================================= */

/* Favorite button */
.pix-model-actions-row {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    align-items: center;
}
.pix-btn-fav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    background: var(--color04);
	border: 1px solid var(--border01);
    border-radius: 5px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.2s;
    white-space: nowrap;
}
.pix-btn-fav:hover {
    border-color: #f39c12;
    color: #f39c12;
    background: #fff8f0;
}
.pix-btn-fav .icon {
    color: #ced4da;
    transition: color 0.2s;
}
.pix-btn-fav-active {
    background: #fff8f0 !important;
    border-color: #f39c12 !important;
    color: #f39c12 !important;
}
.pix-btn-fav-active .icon {
    color: #f39c12 !important;
}

/* Studio modal overlay (lighter than gallery modal) */
.pix-studio-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.pix-studio-modal {
    background: #fff;
    border-radius: 8px;
    width: 480px;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.pix-studio-modal-header {
    background: #151521;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.pix-studio-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.pix-studio-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
	background: var(--color14);	
}
.pix-studio-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border03);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    background: var(--color04);
}
.pix-model-preview {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 10px;
    margin-top: 6px;
}
.pix-model-preview img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.pix-model-preview-desc {
    font-size: 12px;
    color: #555;
    line-height: 1.4;
    flex: 1;
}

/* Model manage cards */
.pix-model-manage-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow 0.2s;
}
.pix-model-manage-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pix-model-manage-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}
.pix-model-manage-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #ccc;
    font-size: 20px;
    border-radius: 5px;
    flex-shrink: 0;
}
.pix-model-manage-info {
    flex: 1;
    min-width: 0;
}
.pix-model-manage-info strong {
    font-size: 14px;
    color: #333;
}
.pix-model-manage-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Type badges */
.pix-model-type-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
}
.pix-model-type-dit  { background: #009ef7; }
.pix-model-type-sdxl { background: #50cd89; }
.pix-model-type-sdv1 { background: #f1416c; }

/* =========================================================================
   Model description read more/less
   ========================================================================= */
.pix-model-desc-inner {
    font-size: 12px;
    color: var(--color02);
    line-height: 1.5;
    word-break: break-word;
}
.pix-model-desc-collapsed {
    max-height: 72px;
    overflow: hidden;
    position: relative;
}
.pix-model-desc-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: linear-gradient(transparent, var(--text-shadow01));
    pointer-events: none;
}
.pix-model-desc-toggle {
    background: none;
    border: none;
    padding: 4px 0 0 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--pixai-accent);
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: left;
}
.pix-model-desc-toggle:hover {
    text-decoration: underline;
}

/* =========================================================================
   v121/v122 — Batch, Seed, Prompt History, Presets
   ========================================================================= */

/* Batch selector */
.pix-batch-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.pix-batch-btn {
    flex: 1;
    padding: 7px 0;
    border: 1px solid var(--border01);
	border-radius: 5px;
	background: var(--color04);
	color: var(--color02);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.pix-batch-btn:hover {
    border-color: var(--pixai-accent);
    color: var(--pixai-accent);
    background: #f0f4ff;
}
.pix-batch-btn.pix-batch-active {
    border-color: var(--pixai-accent);
    background: var(--pixai-accent);
    color: #fff;
}

/* Prompt history dropdown */
.pix-prompt-history-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
}
.pix-history-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    color: #444;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
    gap: 6px;
}
.pix-history-item:last-child {
    border-bottom: none;
}
.pix-history-item:hover {
    background: #f8f9fa;
}

/* Preset cards */
.pix-preset-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border04);
    border-radius: 6px;
    margin-bottom: 10px;
    background: var(--color14);
    transition: box-shadow 0.15s;
}
.pix-preset-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pix-preset-info {
    flex: 1;
    min-width: 0;
}
.pix-preset-info strong {
    font-size: 14px;
    color: var(--color01);
    display: block;
}
.pix-preset-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #888;
    margin: 3px 0;
}
.pix-preset-prompt {
    font-size: 12px;
    color: #666;
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pix-preset-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-items: flex-end;
}
.pix-btn-sm {
    padding: 5px 10px !important;
    font-size: 12px !important;
}

/* =========================================================================
   v123/v124 — Albums, Profile, Filters
   ========================================================================= */

/* User profile header */
.pix-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--color14);
	border: 1px solid var(--border01);
    border-radius: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.pix-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--pixai-accent, #009ef7);
}
.pix-profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #bbb;
}
.pix-profile-info {
    flex: 1;
    min-width: 150px;
}
.pix-profile-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
}
.pix-profile-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.pix-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color01);
}
.pix-stat strong { font-size: 13px; color: var(--color01); }
.pix-profile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

/* Albums strip on profile */
.pix-albums-strip {
    margin-bottom: 16px;
    background: var(--color14);
	border: 1px solid var(--border04);
    border-radius: 8px;
    padding: 14px 16px;
}
.pix-albums-strip-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color01);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.pix-albums-strip-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.pix-album-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color04);
	border: 1px solid var(--border01);
    border-radius: 6px;
    padding: 6px 10px;
    text-decoration: none;
    color: #333;
    flex-shrink: 0;
    transition: box-shadow 0.15s;
    min-width: 130px;
}
.pix-album-chip:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.pix-album-chip-cover {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.pix-album-no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #adb5bd;
    font-size: 14px;
}
.pix-album-chip-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    display: block;
}
.pix-album-chip-count { font-size: 11px; color: #888; }
.pix-album-private { border-color: #f39c12; }

/* Gallery toolbar */
.pix-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
	background: var(--color14);
	padding: 20px;
	margin-top: 20px;
	border-radius: 10px;
}

/* Filter bar */
.pix-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    background: var(--color14);
	border: 1px solid var(--border04);
    border-radius: 6px;
    padding: 10px 14px;
    flex-wrap: wrap;
}
.pix-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}
.pix-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pix-filter-group label { color: #888; font-size: 13px; }
.pix-filter-select {
    padding: 5px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}
.pix-filter-clear {
    margin-left: auto;
    font-size: 12px;
    color: #f1416c;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Albums grid */
.pix-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.pix-album-card {
    background: var(--color14);
	border: 1px solid var(--border05);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.pix-album-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.pix-album-card-cover {
    display: block;
    position: relative;
    height: 140px;
    background: #f0f0f0;
    overflow: hidden;
    text-decoration: none;
}
.pix-album-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.pix-album-card:hover .pix-album-card-cover img { transform: scale(1.03); }
.pix-album-cover-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}
.pix-album-private-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(243,156,18,0.9);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
}
.pix-album-card-info { padding: 10px 12px 4px; }
.pix-album-card-name { font-size: 14px; font-weight: 700; color: var(--color01); }
.pix-album-card-count { font-size: 12px; color: #888; margin-top: 2px; }
.pix-album-card-desc { font-size: 12px; color: #666; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pix-album-card-actions {
    display: flex;
    gap: 6px;
    padding: 8px 12px 12px;
}

/* Move to album modal buttons */
.pix-album-pick-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 5px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background 0.15s;
}
.pix-album-pick-btn:hover { background: #e9ecef; }
.pix-album-pick-none { color: #888; }

/* =========================================================================
   Card actions two-row fix
   ========================================================================= */
.pix-card-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.pix-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}
.pix-card-actions-owner {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}
/* Card info: meta takes remaining space, actions-wrap stays right */
.pix-card-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    min-height: 0;
}
.pix-card-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.pix-card-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pix-card-author {
    display: block;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pix-card-time {
    display: block;
    font-size: 11px;
    color: #888;
}

/* =========================================================================
   v129 — Profile Cover Banner
   ========================================================================= */
.pix-cover-banner {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center 50%;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    overflow: hidden;
    border: 1px solid var(--border01);
    border-bottom: none;
    user-select: none;
}
.pix-cover-banner + .pix-profile-header {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
    margin-bottom: 16px;
    border-radius: 0 0 8px 8px;
}
.pix-cover-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.15);
    font-size: 48px;
}
.pix-cover-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 2;
}
.pix-cover-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
.pix-cover-btn:hover {
    background: rgba(0,0,0,0.8);
}
.pix-cover-btn-drag:hover {
    background: rgba(0,158,247,0.7);
    border-color: #009ef7;
}
.pix-cover-btn-danger:hover {
    background: rgba(241,65,108,0.7);
    border-color: #f1416c;
}
.pix-cover-repositioning {
    cursor: grab;
}
.pix-cover-repositioning:active {
    cursor: grabbing;
}
.pix-cover-reposition-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    gap: 12px;
    backdrop-filter: blur(4px);
    z-index: 3;
}

/* Cover picker grid items */
.pix-cover-pick-item {
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    border: 3px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
}
.pix-cover-pick-item:hover {
    border-color: var(--pixai-accent);
    transform: scale(1.02);
}
.pix-cover-pick-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .pix-cover-banner { height: 140px; }
    .pix-cover-actions { flex-wrap: wrap; }
}

/* =========================================================================
   Card layout fix — prevent meta from expanding card height
   ========================================================================= */
.pix-card-info {
    align-items: center !important;
    padding: 8px 10px !important;
    flex-wrap: nowrap;
    min-height: unset;
}
.pix-card-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}
.pix-card-author {
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.pix-card-time {
    font-size: 10px !important;
    color: #999;
    white-space: nowrap;
}
.pix-card-title {
    font-size: 12px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin: 0 0 1px 0 !important;
}
.pix-card-actions-wrap {
    flex-shrink: 0;
    align-self: center;
}

/* =========================================================================
   Card redesign — badges on image, title overlay, dropdown menu
   ========================================================================= */

/* +18 badge on image — top left */
.pix-badge-nsfw-img {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--pixai-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    pointer-events: none;
}

/* Star button — top right of image */
.pix-btn-img-star {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    background: rgba(0,0,0,0.45);
    border: none;
    color: rgba(255,255,255,0.7);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.pix-btn-img-star:hover,
.pix-btn-img-star.pix-starred {
    background: rgba(243,156,18,0.85);
    color: #fff;
    transform: scale(1.1);
}

/* Title overlay — bottom of image */
.pix-card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 20px 10px 8px;
    z-index: 3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

/* Card info — compact single row */
.pix-card-info {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    padding: 8px 10px !important;
    gap: 8px;
    background: var(--color08);
    min-height: unset !important;
}
.pix-card-meta {
    flex: 1 !important;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}
.pix-card-author {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}
.pix-card-time {
    font-size: 10px !important;
    color: #999 !important;
    white-space: nowrap !important;
}

/* Dropdown menu */
.pix-card-menu {
    position: relative;
    flex-shrink: 0;
}
.pix-btn-menu-toggle {
    background: transparent;
    border: 1px solid var(--border01);
    border-radius: 4px;
    color: #6c757d;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
}
.pix-btn-menu-toggle:hover,
.pix-card-menu.pix-menu-open .pix-btn-menu-toggle {
    background: var(--pixai-accent);
    border-color: var(--pixai-accent);
    color: #fff;
}
.pix-dropdown-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 4px);
    right: 0;
    background: var(--color04);
	border: 1px solid var(--border03);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 170px;
    z-index: 100;
    padding: 4px 0;
    overflow: hidden;
}
.pix-card-menu.pix-menu-open .pix-dropdown-menu {
    display: block;
}
.pix-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--color02);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}
.pix-dropdown-item:hover {
    background: #f8f9fa;
    color: var(--pixai-accent);
}
.pix-dropdown-item .icon {
    color: #6c757d;
    width: 16px;
    text-align: center;
}
.pix-dropdown-item:hover .icon {
    color: var(--pixai-accent);
}
.pix-dropdown-danger { color: var(--pixai-danger) !important; }
.pix-dropdown-danger .icon { color: var(--pixai-danger) !important; }
.pix-dropdown-danger:hover { background: rgba(241,65,108,0.06) !important; }
.pix-dropdown-divider {
    height: 1px;
    background: var(--border01);
    margin: 3px 0;
}

/* =========================================================================
   Follow button
   ========================================================================= */
.pix-btn-following {
    background: #e9ecef !important;
    color: #495057 !important;
    border: 1px solid #ced4da !important;
}
.pix-btn-following:hover {
    background: rgba(241,65,108,0.1) !important;
    color: var(--pixai-danger) !important;
    border-color: var(--pixai-danger) !important;
}

/* =========================================================================
   Image page
   ========================================================================= */
.pix-image-page {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    align-items: start;
}
.pix-image-main {
    position: sticky;
    top: 20px;
}
.pix-image-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.pix-image-full {
    width: 100%;
    height: auto;
    display: block;
    max-height: 85vh;
    object-fit: contain;
}
.pix-image-sidebar {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pix-image-header { border-bottom: 1px solid #f0f0f0; padding-bottom: 12px; }
.pix-image-title { font-size: 18px; font-weight: 700; margin: 0 0 6px 0; color: #222; }
.pix-image-meta { display: flex; flex-direction: column; gap: 2px; }
.pix-image-actions-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.pix-image-reactions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; background: transparent; border: none; }
@media (max-width: 800px) {
    .pix-image-page { grid-template-columns: 1fr; }
    .pix-image-main { position: static; }
}

/* =========================================================================
   Contests list
   ========================================================================= */
.pix-contests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.pix-contest-card {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.pix-contest-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.pix-contest-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pix-contest-title { font-size: 16px; font-weight: 700; margin: 0 0 8px 0; color: #222; }
.pix-contest-desc { font-size: 13px; color: #666; margin: 0 0 12px 0; line-height: 1.5; }
.pix-contest-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #888; margin-top: auto; }
.pix-contest-entries { font-weight: 600; }
.pix-contest-status { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.pix-contest-status-active  { background: rgba(80,205,137,0.15); color: #1a7a49; }
.pix-contest-status-upcoming { background: rgba(255,193,7,0.15); color: #856404; }
.pix-contest-status-ended   { background: rgba(108,117,125,0.15); color: #495057; }
.pix-contest-vote-badge { font-size: 11px; color: #888; }

/* =========================================================================
   Contest detail
   ========================================================================= */
.pix-contest-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
}
.pix-contest-page-title { font-size: 22px; font-weight: 700; margin: 8px 0; }
.pix-contest-page-desc  { color: #555; font-size: 14px; margin: 0 0 8px 0; }
.pix-contest-page-meta  { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #777; }
.pix-contest-entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.pix-contest-entry-card {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
    position: relative;
}
.pix-contest-entry-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.pix-my-entry { border-color: var(--pixai-accent); }
.pix-entry-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    font-size: 14px;
    font-weight: 700;
}
.pix-rank-gold   { background: rgba(255,215,0,0.9); color: #7a5a00; padding: 2px 8px; border-radius: 10px; }
.pix-rank-silver { background: rgba(192,192,192,0.9); color: #444; padding: 2px 8px; border-radius: 10px; }
.pix-rank-bronze { background: rgba(205,127,50,0.9); color: #fff; padding: 2px 8px; border-radius: 10px; }
.pix-rank-normal { background: rgba(0,0,0,0.5); color: #fff; padding: 2px 8px; border-radius: 10px; }
.pix-entry-img-wrap {
    display: block;
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #000;
}
.pix-entry-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.pix-contest-entry-card:hover .pix-entry-img-wrap img { transform: scale(1.03); }
.pix-entry-info { padding: 10px 12px 6px; }
.pix-entry-title  { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 3px; }
.pix-entry-author { font-size: 12px; color: var(--pixai-accent); }
.pix-entry-mine-badge { font-size: 11px; color: #f39c12; display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; }
.pix-btn-vote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 12px 12px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s;
}
.pix-btn-vote:hover { background: var(--pixai-accent); color: #fff; border-color: var(--pixai-accent); }
.pix-btn-vote.pix-voted { background: rgba(80,205,137,0.1); color: #1a7a49; border-color: #50cd89; }
.pix-vote-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    font-size: 13px;
    color: #888;
    font-weight: 600;
}

/* =========================================================================
   Username dropdown
   ========================================================================= */
.pix-user-dropdown {
    position: absolute;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 200px;
    z-index: 9999;
    overflow: hidden;
    padding: 4px 0;
}
.pix-user-dropdown-name {
    padding: 10px 14px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}
.pix-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background 0.1s;
}
.pix-user-dropdown-item:hover {
    background: #f8f9fa;
    color: var(--pixai-accent);
    text-decoration: none;
}
.pix-user-dropdown-item .icon {
    color: #888;
    width: 16px;
    text-align: center;
}
.pix-user-dropdown-item:hover .icon {
    color: var(--pixai-accent);
}

/* =========================================================================
   Image Page — modal-style dark layout
   ========================================================================= */
.pix-imgpage-wrap {
    background: var(--color14);
    border-radius: 8px;
    border: 1px solid var(--border04);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.pix-imgpage-header {
    padding: 14px 20px;
    background: var(--color14);
	border-bottom: 1px solid var(--border04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pix-imgpage-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.pix-imgpage-title {
    margin: 0;
    color: var(--color01);
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pix-imgpage-body {
    display: flex;
    min-height: 500px;
}
.pix-imgpage-col-img {
    flex: 1;
    background: var(--color04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.pix-imgpage-col-img > img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    display: block;
}
.pix-imgpage-reactions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.45));
}
.pix-imgpage-reactions .pix-reaction-btn {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.pix-imgpage-reactions .pix-reaction-btn:hover {
    background: rgba(255,255,255,0.35);
}
.pix-imgpage-reactions .pix-reaction-active {
    background: rgba(0,158,247,0.5);
    border-color: #009ef7;
}
.pix-imgpage-reactions .pix-reaction-count {
    color: #fff;
}
@media (max-width: 860px) {
    .pix-imgpage-body { flex-direction: column; }
    .pix-modal-col-data { width: 100% !important; border-left: none; border-top: 1px solid var(--border03); }
    .pix-imgpage-col-img > img { max-height: 55vw; }
    .pix-imgpage-reactions { position: static; background: #e9ecef; }
    .pix-imgpage-reactions .pix-reaction-btn { background: #fff; border-color: #ced4da; color: #333; }
    .pix-imgpage-reactions .pix-reaction-count { color: #495057; }
}

/* =========================================================================
   Contests
   ========================================================================= */
.pix-contest-card {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,.04);
}
.pix-contest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
}
.pix-contest-title { margin: 0 0 4px 0; font-size: 17px; }
.pix-contest-title a { color: #333; text-decoration: none; }
.pix-contest-title a:hover { color: var(--pixai-accent); }
.pix-contest-desc { margin: 0; color: #666; font-size: 13px; }
.pix-contest-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #888;
}
.pix-contest-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.pix-contest-status-active   { background: rgba(80,205,137,.12); color: #1a7a49; border: 1px solid rgba(80,205,137,.4); }
.pix-contest-status-upcoming { background: rgba(0,158,247,.1);   color: #007bc0; border: 1px solid rgba(0,158,247,.3); }
.pix-contest-status-ended    { background: #f8f9fa;              color: #6c757d; border: 1px solid #dee2e6; }

/* Contest page header */
.pix-contest-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Contest entries grid */
.pix-contest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.pix-contest-entry {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.pix-contest-entry:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.pix-my-entry { border-color: var(--pixai-accent); box-shadow: 0 0 0 2px rgba(0,158,247,.2); }
.pix-contest-entry-img {
    position: relative;
    height: 200px;
    cursor: pointer;
    overflow: hidden;
    background: #000;
}
.pix-contest-entry-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.pix-contest-entry:hover .pix-contest-entry-img img { transform: scale(1.05); }
.pix-contest-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.pix-contest-rank:first-of-type { background: rgba(243,156,18,.85); }
.pix-contest-votes-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.pix-contest-entry-info { padding: 10px 12px 4px; }
.pix-contest-entry-title  { font-size: 13px; font-weight: 700; color: #333; }
.pix-contest-entry-author { font-size: 12px; color: #888; margin-top: 2px; }
.pix-btn-vote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: calc(100% - 24px);
    margin: 8px 12px 12px;
    padding: 7px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: #f8f9fa;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.pix-btn-vote:hover { border-color: var(--pixai-accent); color: var(--pixai-accent); background: rgba(0,158,247,.06); }
.pix-btn-vote.pix-voted { background: rgba(80,205,137,.12); border-color: #50cd89; color: #1a7a49; }

/* Follow button in gallery profile */
.pix-btn-follow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    border: 1px solid var(--pixai-accent);
    background: var(--pixai-accent);
    color: #fff;
}
.pix-btn-follow:hover { background: var(--pixai-accent-hover); }
.pix-btn-follow.pix-following {
    background: transparent;
    color: var(--pixai-accent);
}
.pix-btn-follow.pix-following:hover {
    background: rgba(241,65,108,.08);
    border-color: var(--pixai-danger);
    color: var(--pixai-danger);
}

/* =========================================================================
   Contest gallery picker
   ========================================================================= */
.pix-contest-pick-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color .15s, transform .15s;
}
.pix-contest-pick-item:hover {
    border-color: var(--pixai-accent);
    transform: scale(1.03);
}
.pix-contest-pick-item.pix-contest-pick-selected {
    border-color: var(--pixai-success);
    box-shadow: 0 0 0 2px rgba(80,205,137,.3);
}
.pix-contest-pick-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pix-contest-pick-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: #fff;
    font-size: 10px;
    padding: 10px 4px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================================
   Publish flow — Tag input, draft badge
   ========================================================================= */
.pix-badge-draft {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,193,7,0.9);
    color: #333;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    pointer-events: none;
}
.pix-badge-private {
    position: absolute;
    top: 8px;
    right: 38px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 11px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    backdrop-filter: blur(3px);
}

/* Tag input */
.pix-tag-input-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border01);
    border-radius: 5px;
    background: var(--color04);
    cursor: text;
    min-height: 42px;
    transition: border-color .2s;
}
/*.pix-tag-input-wrap:focus-within {
    border-color: var(--pixai-accent);
    background: #fff;
}*/
.pix-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--pixai-accent);
    color: #fff;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
}
.pix-tag-chip button {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
}
.pix-tag-chip button:hover { color: #fff; }
.pix-tag-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    flex: 1;
    min-width: 80px;
    color: var(--color01);
}
.pix-tag-suggestions {
    background: var(--color14);
    border: 1px solid #e1e4e8;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    max-height: 180px;
    overflow-y: auto;
    margin-top: 2px;
}
.pix-tag-suggestion-item {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--color01);
    cursor: pointer;
    transition: background .1s;
}
.pix-tag-suggestion-item:hover { background: #f8f9fa; color: var(--pixai-accent); }

/* Contest tag pills in publish modal */
.pix-tag-contest-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #f39c12;
    border-radius: 20px;
    background: rgba(243,156,18,.08);
    color: #b07d00;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}
.pix-tag-contest-btn:hover { background: rgba(243,156,18,.2); }
.pix-tag-contest-btn.pix-tag-contest-added {
    background: rgba(80,205,137,.12);
    border-color: #50cd89;
    color: #1a7a49;
}

/* =========================================================================
   Bonus Credits Toast
   ========================================================================= */
.pix-bonus-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a7a49, #50cd89);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(80,205,137,.3);
    transition: opacity .4s;
}
.pix-bonus-toast i { font-size: 18px; }

/* =========================================================================
   Card — album link
   ========================================================================= */
.pix-card-album {
    font-size: 10px;
    color: var(--pixai-accent);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: .8;
    transition: opacity .15s;
}
.pix-card-album:hover { opacity: 1; text-decoration: underline; }

/* =========================================================================
   Maintenance banner
   ========================================================================= */
.pix-maintenance-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #7f1d1d, #ef4444);
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    margin: 0 0 16px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(239,68,68,.3);
}
.pix-maintenance-banner i { font-size: 20px; flex-shrink: 0; }
.pix-maintenance-banner strong { display: block; font-size: 15px; margin-bottom: 2px; }
.pix-maintenance-banner.pix-maintenance-admin {
    background: linear-gradient(135deg, #78350f, #f59e0b);
    box-shadow: 0 4px 12px rgba(245,158,11,.3);
}
.studio-btn-generate:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: .8;
}

/* =========================================================================
   Img2Img drop zone
   ========================================================================= */
.pix-img2img-drop {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: #f8f9fa;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.pix-img2img-drop:hover,
.pix-img2img-drop-over {
    border-color: var(--pixai-accent);
    background: rgba(59,130,246,.05);
}

/* ==========================================================================
   Index Widgets
   ========================================================================== */

.pixai-widgets-wrapper {
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pixai-widget {
    background: var(--color14);
	border: 1px solid var(--border04);
    border-radius: 10px;
    overflow: hidden;
}

.pixai-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--color04);
	border-bottom: 1px solid var(--border04);
    font-weight: 600;
    font-size: 13px;
}

.pixai-widget-icon {
    color: var(--pixai-accent, #6366f1);
    font-size: 14px;
}

.pixai-widget-title {
    flex: 1;
    color: var(--color02);
}

.pixai-widget-more {
    font-size: 11px;
    font-weight: 500;
    color: var(--pixai-accent, #6366f1);
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.85;
    transition: opacity .15s;
}
.pixai-widget-more:hover { opacity: 1; }

/* --- Grid de imágenes recientes --- */
.pixai-widget-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 6px;
    padding: 10px;
}

.pixai-widget-img-wrap {
    position: relative;
    display: block;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 9/16;
    background: var(--pixai-surface-alt, #f0f0f0);
    text-decoration: none;
}

.pixai-widget-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s;
}
.pixai-widget-img-wrap:hover .pixai-widget-img { transform: scale(1.04); }

.pixai-img-blur { filter: blur(12px); }

.pixai-nsfw-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,.55);
    color: #fff;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 10px;
}

.pixai-widget-img-author {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: #fff;
    font-size: 10px;
    padding: 10px 5px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity .2s;
}
.pixai-widget-img-wrap:hover .pixai-widget-img-author { opacity: 1; }

/* --- Fila de widgets de listas --- */
.pixai-widgets-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

/* --- Listas (modelos, loras) --- */
.pixai-widget-list-items {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.pixai-widget-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 3px solid var(--border04);
    transition: background .12s;
}
.pixai-widget-list-item:last-child { border-bottom: none; }

.pixai-widget-model-thumb {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.pixai-widget-model-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pixai-surface-alt, #f0f0f0);
    color: var(--pixai-muted, #999);
    font-size: 14px;
}

.pixai-widget-model-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pixai-widget-model-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color01);
}

.pixai-widget-author {
    font-size: 10px;
    color: var(--pixai-muted, #999);
}

.pixai-widget-lora-id {
    font-size: 10px;
    color: var(--pixai-muted, #888);
    background: var(--pixai-surface-alt, #f0f0f0);
    border-radius: 3px;
    padding: 1px 4px;
}

.pixai-widget-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    padding: 1px 5px;
    letter-spacing: .03em;
    width: fit-content;
}
.pixai-badge-dit  { background: #ede9fe; color: #6d28d9; }
.pixai-badge-sdxl { background: #dbeafe; color: #1d4ed8; }
.pixai-badge-sdv1 { background: #dcfce7; color: #15803d; }

/* Responsive */
@media (max-width: 600px) {
    .pixai-widget-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    .pixai-widgets-row {
        grid-template-columns: 1fr;
    }
}

/* Widget: imagen con contador */
.pixai-widget-img-count {
    position: absolute;
    bottom: 20px;
    left: 5px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 10px;
    border-radius: 4px;
    padding: 2px 5px;
}

/* Widget: texto de comentario */
.pixai-widget-comment-text {
    font-size: 11px;
    color: var(--pixai-muted, #666);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* Widget: pill de reacción */
.pixai-reaction-pill {
    display: inline-block;
    background: var(--pixai-surface-alt, #f0f0f0);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    margin-left: 4px;
}

/* ==========================================================================
   Panel de publicación desde el Studio
   ========================================================================== */

.pix-publish-panel {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border04);
    border-radius: 10px;
    background: var(--color04);
}

.pix-publish-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 14px 0;
    color: var(--color01);
}

.pix-publish-images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.pix-publish-img-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    width: 80px;
    height: 110px;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color .2s;
}

.pix-publish-img-wrap.pix-publish-img-done {
    border-color: #50cd89;
}

.pix-publish-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pix-publish-img-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 16px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}

.pix-publish-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.pix-publish-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pix-publish-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pix-publish-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.pix-publish-ok {
    background: rgba(80,205,137,.12);
    color: #1a7a4a;
    border: 1px solid rgba(80,205,137,.3);
}

.pix-publish-error {
    background: rgba(241,65,108,.1);
    color: #c0133a;
    border: 1px solid rgba(241,65,108,.25);
}

/* ==========================================================================
   Selector de modelos — Grid visual de cards
   ========================================================================== */

.pix-model-grid {
    margin-top: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 2px;
}

.pix-model-grid-loading {
    color: var(--pixai-muted, #999);
    font-size: 13px;
    padding: 10px 0;
}

.pix-model-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--pixai-muted, #888);
    margin: 10px 0 5px 0;
}
.pix-model-group-label:first-child { margin-top: 0; }

.pix-model-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
    margin-bottom: 4px;
}

.pix-model-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s, transform .15s;
    background: var(--pixai-surface-alt, #f0f0f0);
}
.pix-model-card:hover { transform: translateY(-2px); border-color: var(--pixai-accent, #6366f1); }
.pix-model-card-active { border-color: var(--pixai-accent, #6366f1) !important; box-shadow: 0 0 0 2px rgba(99,102,241,.25); }

.pix-model-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.pix-model-card-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pixai-muted, #aaa);
    font-size: 20px;
    background: var(--pixai-surface-alt, #e8e8e8);
}

.pix-model-card-star {
    position: absolute;
    top: 3px;
    right: 3px;
    color: #f39c12;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.pix-model-card-info {
    padding: 4px 4px 5px;
    background: linear-gradient(transparent, rgba(0,0,0,.6));
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pix-model-card-name {
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.pix-model-card-badge {
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    border-radius: 2px;
    padding: 0 3px;
    width: fit-content;
    letter-spacing: .02em;
}

/* Panel descripción + favorito */
.pix-model-desc-panel {
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--color14);
    border-radius: 6px;
    border: 1px solid var(--al-border-color);
}

.pix-model-desc-text {
    font-size: 12px;
    color: var(--pixai-muted, #666);
    margin-bottom: 6px;
    line-height: 1.4;
}

.pix-btn-fav-small {
    font-size: 11px;
    padding: 3px 8px;
}

/* ==========================================================================
   Panel de publicación — Grid individual por imagen
   ========================================================================== */

.pix-publish-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.pix-publish-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pix-publish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.pix-pub-card {
    border: 1px solid var(--border01);
    border-radius: 10px;
    overflow: hidden;
    background: var(--color14);
    transition: border-color .15s;
}

.pix-pub-card-done {
    border-color: #50cd89;
}

.pix-pub-card-img-wrap {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--color14);
}

.pix-pub-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pix-pub-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
}

.pix-pub-card-fields {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.pix-pub-title,
.pix-pub-tags {
    font-size: 12px !important;
    padding: 5px 8px !important;
}

.pix-pub-card-opts {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pix-pub-opt {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    cursor: pointer;
    color: var(--color02);
}

.pix-pub-btn {
    width: 100%;
    font-size: 12px !important;
    padding: 6px 10px !important;
    justify-content: center;
}

@media (max-width: 600px) {
    .pix-publish-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================================================
   Tags clicables en página de imagen individual
   ========================================================================= */
.pix-imgpage-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.pix-tag-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--pixai-accent-alpha);
    color: var(--pixai-accent);
    border: 1px solid var(--pixai-accent);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.pix-tag-link:hover {
    background: var(--pixai-accent);
    color: #fff;
    text-decoration: none;
}

/* =========================================================================
   Tag activo en barra de filtros de galería
   ========================================================================= */
.pix-filter-tag-active {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--pixai-accent-alpha);
    border: 1px solid var(--pixai-accent);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 13px;
    color: var(--pixai-accent);
}
.pix-active-tag {
    font-weight: 600;
}
.pix-filter-tag-clear {
    color: var(--pixai-accent);
    opacity: .7;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
}
.pix-filter-tag-clear:hover { opacity: 1; }

/* =========================================================================
   Nube de tags
   ========================================================================= */
.pix-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 14px 16px;
    background: var(--color14);
    border: 1px solid var(--border04);
    border-radius: 8px;
    margin-bottom: 14px;
}
.pix-tag-cloud-compact {
    padding: 0;
    background: transparent;
    border: none;
    margin-bottom: 0;
    margin-top: 6px;
}
.pix-tag-cloud-item {
    display: inline-flex;
    align-items: center;
    background: var(--color04);
    border: 1px solid var(--border01);
    border-radius: 20px;
    padding: 3px 10px;
    text-decoration: none;
    color: var(--color02);
    font-weight: 600;
    transition: background .15s, border-color .15s, color .15s;
    line-height: 1.3;
}
.pix-tag-cloud-item:hover {
    background: var(--pixai-accent-alpha);
    border-color: var(--pixai-accent);
    color: var(--pixai-accent);
    text-decoration: none;
}
.pix-tag-cloud-active {
    background: var(--pixai-accent) !important;
    border-color: var(--pixai-accent) !important;
    color: #fff !important;
}
/* Tamaños relativos según popularidad */
.pix-tag-cloud-size-1 { font-size: 11px; opacity: .75; }
.pix-tag-cloud-size-2 { font-size: 12px; opacity: .85; }
.pix-tag-cloud-size-3 { font-size: 13px; }
.pix-tag-cloud-size-4 { font-size: 14px; font-weight: 700; }
.pix-tag-cloud-size-5 { font-size: 16px; font-weight: 700; color: var(--pixai-accent); border-color: var(--pixai-accent); }

/* =========================================================================
   Altura uniforme de cards en el grid
   ========================================================================= */
.pix-gallery-public {
    align-items: start;
}
