.tiny-recent-posts-widget,
.tiny-ranking-widget,
.tiny-tag-cloud-widget {
    border-radius: 2px;
    transition: all 0.5s ease;
    box-sizing: border-box;
}

:root {
    --widget-bg-page: #f8fafc;
    --widget-bg-widget: #ffffff;
    --widget-text-main: #0f172a;
    --widget-text-sub: #64748b;
    --widget-text-muted: #94a3b8;
    --widget-border-line: #e2e8f0;
    --widget-hover-bg: #f1f5f9;
    --widget-shadow: 0 10px 40px rgba(0,0,0,0.04);

    --widget-accent: #0ea5e9;
    --rp-accent-live: #ef4444;
    --rp-tag-bg: #e2e8f0;

    --rank-1: #e11d48;
    --rank-2: #d97706;
    --rank-3: #0284c7;
    --rank-other: #94a3b8;
}

body.dark-open,
[data-bs-theme="dark"] {
    --widget-bg-page: #050b14;
    --widget-bg-widget: #0a0f18;
    --widget-text-main: #f8fafc;
    --widget-text-sub: #94a3b8;
    --widget-text-muted: #475569;
    --widget-border-line: #1e293b;
    --widget-hover-bg: #121b2b;
    --widget-shadow: 0 20px 50px rgba(0,0,0,0.5);

    --widget-accent: #00f6ff;
    --rp-accent-live: #ff0055;
    --rp-tag-bg: #1e293b;

    --rank-1: #ff0055;
    --rank-2: #ffb800;
    --rank-3: #00f6ff;
    --rank-other: #475569;
}

.tiny-recent-posts-widget {
    position: relative;
    padding: 25px;
    background: var(--widget-bg-widget);
    box-shadow: var(--widget-shadow);
    border: 1px solid var(--widget-border-line);
}

.tiny-ranking-widget {
    padding: 25px 0;
    background: var(--widget-bg-widget);
    box-shadow: var(--widget-shadow);
    border: 1px solid var(--widget-border-line);
}

.tiny-tag-cloud-widget {
    padding: 25px;
    background: var(--widget-bg-widget);
    box-shadow: var(--widget-shadow);
    border: 1px solid var(--widget-border-line);
}

.tiny-recent-posts-header,
.tiny-ranking-header,
.tiny-tag-cloud-header {
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--widget-border-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tiny-recent-posts-header .widget-title,
.tiny-ranking-header .widget-title,
.tiny-tag-cloud-header .widget-title {
    font-size: 1rem;
    margin: 0;
    padding: 0;
    border: none;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--widget-text-main);
    display: flex;
    align-items: center;
    background: transparent;
    box-shadow: none;
}

.tiny-recent-posts-header .widget-title::before,
.tiny-ranking-header .widget-title::before,
.tiny-tag-cloud-header .widget-title::before {
    content: "";
/*     color: var(--widget-accent);
    text-shadow: 0 0 8px var(--widget-accent);
    margin-right: 8px; */
}

.tiny-recent-posts-header .widget-title::after,
.tiny-ranking-header .widget-title::after,
.tiny-tag-cloud-header .widget-title::after {
    content: "▁";
    animation: widgetCursorBlink 1s step-end infinite;
    color: var(--widget-text-muted);
    font-size: 0.8em;
}

@keyframes widgetCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.tiny-recent-posts-list {
    list-style: none;
    padding: 0 0 0 16px !important;
    margin: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tiny-recent-posts-list::before {
    content: "";
    position: absolute;
    top: 5px;
    bottom: 10px;
    left: 3px;
    width: 1px;
    background-image: linear-gradient(to bottom, var(--widget-border-line) 50%, transparent 50%);
    background-size: 1px 6px;
    z-index: 0;
}

.tiny-recent-posts-list:has(.tiny-recent-post-item:hover) .tiny-recent-post-item:not(:hover),
.tiny-ranking-list:has(.tiny-ranking-item:hover) .tiny-ranking-item:not(:hover),
.tiny-tag-cloud:has(.tiny-tag-item:hover) .tiny-tag-wrapper:not(:has(.tiny-tag-item:hover)) {
    filter: blur(3px) grayscale(80%);
    opacity: 0.3;
    transform: scale(0.98);
}

.tiny-recent-post-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 10px 0 10px 15px !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: crosshair;
    z-index: 1;
    animation: rpSlideInUp 0.5s backwards;
    animation-delay: calc(var(--rp-idx, 0) * 0.05s);
}

