.em-card-container {
    --em-card-bg: #ffffff;
    --em-card-hover-bg: #ffffff;
    --em-card-border: #e7e9ee;
    --em-card-hover-border: #d7dce6;
    --em-card-shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
    --em-card-hover-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
    --em-card-title: #1f2937;
    --em-card-desc: #6b7280;
    --em-card-meta: #9ca3af;
    --em-card-icon-bg: #f3f4f6;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

html[data-theme='dark'] .em-card-container,
body[data-theme='dark'] .em-card-container,
html.night .em-card-container,
body.night .em-card-container,
body.theme-dark .em-card-container {
    --em-card-bg: #1f2430;
    --em-card-hover-bg: #252b39;
    --em-card-border: #343b4c;
    --em-card-hover-border: #475167;
    --em-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
    --em-card-hover-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
    --em-card-title: #e5e7eb;
    --em-card-desc: #c6cad3;
    --em-card-meta: #9aa4b5;
    --em-card-icon-bg: #30384a;
}



html[data-theme='light'] .em-card-container,
body[data-theme='light'] .em-card-container,
html.light .em-card-container,
body.light .em-card-container,
body.theme-light .em-card-container {
    --em-card-bg: #ffffff;
    --em-card-hover-bg: #ffffff;
    --em-card-border: #e7e9ee;
    --em-card-hover-border: #d7dce6;
    --em-card-shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
    --em-card-hover-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
    --em-card-title: #1f2937;
    --em-card-desc: #6b7280;
    --em-card-meta: #9ca3af;
    --em-card-icon-bg: #f3f4f6;
}

.em-card-item {
    display: flex;
    align-items: center;
    background: var(--em-card-bg);
    border: 1px solid var(--em-card-border);
    border-radius: 12px;
    padding: 12px;
    text-decoration: none !important;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
    box-shadow: var(--em-card-shadow);
    color: inherit;
    overflow: hidden;
}

.em-card-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--em-card-hover-shadow);
    border-color: var(--em-card-hover-border);
    background: var(--em-card-hover-bg);
    color: inherit;
}

.em-card-link .em-card-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    margin-right: 12px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--em-card-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.em-card-link .em-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.em-card-info {
    flex: 1;
    min-width: 0;
}

.em-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--em-card-title);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.em-card-desc {
    font-size: 13px;
    color: var(--em-card-desc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
}

.em-card-article {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
}

.em-card-article .em-card-cover {
    height: 152px;
    background-size: cover;
    background-position: center;
    background-color: var(--em-card-icon-bg);
}

.em-card-article .em-card-info {
    padding: 14px;
}

.em-card-article .em-card-desc {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 36px;
    margin-bottom: 8px;
}

.em-card-meta {
    font-size: 12px;
    color: var(--em-card-meta);
    display: flex;
    align-items: center;
}
