/* Plugin Modal Cover Design - Large Icon Display */
#pluginDetailModal .cover-preview {
    height: 250px !important;
    width: 220px !important;
    margin: 0 auto !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}

#pluginDetailModal .cover-design.plugin-cover {
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 12px !important;
    position: relative !important;
}

/* Large icon in modal - centered alone */
#pluginDetailModal .cover-design i {
    font-size: 6rem !important;
    color: white !important;
    opacity: 0.9 !important;
    margin: 0 !important;
}



/* Category colors for modal covers */
#pluginDetailModal .cover-design.roleplay { background: linear-gradient(135deg, #6b46c1 0%, #553091 100%) !important; }
#pluginDetailModal .cover-design.story { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important; }
#pluginDetailModal .cover-design.system { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important; }
#pluginDetailModal .cover-design.style { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important; }
#pluginDetailModal .cover-design.utility { background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; }
#pluginDetailModal .cover-design.nsfw { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important; }
#pluginDetailModal .cover-design.sfw { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important; }
#pluginDetailModal .cover-design.plot { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important; }
#pluginDetailModal .cover-design.npc-handling { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; }
#pluginDetailModal .cover-design.user-handling { background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important; }
#pluginDetailModal .cover-design.emotions-needs { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important; }
#pluginDetailModal .cover-design.other { background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%) !important; }

/* Custom cover image styling */
#pluginDetailModal .custom-cover-container {
    position: relative;
    height: 100%;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

#pluginDetailModal .custom-cover-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Plugin action details styling */
#pluginDetailModal .message-pool-list,
#pluginDetailModal .variables-list {
    margin-top: 0.5rem;
    padding-left: 1rem;
}

#pluginDetailModal .pool-message,
#pluginDetailModal .variable-item {
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}

#pluginDetailModal .message-index {
    color: var(--primary);
    font-weight: bold;
    margin-right: 0.5rem;
}

#pluginDetailModal .message-text {
    font-style: italic;
}

/* Sub-settings for advanced features */
#pluginDetailModal .sub-settings {
    margin-top: 0.5rem;
    padding-left: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

#pluginDetailModal .sub-settings > div {
    margin-bottom: 0.3rem;
}

#pluginDetailModal .template-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-style: italic;
    font-size: 0.9rem;
}

/* Desktop specific button layout */
.desktop-action-buttons {
    display: none;
}

@media (min-width: 769px) {
    #pluginDetailModal .rating-report-container,
    #pluginDetailModal .lorebook-usage {
        display: none !important;
    }
    
    /* Modal structure for desktop */
    #pluginDetailModal .modal-content {
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }
    
    #pluginDetailModal .modal-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        flex: 1;
    }
    
    #pluginDetailModal .modal-scrollable-content {
        overflow-y: auto;
        flex: 1;
        padding-bottom: 1rem;
    }
    
    .desktop-action-buttons {
        display: block !important;
        position: relative;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(10px);
        padding: 1rem;
        margin: 0;
        border-top: 1px solid rgba(139, 92, 246, 0.2);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .desktop-buttons-container {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
        border: 1px solid rgba(139, 92, 246, 0.3);
        border-radius: 16px;
        padding: 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 2rem;
        max-width: 800px;
        margin: 0 auto;
        box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
        backdrop-filter: blur(10px);
    }
    
    .desktop-rating-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        flex: 1;
    }
    
    .desktop-rating-label {
        font-size: 0.9rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin: 0;
    }
    
    #desktopUserStarRating {
        display: flex;
        justify-content: center;
        gap: 0.4rem;
        font-size: 1.8rem;
        margin: 0;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
    }
    
    #desktopUserStarRating i {
        cursor: pointer;
        color: #FBBF24;
        transition: all 0.2s ease;
        text-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    }
    
    #desktopUserStarRating i:hover {
        transform: scale(1.2) translateY(-2px);
        filter: brightness(1.2);
    }
    
    #desktopUserStarRating i.fas {
        animation: starPulse 1.5s ease-in-out;
    }
    
    @keyframes starPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.3); }
        100% { transform: scale(1); }
    }
    
    #desktopRatingMessage {
        font-size: 0.85rem;
        color: var(--primary);
        margin: 0;
        height: 1rem;
        opacity: 0.8;
    }
    
    .desktop-action-divider {
        width: 1px;
        height: 60px;
        background: linear-gradient(to bottom, transparent, rgba(139, 92, 246, 0.4), transparent);
    }
    
    .desktop-button-group {
        display: flex;
        gap: 1rem;
        flex: 1;
        justify-content: center;
    }
    
    .desktop-usage-buttons {
        display: flex;
        flex-direction: row;
        gap: 1rem;
    }
    
    .desktop-usage-buttons .btn {
        padding: 0.75rem 1.5rem;
        border-radius: 10px;
        font-weight: 500;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .desktop-usage-buttons .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
    
    .desktop-usage-buttons .btn.primary {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        border: none;
    }
    
    .desktop-usage-buttons .btn.secondary {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .desktop-report-section {
        flex: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    
    .desktop-report-section .btn {
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid rgba(239, 68, 68, 0.3);
        color: #ef4444;
        padding: 0.6rem 1.2rem;
        border-radius: 10px;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }
    
    .desktop-report-section .btn:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.5);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    }
    
    .desktop-report-section .btn i {
        font-size: 0.85rem;
        margin-right: 0.4rem;
    }
    
    /* Desktop Report Button above Description */
    .desktop-report-above-description {
        display: block !important;
        text-align: center;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .desktop-report-above-description .btn {
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid rgba(239, 68, 68, 0.3);
        color: #ef4444;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-size: 0.85rem;
        transition: all 0.3s ease;
    }
    
    .desktop-report-above-description .btn:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.5);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    }
    
    .desktop-report-above-description .btn i {
        font-size: 0.8rem;
        margin-right: 0.4rem;
    }
}