@keyframes rpSlideInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tiny-recent-post-item::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 16px;
    width: 7px;
    height: 7px;
    background-color: var(--widget-bg-widget);
    border: 1px solid var(--widget-text-sub);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}

.tiny-recent-post-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    text-decoration: none;
}

.tiny-recent-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.tiny-recent-post-cat {
    color: var(--widget-accent);
    background: var(--rp-tag-bg);
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tiny-recent-post-time {
    color: var(--widget-text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tiny-recent-post-title {
    color: var(--widget-text-sub);
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    width: 100%;
    margin: 0;
    display: block;
}

.tiny-recent-post-item:nth-child(1) .tiny-recent-post-time {
    color: var(--rp-accent-live);
    font-weight: bold;
}

.tiny-recent-post-item:nth-child(1) .tiny-recent-post-time::after {
    content: " [NEW]";
    animation: widgetCursorBlink 1.5s infinite;
}

.tiny-recent-post-item:nth-child(1)::before {
    border-color: var(--rp-accent-live);
    background-color: var(--rp-accent-live);
    box-shadow: 0 0 10px var(--rp-accent-live);
}

.tiny-recent-post-item:hover {
    transform: translateX(6px);
}

.tiny-recent-post-item:hover::before {
    background-color: var(--widget-accent);
    border-color: var(--widget-accent);
    border-radius: 1px;
    box-shadow: 0 0 12px var(--widget-accent);
    transform: scale(1.2);
}

.tiny-recent-post-item:hover .tiny-recent-post-title {
    color: var(--widget-text-main);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

body.dark-open .tiny-recent-post-item:hover .tiny-recent-post-title,
[data-bs-theme="dark"] .tiny-recent-post-item:hover .tiny-recent-post-title {
    text-shadow: 0 0 8px rgba(0, 246, 255, 0.3);
}

.tiny-recent-post-item:hover .tiny-recent-post-time {
    color: var(--widget-text-main);
}

.tiny-recent-post-item:hover .tiny-recent-post-cat {
    background: var(--widget-accent);
    color: var(--widget-bg-widget);
}

.tiny-recent-posts-empty {
    text-align: center;
    padding: 30px 0;
    color: var(--widget-text-muted);
    font-size: 14px;
}

.tiny-ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.tiny-ranking-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 5px !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: crosshair;
    overflow: hidden;
    z-index: 1;
    animation: rankSlideInLeft 0.5s backwards;
    animation-delay: calc(var(--rank-idx, 0) * 0.05s);
}

@keyframes rankSlideInLeft {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

.tiny-ranking-item-link {
    display: flex;
    align-items: center;
    flex: 1;
    text-decoration: none;
    width: 100%;
}

.tiny-ranking-rank {
    font-size: 13px;
    font-weight: 600;
    color: var(--rank-other);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: transparent;
    box-shadow: none;
    width: auto;
    margin-right: 15px;
    flex-shrink: 0;
}

.tiny-ranking-rank::before {
    content: '[';
    opacity: 0.5;
    margin-right: 2px;
}

.tiny-ranking-rank::after {
    content: ']';
    opacity: 0.5;
    margin-left: 2px;
}

.tiny-ranking-item:nth-child(1) .tiny-ranking-rank {
    color: var(--rank-1);
    text-shadow: 0 0 10px rgba(255,0,85,0.4);
}

.tiny-ranking-item:nth-child(2) .tiny-ranking-rank {
    color: var(--rank-2);
    text-shadow: 0 0 10px rgba(255,184,0,0.4);
}

.tiny-ranking-item:nth-child(3) .tiny-ranking-rank {
    color: var(--rank-3);
    text-shadow: 0 0 10px rgba(0,246,255,0.4);
}

body.dark-open .tiny-ranking-item:nth-child(1) .tiny-ranking-rank,
[data-bs-theme="dark"] .tiny-ranking-item:nth-child(1) .tiny-ranking-rank {
    text-shadow: 0 0 10px var(--rank-1);
}

body.dark-open .tiny-ranking-item:nth-child(2) .tiny-ranking-rank,
[data-bs-theme="dark"] .tiny-ranking-item:nth-child(2) .tiny-ranking-rank {
    text-shadow: 0 0 10px var(--rank-2);
}

body.dark-open .tiny-ranking-item:nth-child(3) .tiny-ranking-rank,
[data-bs-theme="dark"] .tiny-ranking-item:nth-child(3) .tiny-ranking-rank {
    text-shadow: 0 0 10px var(--rank-3);
}

.tiny-ranking-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}

.tiny-ranking-title {
    color: var(--widget-text-sub);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 15px;
    transition: color 0.3s;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    flex: 1;
    display: block;
}

.tiny-ranking-downloads {
    font-size: 12px;
    color: var(--widget-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.tiny-ranking-downloads svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.tiny-ranking-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: var(--rank-percent, 50%);
    background-color: var(--rank-other);
    opacity: 0.2;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: -1;
}

.tiny-ranking-item:nth-child(1)::after {
    background-color: var(--rank-1);
    opacity: 0.4;
}

.tiny-ranking-item:nth-child(2)::after {
    background-color: var(--rank-2);
    opacity: 0.4;
}

.tiny-ranking-item:nth-child(3)::after {
    background-color: var(--rank-3);
    opacity: 0.4;
}

.tiny-ranking-item:hover {
    transform: translateX(8px);
}

.tiny-ranking-item:hover .tiny-ranking-title {
    color: var(--widget-text-main);
    font-weight: 600;
}

body.dark-open .tiny-ranking-item:hover .tiny-ranking-title,
[data-bs-theme="dark"] .tiny-ranking-item:hover .tiny-ranking-title {
    text-shadow: 0 0 8px var(--rank-3);
}

.tiny-ranking-item:hover .tiny-ranking-downloads {
    color: var(--widget-text-main);
}

.tiny-ranking-item:hover .tiny-ranking-downloads svg {
    opacity: 1;
    animation: rankBounceDown 0.8s infinite;
}

@keyframes rankBounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.tiny-ranking-item:hover::after {
    height: 100%;
    opacity: 0.08;
}

.tiny-ranking-item:nth-child(1):hover::after {
    background: linear-gradient(90deg, var(--rank-1), transparent);
    opacity: 0.15;
}

.tiny-ranking-item:nth-child(2):hover::after {
    background: linear-gradient(90deg, var(--rank-2), transparent);
    opacity: 0.15;
}

.tiny-ranking-item:nth-child(3):hover::after {
    background: linear-gradient(90deg, var(--rank-3), transparent);
    opacity: 0.15;
}

.tiny-ranking-empty {
    padding: 30px;
    text-align: center;
    color: var(--widget-text-muted);
    font-size: 14px;
}

.tiny-tag-cloud-content {
    width: 100%;
}

.tiny-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 14px;
    perspective: 1000px;
    padding: 0px 5px;
}

.tiny-tag-wrapper {
    display: inline-block;
    will-change: transform;
    transition: all 0.4s ease;
}

.tiny-tag-wrapper:nth-child(odd) {
    animation: tagSlideIn 0.8s backwards, tagFloatA 6s ease-in-out infinite alternate;
    animation-delay: var(--tag-delay, 0.1s), calc(var(--tag-delay, 0.1s) + 0.8s);
}

.tiny-tag-wrapper:nth-child(even) {
    animation: tagSlideIn 0.8s backwards, tagFloatB 7s ease-in-out infinite alternate;
    animation-delay: var(--tag-delay, 0.1s), calc(var(--tag-delay, 0.1s) + 0.8s);
}

@keyframes tagSlideIn {
    from { opacity: 0; transform: translateY(15px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tagFloatA {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(3px, -4px, 0) rotate(1deg); }
    100% { transform: translate3d(-1px, 2px, 0) rotate(-0.5deg); }
}

@keyframes tagFloatB {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(-3px, -3px, 0) rotate(-1deg); }
    100% { transform: translate3d(2px, 1px, 0) rotate(0.5deg); }
}

.tiny-tag-cloud .tiny-tag-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--widget-text-sub);
    text-decoration: none;
    padding: 4px 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
    transform: translate3d(0,0,0);
    transform-origin: center center;
    cursor: crosshair;
    z-index: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    box-shadow: none;
    white-space: nowrap;
}

.tiny-tag-item .tag-name {
    position: relative;
    z-index: 2;
    transition: all 0.2s;
}

.tiny-tag-item .tag-count {
    font-size: 0.75em;
    margin-left: 6px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    color: var(--widget-text-sub);
}

.tiny-tag-item::before,
.tiny-tag-item::after {
    position: absolute;
    opacity: 0;
    color: var(--widget-accent);
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 2;
}

.tiny-tag-item::before {
    content: '<';
    left: -15px;
    transform: translateX(10px);
}

.tiny-tag-item::after {
    content: '/>';
    right: -20px;
    transform: translateX(-10px);
}

.tiny-tag-item:hover {
    transform: scale(1.15) translateY(-2px);
    z-index: 10;
}

.tiny-tag-item:hover .tag-name {
    color: var(--widget-accent);
    text-shadow: 0 0 15px var(--widget-accent), 0 0 1px currentColor;
}

.tiny-tag-item:hover .tag-count {
    opacity: 0.8;
    color: var(--widget-accent);
}

.tiny-tag-item:hover::before {
    opacity: 1;
    transform: translateX(0);
    left: -12px;
}

.tiny-tag-item:hover::after {
    opacity: 1;
    transform: translateX(0);
    right: -18px;
}

body.dark-open .tiny-tag-item:hover .tag-name,
[data-bs-theme="dark"] .tiny-tag-item:hover .tag-name {
    text-shadow: 0 0 15px var(--widget-accent), 0 0 1px currentColor;
}

.site-sidebar .tiny-recent-posts-widget,
.widget-area .tiny-recent-posts-widget,
aside .tiny-recent-posts-widget,
#secondary .tiny-recent-posts-widget,
.site-sidebar .tiny-ranking-widget,
.widget-area .tiny-ranking-widget,
aside .tiny-ranking-widget,
#secondary .tiny-ranking-widget,
.site-sidebar .tiny-tag-cloud-widget,
.widget-area .tiny-tag-cloud-widget,
aside .tiny-tag-cloud-widget,
#secondary .tiny-tag-cloud-widget {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

.site-sidebar .tiny-ranking-header,
.widget-area .tiny-ranking-header,
aside .tiny-ranking-header,
#secondary .tiny-ranking-header {
    padding: 0;
    margin: 0 !important;
}

.site-sidebar .widget:has(.tiny-recent-posts-widget),
.widget-area .widget:has(.tiny-recent-posts-widget),
aside .widget:has(.tiny-recent-posts-widget),
#secondary .widget:has(.tiny-recent-posts-widget),
.site-sidebar .widget:has(.tiny-ranking-widget),
.widget-area .widget:has(.tiny-ranking-widget),
aside .widget:has(.tiny-ranking-widget),
#secondary .widget:has(.tiny-ranking-widget),
.site-sidebar .widget:has(.tiny-tag-cloud-widget),
.widget-area .widget:has(.tiny-tag-cloud-widget),
aside .widget:has(.tiny-tag-cloud-widget),
#secondary .widget:has(.tiny-tag-cloud-widget) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
