.youcard-wrap {
    --youcard-bg: #ffffff;
    --youcard-text: #14161a;
    --youcard-muted: #626a76;
    --youcard-border: #e6e8ed;
    --youcard-accent: #e11d48;
    --youcard-hover: #e11d48;
    --youcard-shadow: 0 14px 34px rgba(20, 22, 26, 0.1);
    width: 100%;
}

.youcard-grid {
    display: grid;
    grid-template-columns: repeat(var(--youcard-columns, 4), minmax(0, 1fr));
    gap: 22px;
}

.youcard-card {
    overflow: hidden;
    background: var(--youcard-bg);
    border: 1px solid var(--youcard-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(20, 22, 26, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.youcard-card:hover {
    border-color: var(--youcard-hover);
    box-shadow: var(--youcard-shadow);
    transform: translateY(-3px);
    cursor: pointer;
}

.youcard-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef0f4;
}

.youcard-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 220ms ease;
}

.youcard-card:hover .youcard-thumb img {
    transform: scale(1.035);
}

.youcard-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 38px;
    border-radius: 8px;
    background: rgba(225, 29, 72, 0.94);
    background: var(--youcard-accent);
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.youcard-play::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
}

.youcard-card-body {
    padding: 16px;
}

.youcard-title {
    margin: 0 0 10px;
    color: var(--youcard-text);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
}

.youcard-title a {
    color: inherit;
    text-decoration: none;
}

.youcard-title a:hover {
    color: var(--youcard-accent);
}

.youcard-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--youcard-muted);
    font-size: 13px;
    line-height: 1.4;
}

.youcard-meta span,
.youcard-meta time {
    min-width: 0;
}

.youcard-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.youcard-page-btn {
    min-width: 42px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--youcard-border);
    border-radius: 8px;
    background: #fff;
    color: var(--youcard-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.youcard-arrow-btn {
    font-size: 24px;
    line-height: 1;
}

.youcard-page-btn:hover,
.youcard-page-btn.is-active {
    border-color: var(--youcard-accent);
    background: var(--youcard-accent);
    color: #fff;
}

.youcard-page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.youcard-loading {
    opacity: 0.55;
    pointer-events: none;
}

.youcard-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 24px;
    border: 1px dashed var(--youcard-border);
    border-radius: 8px;
    color: var(--youcard-muted);
    text-align: center;
}

.youcard-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.youcard-modal.is-open {
    display: flex;
}

.youcard-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 15, 20, 0.78);
}

.youcard-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
}

.youcard-modal-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #05070a;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.youcard-modal-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.youcard-modal-close {
    position: absolute;
    right: -12px;
    top: -46px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.youcard-modal-close:hover {
    background: #fff;
    color: #111318;
}

body.youcard-modal-open {
    overflow: hidden;
}

.youcard-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 1180px;
}

.youcard-panel {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.youcard-panel label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
}

.youcard-shortcode-panel {
    max-width: 1140px;
}

@media (max-width: 1100px) {
    .youcard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .youcard-grid,
    .youcard-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .youcard-grid,
    .youcard-admin-grid {
        grid-template-columns: 1fr;
    }

    .youcard-card-body {
        padding: 14px;
    }

    .youcard-modal {
        padding: 14px;
    }

    .youcard-modal-close {
        right: 0;
        top: -44px;
    }
}
