.rf-container {
    margin: 24px 0;
}

.rf-tagbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 16px 18px;
    background: var(--rf-tagbar-bg, #f7f7fa);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.rf-tagbar-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.05em;
    margin-right: 4px;
    user-select: none;
}

.rf-tagbar-label::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M20.59 13.41 13.42 20.58a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/><line x1='7' y1='7' x2='7.01' y2='7'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
}

.rf-tag {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.rf-tag:hover {
    border-color: var(--rf-primary-start, #6366f1);
    color: var(--rf-primary-start, #6366f1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.rf-tag.is-active {
    background: linear-gradient(135deg, var(--rf-primary-start, #6366f1), var(--rf-primary-end, #8b5cf6));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.rf-tag.is-active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.rf-tag-clear {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(17, 24, 39, 0.06);
    border: 0;
    color: #4b5563;
    padding: 7px 14px 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-left: auto;
    transition: all 0.15s ease;
    letter-spacing: 0.02em;
}

.rf-tag-clear::before {
    content: "×";
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    margin-top: -1px;
}

.rf-tag-clear:hover {
    background: rgba(17, 24, 39, 0.12);
    color: #111827;
    transform: translateY(-1px);
}

.rf-tag-clear[hidden] {
    display: none;
}

.rf-list {
    position: relative;
    min-height: 100px;
}

.rf-list.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.rf-ranking {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

.rf-card {
    position: relative;
    background: var(--rf-card-bg, #ffffff);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rf-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.rf-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rf-primary-start, #6366f1), var(--rf-primary-end, #8b5cf6));
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.rf-card:nth-child(1) .rf-rank {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.rf-card:nth-child(2) .rf-rank {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
}
.rf-card:nth-child(3) .rf-rank {
    background: linear-gradient(135deg, #d97706, #92400e);
}

.rf-card-inner {
    display: flex;
    gap: 16px;
    padding: 16px;
    color: inherit;
}

.rf-thumb {
    flex: 0 0 120px;
    height: 120px;
    background: #f3f4f6 center/cover no-repeat;
    border-radius: 8px;
}

.rf-thumb-empty {
    background: #f3f4f6;
}

.rf-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.rf-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--rf-title-color, #111827);
    line-height: 1.4;
}

.rf-description {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.7;
    color: #4b5563;
    white-space: pre-wrap;
    word-break: break-word;
}

.rf-card-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.rf-card-tags li {
    background: var(--rf-chip-bg, #eef2ff);
    color: var(--rf-chip-color, #4338ca);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.rf-card-cta {
    margin-top: 14px;
    text-align: center;
}

.rf-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 200px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--rf-button-bg-start, #6366f1), var(--rf-button-bg-end, #8b5cf6));
    color: var(--rf-button-text-color, #ffffff);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    border-radius: var(--rf-button-radius, 999px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    white-space: pre-line;
}

.rf-card-button:hover,
.rf-card-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
    color: var(--rf-button-text-color, #ffffff);
    text-decoration: none;
    opacity: 0.95;
}

.rf-card-button:active {
    transform: translateY(0);
}

.rf-empty-result {
    padding: 32px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .rf-card-inner {
        flex-direction: column;
    }
    .rf-thumb {
        flex: 0 0 auto;
        width: 100%;
        height: 180px;
    }
}
