/* Auto-extracted from inc/widgets/widgets-styles.php — Phase 8 P8.H1 (homepage perf O6). */
/* Widget Base */
	.animehub-widget {
		margin-bottom: 20px;
	}
	.animehub-widget .widget-title {
		font-size: 1.1rem;
		font-weight: 600;
		margin-bottom: 15px;
		padding-bottom: 10px;
		border-bottom: 2px solid var(--animehub-primary, var(--animehub-primary, #ff6b35));
	}

	/* Popular List (Anime & Videos) */
	.animehub-popular-list {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.animehub-popular-item {
		display: flex;
		align-items: flex-start;
		gap: 10px;
		padding: 10px 0;
		border-bottom: 1px solid rgba(255,255,255,0.1);
	}
	.animehub-popular-item:last-child {
		border-bottom: none;
	}
	/* ---- Rank badges — modern anime style (slanted numerals + glow) ---- */
	.animehub-popular-rank {
		position: relative;
		flex-shrink: 0;
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 10px;
		font-weight: 800;
		font-style: italic;
		font-size: 1.02rem;
		line-height: 1;
		letter-spacing: -.02em;
		color: #fff;
		background: rgba(255, 255, 255, .05);
		border: 1px solid var(--animehub-border, #2a2a2a);
		text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
		overflow: hidden;
		transition: transform .2s ease, box-shadow .2s ease;
	}

	/* glossy sheen for medal ranks (top 3) */
	.animehub-rank-1::before,
	.animehub-rank-2::before,
	.animehub-rank-3::before {
		content: "";
		position: absolute;
		top: -60%;
		left: -35%;
		width: 55%;
		height: 220%;
		transform: rotate(22deg);
		background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
		pointer-events: none;
	}

	.animehub-rank-1 {
		color: #2a1c00;
		border: none;
		background: linear-gradient(135deg, #ffe680 0%, #ffd24a 42%, #f0a500 100%);
		box-shadow: 0 0 16px rgba(255, 200, 40, .55), inset 0 1px 1px rgba(255, 255, 255, .65);
	}
	.animehub-rank-2 {
		color: #1f2730;
		border: none;
		background: linear-gradient(135deg, #f6f8fa 0%, #d2d9e0 45%, #9aa6b2 100%);
		box-shadow: 0 0 14px rgba(200, 212, 224, .45), inset 0 1px 1px rgba(255, 255, 255, .75);
	}
	.animehub-rank-3 {
		color: #fff;
		border: none;
		background: linear-gradient(135deg, #f4a76a 0%, #db7d36 45%, #a85619 100%);
		box-shadow: 0 0 14px rgba(220, 140, 60, .45), inset 0 1px 1px rgba(255, 255, 255, .35);
	}

	/* ranks 4–5 — hot gradient with glow */
	.animehub-rank-4,
	.animehub-rank-5 {
		border-color: transparent;
		color: #fff;
		background: linear-gradient(135deg,
			rgba(var(--animehub-primary-rgb, 255,107,53), .95),
			rgba(var(--animehub-primary-rgb, 255,107,53), .5));
		box-shadow: 0 0 12px rgba(var(--animehub-primary-rgb, 255,107,53), .35);
	}

	/* ranks 6+ — glassy outline */
	.animehub-rank-6,
	.animehub-rank-7,
	.animehub-rank-8,
	.animehub-rank-9,
	.animehub-rank-10 {
		color: var(--animehub-primary, #ff6b35);
		background: rgba(var(--animehub-primary-rgb, 255,107,53), .1);
		border: 1px solid rgba(var(--animehub-primary-rgb, 255,107,53), .4);
	}
	.animehub-popular-link {
		display: flex;
		gap: 10px;
		text-decoration: none;
		color: inherit;
		flex: 1;
		min-width: 0;
	}
	.animehub-popular-link:hover .animehub-popular-title {
		color: var(--animehub-primary, var(--animehub-primary, #ff6b35));
	}
	.animehub-popular-thumb {
		width: 50px;
		height: 70px;
		object-fit: cover;
		border-radius: 4px;
		flex-shrink: 0;
	}
	.animehub-popular-info {
		flex: 1;
		min-width: 0;
	}
	.animehub-popular-title {
		font-size: 0.9rem;
		font-weight: 500;
		margin: 0 0 5px;
		line-height: 1.3;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		transition: color 0.2s;
	}
	.animehub-popular-meta {
		display: flex;
		flex-direction: column;
		gap: 3px;
		font-size: 0.75rem;
		color: var(--animehub-text-muted, #888);
		margin-top: 5px;
	}
	.animehub-popular-score,
	.animehub-popular-views {
		display: flex;
		align-items: center;
		gap: 3px;
	}
	.animehub-popular-score svg {
		color: #ffc107;
	}
	.animehub-popular-genres,
	.animehub-popular-studio {
		font-size: 0.7rem;
		color: var(--animehub-text-muted, #888);
	}
	.animehub-popular-studio {
		font-weight: 500;
	}

	/* Video List Specifics */
	.animehub-videos-list {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.animehub-video-item {
		display: flex;
		align-items: flex-start;
		gap: 10px;
		padding: 10px 0;
		border-bottom: 1px solid rgba(255,255,255,0.1);
	}
	.animehub-video-item:last-child {
		border-bottom: none;
	}
	.animehub-video-link {
		display: flex;
		gap: 10px;
		text-decoration: none;
		color: inherit;
		flex: 1;
		min-width: 0;
	}
	.animehub-video-link:hover .animehub-video-title {
		color: var(--animehub-primary, var(--animehub-primary, #ff6b35));
	}
	.animehub-video-thumb-wrap {
		position: relative;
		width: 80px;
		flex-shrink: 0;
	}
	.animehub-video-thumb {
		width: 100%;
		height: 45px;
		object-fit: cover;
		border-radius: 4px;
	}
	.animehub-video-duration {
		position: absolute;
		bottom: 2px;
		right: 2px;
		background: rgba(0,0,0,0.8);
		color: #fff;
		font-size: 0.65rem;
		padding: 1px 4px;
		border-radius: 2px;
	}
	.animehub-video-play-icon {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 24px;
		height: 24px;
		background: rgba(0,0,0,0.6);
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
		opacity: 0;
		transition: opacity 0.2s;
	}
	.animehub-video-link:hover .animehub-video-play-icon {
		opacity: 1;
	}
	.animehub-video-info {
		flex: 1;
		min-width: 0;
	}
	.animehub-video-title {
		font-size: 0.85rem;
		margin: 0 0 3px;
		line-height: 1.3;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		transition: color 0.2s;
	}
	.animehub-video-meta {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
		font-size: 0.7rem;
		color: var(--animehub-text-muted, #888);
		margin-top: 5px;
	}
	/* Pill badge — avoid full-width “bar” from column flex stretch */
	.animehub-video-type,
	.animehub-video-category {
		display: inline-block;
		width: auto;
		max-width: 100%;
		box-sizing: border-box;
		background: rgba(255, 109, 0, 0.18);
		color: var(--animehub-primary, #ff6d00);
		border: 1px solid rgba(255, 109, 0, 0.35);
		padding: 3px 10px;
		border-radius: 999px;
		font-size: 0.62rem;
		font-weight: 600;
		line-height: 1.2;
		text-transform: uppercase;
		letter-spacing: 0.03em;
	}
	.animehub-video-studio {
		font-size: 0.7rem;
		color: var(--animehub-text-muted, #888);
		font-weight: 500;
		align-self: stretch;
		max-width: 100%;
	}

	/* Popular Videos widget — layout tuned for sidebar */
	.animehub-popular-videos-widget .animehub-popular-video-thumb-wrap {
		width: 96px;
		aspect-ratio: 16 / 9;
		border-radius: 6px;
		overflow: hidden;
		background: var(--animehub-bg-tertiary, #1e1e22);
		box-shadow: 0 1px 3px rgba(0,0,0,0.35);
	}
	.animehub-popular-videos-widget .animehub-popular-video-thumb-wrap .animehub-video-thumb {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
		border-radius: 0;
	}
	.animehub-popular-videos-widget .animehub-video-thumb-placeholder {
		display: block;
		width: 100%;
		height: 100%;
		min-height: 54px;
		background: linear-gradient(135deg, rgba(255,109,0,0.25), rgba(30,30,34,0.9));
	}
	.animehub-popular-videos-widget .animehub-popular-video-link {
		align-items: center;
		gap: 12px;
	}
	.animehub-popular-videos-widget .animehub-popular-video-title {
		font-size: 0.875rem;
		font-weight: 600;
		line-height: 1.35;
		margin: 0 0 6px;
	}
	.animehub-popular-videos-widget .animehub-popular-video-meta {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 6px 10px;
		margin-top: 0;
		line-height: 1.3;
	}
	.animehub-popular-videos-widget .animehub-popular-video-meta > span:not(:last-child)::after {
		content: '';
		display: inline-block;
		width: 3px;
		height: 3px;
		margin-left: 10px;
		vertical-align: middle;
		border-radius: 50%;
		background: var(--animehub-text-muted, #666);
		opacity: 0.7;
	}
	.animehub-popular-videos-widget .animehub-popular-video-category.animehub-video-type {
		display: inline-block;
		width: auto;
		max-width: min(100%, 12rem);
		flex-shrink: 0;
		box-sizing: border-box;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		background: rgba(255, 109, 0, 0.15);
		border: 1px solid rgba(255, 109, 0, 0.35);
		color: var(--animehub-primary, #ff6d00);
		padding: 3px 10px;
		border-radius: 999px;
		font-size: 0.62rem;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.03em;
		line-height: 1.2;
	}
	.animehub-popular-videos-widget .animehub-popular-video-studio {
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		flex: 1 1 auto;
		min-width: 0;
	}
	.animehub-popular-videos-widget .animehub-popular-video-views {
		flex-shrink: 0;
		font-weight: 600;
		color: var(--animehub-text-muted, #aaa);
	}
	.animehub-popular-videos-widget .animehub-popular-videos-more {
		margin-top: 12px;
	}

	/* Episodes List */
	.animehub-episodes-list {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.animehub-episode-item {
		padding: 10px 0;
		border-bottom: 1px solid rgba(255,255,255,0.1);
	}
	.animehub-episode-item:last-child {
		border-bottom: none;
	}
	.animehub-episode-link {
		display: flex;
		gap: 10px;
		text-decoration: none;
		color: inherit;
	}
	.animehub-episode-link:hover .animehub-episode-title {
		color: var(--animehub-primary, var(--animehub-primary, #ff6b35));
	}
	.animehub-episode-thumb {
		width: 50px;
		height: 70px;
		object-fit: cover;
		border-radius: 4px;
		flex-shrink: 0;
	}
	.animehub-episode-info {
		flex: 1;
		min-width: 0;
	}
	.animehub-episode-anime {
		font-size: 0.75rem;
		color: var(--animehub-text-muted, #888);
		display: block;
		margin-bottom: 3px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.animehub-episode-title {
		font-size: 0.9rem;
		font-weight: 500;
		margin: 0;
		transition: color 0.2s;
	}
	.animehub-episode-meta {
		display: flex;
		flex-direction: column;
		gap: 3px;
		font-size: 0.7rem;
		color: var(--animehub-text-muted, #888);
		margin-top: 5px;
	}
	.animehub-episode-time {
		font-size: 0.7rem;
		color: var(--animehub-text-muted, #888);
	}
	.animehub-episode-genres {
		font-size: 0.7rem;
		color: var(--animehub-text-muted, #888);
	}
	.animehub-episode-air-date,
	.animehub-episode-views {
		display: flex;
		align-items: center;
		gap: 4px;
		font-size: 0.7rem;
		color: var(--animehub-text-muted, #888);
	}
	.animehub-episode-air-date svg,
	.animehub-episode-views svg {
		flex-shrink: 0;
	}

	/* Schedule Widget */
	.animehub-schedule-tabs {
		display: flex;
		gap: 2px;
		margin-bottom: 15px;
		overflow-x: auto;
	}
	.animehub-schedule-tab {
		flex: 1;
		min-width: 40px;
		padding: 8px 4px;
		background: var(--animehub-bg-secondary, #1a1a1a);
		border: none;
		color: var(--animehub-text-muted, #888);
		cursor: pointer;
		font-size: 0.75rem;
		font-weight: 500;
		text-align: center;
		transition: all 0.2s;
		position: relative;
	}
	.animehub-schedule-tab:first-child {
		border-radius: 4px 0 0 4px;
	}
	.animehub-schedule-tab:last-child {
		border-radius: 0 4px 4px 0;
	}
	.animehub-schedule-tab.active,
	.animehub-schedule-tab:hover {
		background: var(--animehub-primary, var(--animehub-primary, #ff6b35));
		color: #fff;
	}
	.animehub-schedule-count {
		display: block;
		font-size: 0.65rem;
		opacity: 0.8;
	}
	.animehub-schedule-day {
		display: none;
	}
	.animehub-schedule-day.active {
		display: block;
	}
	.animehub-schedule-list {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.animehub-schedule-item {
		display: flex;
		gap: 10px;
		padding: 8px 0;
		border-bottom: 1px solid rgba(255,255,255,0.1);
		align-items: center;
	}
	.animehub-schedule-item:last-child {
		border-bottom: none;
	}
	.animehub-schedule-time {
		flex-shrink: 0;
		font-size: 0.8rem;
		font-weight: 600;
		color: var(--animehub-primary, var(--animehub-primary, #ff6b35));
		width: 45px;
	}
	.animehub-schedule-anime {
		flex: 1;
		text-decoration: none;
		color: inherit;
		font-size: 0.85rem;
		display: flex;
		align-items: center;
		gap: 8px;
	}
	.animehub-schedule-anime:hover {
		color: var(--animehub-primary, var(--animehub-primary, #ff6b35));
	}
	.animehub-schedule-ep {
		font-size: 0.7rem;
		background: var(--animehub-bg-secondary, #1a1a1a);
		padding: 2px 6px;
		border-radius: 3px;
		color: var(--animehub-text-muted, #888);
	}
	.animehub-schedule-empty {
		color: var(--animehub-text-muted, #888);
		font-size: 0.85rem;
		text-align: center;
		padding: 20px 0;
	}

	/* Genres Cloud */
	.animehub-genres-cloud {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}
	.animehub-genre-tag {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		background: var(--animehub-bg-secondary, #1a1a1a);
		color: var(--animehub-text, #fff);
		padding: 5px 10px;
		border-radius: 4px;
		text-decoration: none;
		transition: all 0.2s;
	}
	.animehub-genre-tag:hover {
		background: var(--animehub-primary, var(--animehub-primary, #ff6b35));
		color: #fff;
	}
	.animehub-genre-count {
		font-size: 0.7em;
		opacity: 0.7;
	}
	.animehub-genres-list {
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.animehub-genre-item {
		padding: 5px 0;
		border-bottom: 1px solid rgba(255,255,255,0.05);
		display: flex;
		justify-content: space-between;
	}
	.animehub-genre-item:last-child {
		border-bottom: none;
	}
	.animehub-genre-item a {
		text-decoration: none;
		color: inherit;
	}
	.animehub-genre-item a:hover {
		color: var(--animehub-primary, var(--animehub-primary, #ff6b35));
	}
	.animehub-genre-item .animehub-genre-count {
		color: var(--animehub-text-muted, #888);
		font-size: 0.85rem;
	}

	/* =====================================================================
	   Widget chrome — single source (consistency layer).
	   Scoped to .widget-area (sidebar) so footer (.footer-widget-area) is
	   untouched. Tokenized; anime gradient accent + hover glow.
	   ===================================================================== */
	.widget-area .widget {
		position: relative;
		background: var(--animehub-bg-card, #141414);
		border: 1px solid var(--animehub-border, #2a2a2a);
		border-radius: var(--animehub-radius, 12px);
		padding: 18px 20px 20px;
		margin-bottom: var(--animehub-gap, 24px);
		overflow: hidden;
		transition: border-color var(--animehub-transition, .2s ease),
		            box-shadow var(--animehub-transition, .2s ease);
	}
	/* anime gradient top edge */
	.widget-area .widget::before {
		content: "";
		position: absolute;
		inset: 0 0 auto 0;
		height: 3px;
		background: linear-gradient(90deg,
			var(--animehub-primary, #ff6b35),
			var(--animehub-accent, #4a9eff));
		opacity: .9;
	}
	.widget-area .widget:hover {
		border-color: rgba(var(--animehub-primary-rgb, 255,107,53), .4);
		box-shadow: 0 6px 24px rgba(0,0,0,.35),
		            0 0 18px rgba(var(--animehub-primary-rgb, 255,107,53), .12);
	}
	.widget-area .widget-title {
		position: relative;
		font-size: 1.05rem;
		font-weight: 700;
		color: var(--animehub-text, #fff);
		margin: 0 0 16px;
		padding: 0 0 10px;
		border-bottom: 1px solid var(--animehub-border, #2a2a2a);
		letter-spacing: .2px;
	}
	/* gradient accent bar under title */
	.widget-area .widget-title::after {
		content: "";
		position: absolute;
		left: 0;
		bottom: -1px;
		width: 44px;
		height: 3px;
		border-radius: 2px;
		background: linear-gradient(90deg,
			var(--animehub-primary, #ff6b35),
			var(--animehub-accent, #4a9eff));
		box-shadow: 0 0 8px rgba(var(--animehub-primary-rgb, 255,107,53), .6);
	}

	/* ---- List rows — row highlight + slide on hover ---- */
	.widget-area .animehub-popular-item,
	.widget-area .animehub-video-item,
	.widget-area .animehub-episode-item {
		margin: 0 -6px;
		padding-left: 6px;
		padding-right: 6px;
		border-radius: 8px;
		transition: background var(--animehub-transition, .2s ease),
		            transform var(--animehub-transition, .2s ease);
	}
	.widget-area .animehub-popular-item:hover,
	.widget-area .animehub-video-item:hover,
	.widget-area .animehub-episode-item:hover {
		background: rgba(var(--animehub-primary-rgb, 255,107,53), .06);
		transform: translateX(3px);
	}

	/* ---- Thumbnail zoom (clipped by rounded thumb) ---- */
	.widget-area .animehub-popular-thumb,
	.widget-area .animehub-episode-thumb,
	.widget-area .animehub-video-thumb {
		transition: transform var(--animehub-transition-slow, .3s ease);
	}
	.widget-area .animehub-popular-link:hover .animehub-popular-thumb,
	.widget-area .animehub-episode-link:hover .animehub-episode-thumb,
	.widget-area .animehub-video-link:hover .animehub-video-thumb {
		transform: scale(1.05);
	}

	/* ---- Rank badge glow on hover ---- */
	.widget-area .animehub-popular-item:hover .animehub-popular-rank {
		box-shadow: 0 0 12px rgba(var(--animehub-primary-rgb, 255,107,53), .6);
	}

	/* ---- Genre tags — lift + glow ---- */
	.widget-area .animehub-genre-tag {
		border: 1px solid var(--animehub-border, #2a2a2a);
		transition: all var(--animehub-transition, .2s ease);
	}
	.widget-area .animehub-genre-tag:hover {
		transform: translateY(-2px);
		border-color: transparent;
		box-shadow: 0 4px 12px rgba(var(--animehub-primary-rgb, 255,107,53), .35);
	}

	/* ---- Schedule tab — glow when active ---- */
	.widget-area .animehub-schedule-tab.active {
		box-shadow: 0 2px 10px rgba(var(--animehub-primary-rgb, 255,107,53), .4);
	}

	/* ---- Reduced motion ---- */
	@media (prefers-reduced-motion: reduce) {
		.widget-area .widget,
		.widget-area .animehub-popular-item,
		.widget-area .animehub-video-item,
		.widget-area .animehub-episode-item,
		.widget-area .animehub-popular-thumb,
		.widget-area .animehub-episode-thumb,
		.widget-area .animehub-video-thumb,
		.widget-area .animehub-genre-tag {
			transition: none !important;
		}
	}

	/* Widget More Link */
	.animehub-widget-more {
		display: block;
		text-align: center;
		padding: 10px;
		margin-top: 10px;
		background: var(--animehub-bg-secondary, #1a1a1a);
		border-radius: 4px;
		text-decoration: none;
		color: var(--animehub-primary, var(--animehub-primary, #ff6b35));
		font-size: 0.85rem;
		font-weight: 500;
		transition: all 0.2s;
	}
	.animehub-widget-more:hover {
		background: var(--animehub-primary, var(--animehub-primary, #ff6b35));
		color: #fff;
	}
	.widget-area .animehub-widget-more {
		border: 1px solid var(--animehub-border, #2a2a2a);
		transition: all var(--animehub-transition, .2s ease);
	}
	.widget-area .animehub-widget-more:hover {
		background: linear-gradient(90deg,
			var(--animehub-primary, #ff6b35),
			var(--animehub-accent, #4a9eff));
		border-color: transparent;
		color: #fff;
		transform: translateY(-1px);
		box-shadow: 0 4px 14px rgba(var(--animehub-primary-rgb, 255,107,53), .35);
	}

	/* ===================== Badges (HOT / NEW) — inline, own line ===================== */
	/* Rendered as first child of the meta block (below the title). align-self
	   keeps it pill-width inside the flex-column meta instead of stretching. */
	.ah-wbadge {
		display: inline-flex;
		align-items: center;
		gap: 3px;
		align-self: flex-start;
		width: auto;
		margin: 0 0 3px;
		padding: 2px 8px;
		border-radius: 4px;
		font-size: 0.6rem;
		font-weight: 800;
		line-height: 1.15;
		letter-spacing: .04em;
		text-transform: uppercase;
		color: #fff;
		box-shadow: 0 1px 3px rgba(0,0,0,.3);
	}
	.ah-wbadge--hot {
		background: linear-gradient(135deg, #ff512f, #dd2476);
	}
	.ah-wbadge--hot svg {
		animation: ah-flame 1.4s ease-in-out infinite;
	}
	.ah-wbadge--new {
		background: linear-gradient(135deg, var(--animehub-accent, #4a9eff), #2e7be4);
	}
	@keyframes ah-flame {
		0%, 100% { transform: scale(1) rotate(-2deg); }
		50%      { transform: scale(1.18) rotate(2deg); }
	}
	@media (prefers-reduced-motion: reduce) {
		.ah-wbadge--hot svg { animation: none; }
	}
