.hero-spacer {
    height: var(--nav-height);
    width: 100%;
}

.marketplace-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.filter-select {
    padding: 0.6rem 2rem 0.6rem 1.25rem;
    border-radius: 999px;
    background: var(--color-bg-elevated-hover);
    color: var(--color-text-primary);
    border: 1px solid rgba(255,255,255,0.1);
    appearance: none;
    font-weight: 600;

    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    padding-top: 1rem;
}

.extension-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.extension-card:hover {
    background: var(--color-bg-elevated-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.card-content-wrapper {
    flex-grow: 1;
    margin-bottom: 0.5rem;
}

.extension-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    border: 2px solid var(--color-primary);
    background-color: var(--color-bg-base);
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--color-primary-glow);
}

.extension-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.extension-status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-top: 0.4rem;
    display: inline-block;
    letter-spacing: 0.5px;
}

.badge-installed {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-local {
    background: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.extension-action-button {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    margin-top: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-install {
    background: var(--color-primary);
    color: white;
}
.btn-install:hover {
    background: #a78bfa;
    transform: scale(1.02);
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.btn-uninstall {
    background: #dc2626;
    color: white;
    margin-top: auto;
}

.btn-uninstall:hover {
    background: #ef4444;
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

.extension-card.skeleton {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;

    box-shadow: none;
    transform: none;
}
.extension-card.skeleton:hover {
    background: var(--bg-surface);
    box-shadow: none;
    transform: none;
}
.skeleton-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-bottom: 0.75rem;

    border: 2px solid rgba(255,255,255,0.05);
}
.skeleton-text.title-skeleton {
    height: 1.1em;
    margin-bottom: 0.25rem;
}
.skeleton-text.text-skeleton {
    height: 0.7em;
    margin-bottom: 0;
}
.skeleton-button {
    width: 100%;
    height: 32px;
    border-radius: 999px;
    margin-top: auto;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    color: var(--color-text-primary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 450px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 20px var(--color-primary-glow);
    border: 1px solid rgba(255,255,255,0.1);
    transform: translateY(-50px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease-in-out;
    opacity: 0;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: translateY(0);
    opacity: 1;
}

#modalTitle {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 0;
    color: var(--color-primary);
    border-bottom: 2px solid rgba(255,255,255,0.05);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

#modalMessage {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-button {

    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-button.btn-install {
    background: var(--color-primary);
    color: white;
}
.modal-button.btn-install:hover {
    background: #a78bfa;
    transform: scale(1.02);
}

.modal-button.btn-uninstall {
    background: #dc2626;
    color: white;
}
.modal-button.btn-uninstall:hover {
    background: #ef4444;
    transform: scale(1.02);
}

.extension-author {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.extension-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-available {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.nsfw-ext {
    border-color: rgba(220, 38, 38, 0.3);
}

.broken-ext {
    filter: grayscale(0.8);
    opacity: 0.7;
    border: 1px dashed #ef4444; /* Borde rojo discontinuo */
}

.broken-ext:hover {
    transform: none; /* Evitamos que se mueva al pasar el ratón si está rota */
}

/* Estilos para los Tabs */
.tabs-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.tab-button {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-button.active {
    color: var(--color-primary);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -0.6rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--color-primary-glow);
}

.marketplace-section-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 2rem 0 1rem 0;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: capitalize;
}

.marketplace-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 2px;
}

.category-group {
    margin-bottom: 3rem;
}

.hidden {
    display: none !important;
}