.pcd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pcd-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    background: #ffffff;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    position: relative;
}

/* Kachelgrößen steuern max-width, Grid macht Rest */
.pcd-card-size-small {
    max-width: 240px;
}

.pcd-card-size-medium {
    max-width: 320px;
}

.pcd-card-size-large {
    max-width: 400px;
}

.pcd-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
}

.pcd-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.pcd-card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

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

.pcd-card-image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcd-card-image-placeholder-text {
    font-size: 12px;
    color: #888;
}

/* Badge oben rechts */
.pcd-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.pcd-card-badge-new {
    background: #28a745;
}

.pcd-card-badge-update {
    background: #007bff;
}

.pcd-card-badge-beta {
    background: #ffc107;
    color: #333;
}

.pcd-card-body {
    padding: 10px 12px 12px;
}

.pcd-card-title {
    font-size: 16px;
    margin: 0 0 4px;
}

.pcd-card-version {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.pcd-card-short {
    font-size: 13px;
    margin: 0;
    color: #555;
}

/* Single view */

.pcd-single {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
}

.pcd-single-hero {
    margin-bottom: 8px;
}

.pcd-single-hero-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    cursor: pointer;
}

/* Thumbnails unterhalb des Hero-Bildes */
.pcd-single-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.pcd-single-thumb {
    width: 90px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f7;
    cursor: pointer;
}

.pcd-single-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcd-single-short {
    font-size: 15px;
    color: #444;
    margin: 6px 0 14px;
}

.pcd-single-version {
    font-size: 13px;
    color: #666;
}

.pcd-single-main h2 {
    font-size: 18px;
    margin-top: 14px;
    margin-bottom: 6px;
}

.pcd-single-description,
.pcd-single-changelog {
    font-size: 14px;
    color: #333;
}

.pcd-single-meta {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pcd-meta-separator {
    opacity: 0.5;
}

.pcd-single-download {
    margin-top: 16px;
}

.pcd-download-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: #2271b1;
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.pcd-download-button:hover {
    background: #1b5a8d;
}

.pcd-single-no-file {
    margin-top: 12px;
    font-size: 13px;
    color: #777;
}

/* Simple Lightbox */

.pcd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.pcd-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
}

.pcd-lightbox-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.pcd-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.pcd-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
