/* Plugins CSS */

/* --- Plugin Grid (List View) --- */
.plugins-hero {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.plugins-hero h1 span {
    color: var(--bs-info);
}

.plugin-filters {
    background: var(--bs-gray-800, #343a40);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select, .search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--bs-gray-600, #6c757d);
    border-radius: 0.25rem;
    background: var(--bs-gray-900, #212529);
    color: white;
    flex: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.plugin-card {
    background: var(--bs-gray-800, #343a40);
    border: 1px solid var(--bs-gray-700, #495057);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.plugin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: var(--bs-primary);
}

.plugin-icon-wrapper {
    position: relative;
    height: 200px;
    background: var(--bs-gray-900, #212529);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.plugin-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plugin-icon {
    max-width: 64px;
    max-height: 64px;
}

.plugin-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    backdrop-filter: blur(4px);
}

.plugin-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.plugin-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.plugin-title a {
    color: white;
    text-decoration: none;
}

.plugin-title a:hover {
    color: var(--bs-primary);
}

.plugin-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--bs-gray-400, #adb5bd);
}

.compatibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--bs-success);
}

.plugin-description {
    color: var(--bs-gray-300, #dee2e6);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: auto;
}

.plugin-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-gray-700, #495057);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Plugin Detail --- */
.plugin-detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .plugin-detail-layout {
        grid-template-columns: 1fr;
    }
}

.plugin-main-content .card {
    background: var(--bs-gray-800, #343a40);
    border: 1px solid var(--bs-gray-700, #495057);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.card-content {
    padding: 1.5rem;
}

.card-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-gray-700, #495057);
    color: var(--bs-primary);
}

.plugin-prose {
    color: var(--bs-gray-300, #dee2e6);
    line-height: 1.6;
}

.plugin-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bs-gray-900, #212529);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem;
    font-size: 0.75rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.video-item {
    margin-bottom: 1.5rem;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    background: black;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Releases --- */
.plugin-releases {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.release-item {
    background: var(--bs-gray-900, #212529);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--bs-gray-600, #6c757d);
}

.release-latest {
    border-left-color: var(--bs-success);
    background: rgba(25, 135, 84, 0.1);
}

.release-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.release-version {
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.release-changelog {
    font-size: 0.9rem;
    color: var(--bs-gray-400, #adb5bd);
    padding-left: 1rem;
    border-left: 2px solid var(--bs-gray-700, #495057);
    margin: 0.5rem 0;
}

/* --- Documentation --- */
.doc-item {
    margin-bottom: 1.5rem;
}

.doc-title {
    font-size: 1.1rem;
    color: var(--bs-info);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

/* --- Lightbox --- */
.plugin-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 2rem;
}

.plugin-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.plugin-lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--bs-danger);
}

.lightbox-bottom {
    margin-top: 1rem;
    text-align: center;
    width: 100%;
    max-width: 90%;
}

.lightbox-caption {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.lightbox-original-link {
    color: var(--bs-info);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--bs-info);
    border-radius: 2rem;
    transition: all 0.2s;
}

.lightbox-original-link:hover {
    background: var(--bs-info);
    color: black;
}