/* Mobile: keep original buttons visible */
@media (max-width: 768px) {
    .desktop-action-buttons {
        display: none !important;
    }
    
    .desktop-report-above-description {
        display: none !important;
    }
}

/* Center all plugin modal content */
#pluginDetailModal .modal-header {
    text-align: center;
    justify-content: center;
    position: relative;
}

#pluginDetailModal .modal-header h3 {
    margin: 0 auto;
}

#pluginDetailModal .modal-header .close-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

#pluginDetailModal .lorebook-meta-info {
    text-align: center;
    align-items: center;
}

#pluginDetailModal .lorebook-info {
    text-align: center;
    align-items: center;
}

#pluginDetailModal .lorebook-info p {
    text-align: center;
}

#pluginDetailModal .lorebook-description {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 80%;
}

#pluginDetailModal .rating-report-container {
    justify-content: center;
    text-align: center;
}

#pluginDetailModal .user-rating {
    text-align: center;
}

#pluginDetailModal .report-section {
    text-align: center;
}

#pluginDetailModal .lorebook-usage {
    text-align: center;
}

#pluginDetailModal .usage-buttons {
    justify-content: center;
}

#pluginDetailModal .lorebook-entries {
    text-align: center;
}

#pluginDetailModal .lorebook-entries h3 {
    text-align: center;
}

#pluginDetailModal .entry-header {
    text-align: center;
}

#pluginDetailModal .entry-content {
    text-align: left;
}

#pluginDetailModal .command-container {
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#pluginDetailModal .usage-instructions {
    text-align: center;
}

#pluginDetailModal .usage-instructions ol {
    display: inline-block;
    text-align: left;
}

/* Mobile specific centering */
@media (max-width: 768px) {
    #pluginDetailModal .lorebook-detail-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    #pluginDetailModal .lorebook-meta-info {
        width: 100%;
        text-align: center !important;
        align-items: center !important;
    }
    
    #pluginDetailModal .cover-preview {
        margin: 0 auto 1.5rem;
    }
    
    #pluginDetailModal .lorebook-info {
        text-align: center !important;
        width: 100%;
        align-items: center !important;
    }
    
    #pluginDetailModal .lorebook-description {
        text-align: center !important;
        margin: 1rem auto;
        max-width: 90%;
    }
    
    #pluginDetailModal .rating-report-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    #pluginDetailModal .usage-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    #pluginDetailModal .usage-buttons .btn {
        width: 100%;
    }
    
    #pluginDetailModal .lorebook-entries {
        width: 100%;
        padding: 0 1rem;
    }
    
    #pluginDetailModal .entry-content {
        text-align: left;
        padding: 0 1rem;
    }
    
    #pluginDetailModal .plugin-settings {
        text-align: left;
    }
    
    #pluginDetailModal .message-pool {
        text-align: left;
    }
    
    #pluginDetailModal .usage-instructions ol {
        max-width: 90%;
        margin: 0 auto;
    }
}