.nl4k-cams {
    --nl4k-red: #e3242b;
    --nl4k-red-dark: #c91d24;
    --nl4k-text: #171717;
    --nl4k-muted: #6d6d6d;
    --nl4k-border: #e8e8e8;
    --nl4k-surface: #ffffff;
    --nl4k-radius: 10px;
    width: 100%;
}

.nl4k-grid {
    display: grid;
    grid-template-columns: repeat(var(--nl4k-cols-desktop, 6), minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.nl4k-card {
    min-width: 0;
    overflow: hidden;
    background: var(--nl4k-surface);
    border: 1px solid var(--nl4k-border);
    border-radius: var(--nl4k-radius);
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

@media (hover:hover) {
    .nl4k-card:hover {
        transform: translateY(-2px);
        border-color: #d8d8d8;
        box-shadow: 0 6px 18px rgba(0,0,0,.08);
    }
}

.nl4k-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eeeeee;
    text-decoration: none;
}

.nl4k-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

@media (hover:hover) {
    .nl4k-card:hover .nl4k-thumb img { transform: scale(1.015); }
}

.nl4k-live-badge,
.nl4k-hd-badge {
    position: absolute;
    top: 7px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 5px;
    font: 700 10px/1 Arial, sans-serif;
    letter-spacing: .04em;
}

.nl4k-live-badge {
    left: 7px;
    color: #fff;
    background: rgba(227,36,43,.96);
}

.nl4k-hd-badge {
    right: 7px;
    color: #fff;
    background: rgba(20,20,20,.78);
}

.nl4k-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
}

.nl4k-card-body { padding: 10px; }

.nl4k-username {
    display: block;
    overflow: hidden;
    margin: 0 0 9px;
    color: var(--nl4k-text);
    font: 800 15px/1.25 Arial, sans-serif;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nl4k-username:hover { color: var(--nl4k-red); }

.nl4k-preview-button,
.nl4k-load-more,
.nl4k-preview-cta,
.nl4k-preview-close {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font: 700 12px/1 Arial, sans-serif;
    text-decoration: none;
}

.nl4k-preview-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 36px;
    padding: 9px 10px;
    color: #fff;
    background: var(--nl4k-red);
    transition: background .15s ease, transform .15s ease;
}

.nl4k-preview-button:hover,
.nl4k-preview-button:focus-visible,
.nl4k-preview-button.is-active { background: var(--nl4k-red-dark); }
.nl4k-preview-button:active { transform: translateY(1px); }
.nl4k-preview-icon { font-size: 10px; }

.nl4k-load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 22px 0 4px;
}

.nl4k-load-more {
    min-width: 190px;
    min-height: 42px;
    padding: 12px 24px;
    color: #fff;
    background: #181818;
    transition: background .15s ease, opacity .15s ease;
}
.nl4k-load-more:hover,
.nl4k-load-more:focus-visible { background: var(--nl4k-red); }
.nl4k-load-more:disabled { cursor: wait; opacity: .65; }

.nl4k-empty {
    padding: 22px;
    border: 1px solid var(--nl4k-border);
    border-radius: var(--nl4k-radius);
    color: var(--nl4k-muted);
    text-align: center;
}

.nl4k-preview-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    width: 100%;
    margin: 2px 0 4px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid #dedede;
    border-top: 3px solid var(--nl4k-red);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0,0,0,.10);
}

.nl4k-preview-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
}

.nl4k-preview-media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.nl4k-preview-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cfcfcf;
    font: 600 13px/1.4 Arial, sans-serif;
    background: #111;
}
.nl4k-preview-loading.is-hidden { display: none; }

.nl4k-preview-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
    padding: 6px 4px;
}

.nl4k-preview-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-bottom: 8px;
    color: var(--nl4k-red);
    font: 800 11px/1 Arial, sans-serif;
    letter-spacing: .05em;
}

.nl4k-preview-title {
    overflow: hidden;
    margin: 0 0 7px;
    color: var(--nl4k-text);
    font: 800 20px/1.2 Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nl4k-preview-details {
    display: grid;
    gap: 0;
    margin: 2px 0 16px;
    padding: 0;
}

.nl4k-preview-detail {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #ededed;
}

.nl4k-preview-detail:first-child { border-top: 1px solid #ededed; }

.nl4k-preview-detail dt,
.nl4k-preview-detail dd {
    margin: 0;
    min-width: 0;
    font: 600 13px/1.3 Arial, sans-serif;
}

.nl4k-preview-detail dt { color: var(--nl4k-muted); }
.nl4k-preview-detail dd {
    overflow: hidden;
    color: var(--nl4k-text);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nl4k-preview-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 11px 14px;
    color: #fff !important;
    background: var(--nl4k-red);
}
.nl4k-preview-cta:hover,
.nl4k-preview-cta:focus-visible { background: var(--nl4k-red-dark); }

.nl4k-preview-close {
    margin-top: 8px;
    min-height: 36px;
    padding: 9px 12px;
    color: #333;
    background: #f1f1f1;
}
.nl4k-preview-close:hover,
.nl4k-preview-close:focus-visible { background: #e5e5e5; }

.nl4k-cams--widget .nl4k-grid { gap: 9px; }
.nl4k-card--compact .nl4k-card-body { padding: 7px; }
.nl4k-card--compact .nl4k-username { margin-bottom: 0; font-size: 13px; }
.nl4k-card--compact .nl4k-preview-button { margin-top: 6px; min-height: 29px; padding: 7px; font-size: 11px; }

@media (max-width: 1024px) {
    .nl4k-grid { grid-template-columns: repeat(var(--nl4k-cols-tablet, 4), minmax(0, 1fr)); }
    .nl4k-preview-panel { grid-template-columns: minmax(0, 1fr) 230px; }
}

@media (max-width: 700px) {
    .nl4k-grid {
        grid-template-columns: repeat(var(--nl4k-cols-mobile, 2), minmax(0, 1fr));
        gap: 9px;
    }
    .nl4k-card { border-radius: 8px; }
    .nl4k-card-body { padding: 7px; }
    .nl4k-username { margin-bottom: 8px; font-size: 14px; }
    .nl4k-preview-button { min-height: 34px; padding: 8px 6px; font-size: 12px; }
    .nl4k-preview-panel {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 9px;
        border-radius: 10px;
    }
    .nl4k-preview-info { padding: 3px 2px 2px; }
    .nl4k-preview-title { font-size: 18px; }
    .nl4k-preview-details { margin-bottom: 12px; }
    .nl4k-preview-detail { grid-template-columns: 78px minmax(0, 1fr); padding: 7px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .nl4k-card,
    .nl4k-thumb img,
    .nl4k-preview-button,
    .nl4k-load-more { transition: none !important; }
}
