/* ==========================================================================
   Next-Gen 2027 Premium Dark Streaming Review Box & List
   ========================================================================== */

.hd-comments-area {
	background: rgba(15, 23, 42, 0.45) !important;
	backdrop-filter: blur(24px) saturate(160%);
	-webkit-backdrop-filter: blur(24px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, 0.06) !important;
	padding: var(--hd-spacing-xl) !important;
	border-radius: var(--hd-radius-lg) !important;
	margin-top: var(--hd-spacing-xl) !important;
	box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.8), 
	            inset 0 1px 0 rgba(255, 255, 255, 0.05);
	position: relative;
	overflow: hidden;
}

/* Dynamic background glow behind the comments area */
.hd-comments-area::before {
	content: '';
	position: absolute;
	top: -10%;
	right: -10%;
	width: 300px;
	height: 300px;
	background: radial-gradient(circle, var(--hd-primary-glow) 0%, transparent 70%);
	pointer-events: none;
	opacity: 0.25;
	z-index: 0;
}

.hd-comments-title {
	font-size: 15px !important;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 800 !important;
	color: #fff !important;
	margin-bottom: var(--hd-spacing-xl) !important;
	border-left: 4px solid var(--hd-primary) !important;
	padding-left: var(--hd-spacing-sm) !important;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	text-shadow: 0 0 20px var(--hd-primary-glow);
	z-index: 1;
	position: relative;
}

/* ==========================================================================
   Comment Form Redesign (Next.js Premium Look)
   ========================================================================== */

.hd-comment-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	z-index: 1;
	position: relative;
}

.hd-comment-form .comment-reply-title {
	font-size: 20px !important;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 800 !important;
	color: #fff !important;
	margin-bottom: 6px !important;
	letter-spacing: -0.5px;
}

.hd-comment-form .logged-in-as {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.05);
	padding: 10px 16px;
	border-radius: var(--hd-radius-md);
	font-size: 12.5px;
	color: var(--hd-text-dim);
}

.hd-comment-form .logged-in-as a {
	color: var(--hd-primary);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease, text-shadow 0.2s ease;
}

.hd-comment-form .logged-in-as a:hover {
	color: #fff;
	text-shadow: 0 0 10px var(--hd-primary);
}

.comment-field-group {
	position: relative;
	margin-bottom: 0 !important;
}

.hd-comment-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.hd-filter-label {
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.8) !important;
	margin-bottom: 0 !important;
}

.hd-comment-toolbar {
	display: flex;
	gap: 10px;
}

/* Toolbar Buttons */
.hd-picker-toggle-btn {
	background: rgba(255, 255, 255, 0.02) !important;
	border: 1px solid rgba(255, 255, 255, 0.06) !important;
	border-radius: var(--hd-radius-md) !important;
	color: var(--hd-text-dim) !important;
	padding: 6px 12px !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hd-picker-toggle-btn svg {
	opacity: 0.7;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.hd-picker-toggle-btn:hover {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.06) !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
	transform: translateY(-1px);
}

.hd-picker-toggle-btn:hover svg {
	opacity: 1;
	transform: scale(1.1);
}

.hd-picker-toggle-btn.active {
	background: var(--hd-primary) !important;
	border-color: var(--hd-primary) !important;
	color: #fff !important;
	box-shadow: 0 4px 15px var(--hd-primary-glow);
}

.hd-textarea-relative-wrap {
	position: relative;
}

.hd-comment-form textarea {
	background: rgba(8, 10, 15, 0.8) !important;
	border: 1px solid rgba(255, 255, 255, 0.06) !important;
	border-radius: var(--hd-radius-md) !important;
	color: #fff !important;
	font-size: 14px !important;
	line-height: 1.65 !important;
	padding: 16px !important;
	width: 100%;
	min-height: 120px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.6) !important;
	font-family: inherit !important;
	resize: vertical !important;
}

.hd-comment-form textarea:focus {
	border-color: var(--hd-primary) !important;
	box-shadow: 0 0 0 3px var(--hd-primary-glow), 
	            inset 0 4px 12px rgba(0, 0, 0, 0.6) !important;
	background: rgba(8, 10, 15, 0.95) !important;
	outline: none !important;
}

/* User Name / Email Input Fields */
.hd-comment-form .hd-form-group:not(.comment-field-group) {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.hd-comment-form .hd-form-group:not(.comment-field-group) label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--hd-text-dim);
}

.hd-comment-form input[type="text"],
.hd-comment-form input[type="email"] {
	background: rgba(8, 10, 15, 0.8) !important;
	border: 1px solid rgba(255, 255, 255, 0.06) !important;
	border-radius: var(--hd-radius-md) !important;
	color: #fff !important;
	padding: 12px 16px !important;
	font-size: 13.5px !important;
	width: 100%;
	transition: all 0.2s ease !important;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

.hd-comment-form input[type="text"]:focus,
.hd-comment-form input[type="email"]:focus {
	border-color: var(--hd-primary) !important;
	background: rgba(8, 10, 15, 0.95) !important;
	box-shadow: 0 0 0 3px var(--hd-primary-glow) !important;
	outline: none !important;
}

/* Submit Button */
.hd-comment-form input[type="submit"] {
	background: linear-gradient(135deg, var(--hd-primary), #c2185b) !important;
	color: #fff !important;
	border: none !important;
	padding: 14px 32px !important;
	border-radius: var(--hd-radius-md) !important;
	font-size: 13.5px !important;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 800 !important;
	letter-spacing: 0.5px !important;
	cursor: pointer !important;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	box-shadow: 0 8px 20px -6px rgba(239, 68, 68, 0.45) !important;
	align-self: flex-start;
}

.hd-comment-form input[type="submit"]:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 12px 28px -4px rgba(239, 68, 68, 0.6) !important;
	background: linear-gradient(135deg, #f43f5e, #db2777) !important;
}

.hd-comment-form input[type="submit"]:active {
	transform: translateY(0px) !important;
}

/* ==========================================================================
   Comment Cards & List Overhaul
   ========================================================================== */

.hd-comment-list {
	display: flex;
	flex-direction: column;
	gap: 20px !important;
	list-style: none;
	padding: 0;
	margin-bottom: var(--hd-spacing-xl) !important;
	z-index: 1;
	position: relative;
}

.hd-comment-body {
	display: flex;
	gap: var(--hd-spacing-md);
	background: rgba(255, 255, 255, 0.015) !important;
	border: 1px solid rgba(255, 255, 255, 0.04) !important;
	border-radius: var(--hd-radius-lg) !important;
	padding: var(--hd-spacing-lg) !important;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	position: relative;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hd-comment-body:hover {
	background: rgba(255, 255, 255, 0.035) !important;
	border-color: rgba(255, 255, 255, 0.08) !important;
	box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.4) !important;
	transform: translateY(-2px);
}

/* Role-based glowing and borders */
.admin-badge-card {
	border-color: rgba(239, 68, 68, 0.15) !important;
	background: linear-gradient(to right, rgba(239, 68, 68, 0.02), rgba(255, 255, 255, 0.01)) !important;
}
.admin-badge-card:hover {
	border-color: rgba(239, 68, 68, 0.35) !important;
	box-shadow: 0 15px 35px -5px rgba(239, 68, 68, 0.08), 0 0 20px rgba(239, 68, 68, 0.05) !important;
}

.author-badge-card {
	border-color: rgba(245, 158, 11, 0.15) !important;
	background: linear-gradient(to right, rgba(245, 158, 11, 0.02), rgba(255, 255, 255, 0.01)) !important;
}
.author-badge-card:hover {
	border-color: rgba(245, 158, 11, 0.35) !important;
	box-shadow: 0 15px 35px -5px rgba(245, 158, 11, 0.08), 0 0 20px rgba(245, 158, 11, 0.05) !important;
}

.mod-badge-card {
	border-color: rgba(139, 92, 246, 0.15) !important;
	background: linear-gradient(to right, rgba(139, 92, 246, 0.02), rgba(255, 255, 255, 0.01)) !important;
}
.mod-badge-card:hover {
	border-color: rgba(139, 92, 246, 0.35) !important;
	box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.08), 0 0 20px rgba(139, 92, 246, 0.05) !important;
}

/* Avatar Wrapper & Glowing Status Rings */
.hd-comment-avatar-wrap {
	flex-shrink: 0;
}

.hd-comment-avatar-inner {
	position: relative;
	width: 48px;
	height: 48px;
}

.hd-comment-avatar-inner img {
	width: 100% !important;
	height: 100% !important;
	border-radius: 50% !important;
	border: 2px solid rgba(255, 255, 255, 0.08) !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
	transition: all 0.3s ease;
	display: block;
}

.hd-avatar-glow-status {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid rgba(15, 23, 42, 1);
	background: #94a3b8;
	box-shadow: 0 0 8px rgba(148, 163, 184, 0.5);
	transition: all 0.3s ease;
}

/* Glow Status Colors per role card */
.admin-badge-card .hd-comment-avatar-inner img { border-color: rgba(239, 68, 68, 0.4) !important; }
.admin-badge-card .hd-avatar-glow-status { background: #ef4444; box-shadow: 0 0 10px #ef4444; }

.author-badge-card .hd-comment-avatar-inner img { border-color: rgba(245, 158, 11, 0.4) !important; }
.author-badge-card .hd-avatar-glow-status { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; }

.mod-badge-card .hd-comment-avatar-inner img { border-color: rgba(139, 92, 246, 0.4) !important; }
.mod-badge-card .hd-avatar-glow-status { background: #8b5cf6; box-shadow: 0 0 10px #8b5cf6; }

.member-badge-card .hd-comment-avatar-inner img { border-color: rgba(59, 130, 246, 0.3) !important; }
.member-badge-card .hd-avatar-glow-status { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }

.guest-badge-card .hd-avatar-glow-status { background: #64748b; }

/* Comment Content Details */
.hd-comment-content {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.hd-comment-meta-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 2px;
}

.hd-comment-author-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.hd-comment-author-name a,
.hd-comment-author-name {
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #fff !important;
	text-decoration: none;
	letter-spacing: 0.2px;
	transition: color 0.2s ease;
}

.hd-comment-author-name a:hover {
	color: var(--hd-primary);
}

/* Premium Badges */
.hd-comment-badge {
	font-size: 9px !important;
	font-weight: 850 !important;
	padding: 2px 7px !important;
	border-radius: 4px !important;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	display: inline-flex;
}

.admin-badge { background: linear-gradient(135deg, #ef4444, #be123c); color: #fff; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
.author-badge { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3); }
.mod-badge { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3); }
.member-badge { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #60a5fa; }
.guest-badge { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); color: var(--hd-text-dim); }

.hd-comment-date-time {
	font-size: 11.5px !important;
	color: var(--hd-text-dim) !important;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	opacity: 0.85;
}

.hd-comment-date-time svg {
	opacity: 0.6;
}

.hd-comment-text {
	font-size: 13.8px !important;
	color: rgba(226, 232, 240, 0.9) !important;
	line-height: 1.7 !important;
}

.comment-awaiting-moderation {
	font-style: italic;
	color: var(--hd-accent) !important;
	font-weight: 500;
	margin-bottom: 8px;
	text-shadow: 0 0 10px var(--hd-accent-glow);
}

.hd-comment-actions {
	margin-top: 6px;
	display: flex;
	justify-content: flex-end;
}

/* Custom Reply Button badge */
.comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.03) !important;
	border: 1px solid rgba(255, 255, 255, 0.06) !important;
	border-radius: var(--hd-radius-md) !important;
	padding: 6px 14px !important;
	font-size: 11.5px !important;
	font-weight: 700 !important;
	color: var(--hd-text-dim) !important;
	text-decoration: none !important;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
	cursor: pointer;
}

.comment-reply-link::before {
	content: '↵';
	font-size: 12px;
	font-weight: 400;
}

.comment-reply-link:hover {
	background: var(--hd-primary) !important;
	color: #fff !important;
	border-color: var(--hd-primary) !important;
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
	transform: translateY(-1px);
}

/* ==========================================================================
   Emoji & GIF Picker Panel (Glassmorphic Overlay)
   ========================================================================== */

.hd-comments-picker-panel {
	position: absolute;
	bottom: calc(100% + 10px);
	right: 0;
	width: 330px;
	height: 330px;
	background: rgba(15, 23, 42, 0.96);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--hd-radius-lg);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 
	            0 0 0 1px rgba(255, 255, 255, 0.05);
	z-index: 100;
	display: none;
	flex-direction: column;
	overflow: hidden;
	animation: picker-open 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
	transform-origin: bottom right;
}

@keyframes picker-open {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@media (max-width: 480px) {
	.hd-comments-picker-panel {
		width: calc(100vw - 32px);
		right: 0;
		left: 0;
		position: fixed;
		bottom: 20px;
		left: 16px;
		z-index: 9999;
	}
}

.hd-picker-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px var(--hd-spacing-md);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	background: rgba(255, 255, 255, 0.01);
}

.hd-picker-tabs {
	display: flex;
	gap: 6px;
}

.hd-picker-tab-btn {
	background: none;
	border: none;
	color: var(--hd-text-dim);
	font-size: 13px;
	font-weight: 700;
	padding: 4px 10px;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: all 0.2s ease;
}

.hd-picker-tab-btn:hover {
	color: #fff;
}

.hd-picker-tab-btn.active {
	color: var(--hd-primary);
	border-bottom-color: var(--hd-primary);
}

.hd-picker-close-btn {
	background: none;
	border: none;
	color: var(--hd-text-dim);
	font-size: 20px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	transition: color 0.2s ease;
}

.hd-picker-close-btn:hover {
	color: var(--hd-primary);
}

.hd-picker-panel-body {
	flex-grow: 1;
	overflow-y: auto;
	padding: var(--hd-spacing-md);
}

/* Custom Scrollbars */
.hd-picker-panel-body::-webkit-scrollbar {
	width: 5px;
}
.hd-picker-panel-body::-webkit-scrollbar-track {
	background: rgba(0,0,0,0.15);
}
.hd-picker-panel-body::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 4px;
}
.hd-picker-panel-body::-webkit-scrollbar-thumb:hover {
	background: var(--hd-text-dim);
}

/* Tab Contents */
.hd-picker-tab-content {
	display: none;
}

.hd-picker-tab-content.active {
	display: block;
}

.hd-emoji-cat-title {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	color: var(--hd-text-dim);
	font-weight: 800;
	margin-bottom: 8px;
	margin-top: 12px;
	border-bottom: 1px solid rgba(255,255,255,0.04);
	padding-bottom: 4px;
}

.hd-emoji-cat-title:first-of-type {
	margin-top: 0;
}

.hd-emoji-grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 6px;
}

.hd-emoji-grid span {
	font-size: 19px;
	text-align: center;
	cursor: pointer;
	padding: 4px;
	border-radius: var(--hd-radius-sm);
	transition: background-color 0.15s ease, transform 0.1s ease;
	user-select: none;
}

.hd-emoji-grid span:hover {
	background: rgba(255, 255, 255, 0.08);
	transform: scale(1.3);
}

.hd-emoji-grid span:active {
	transform: scale(0.9);
}

/* GIF Layout */
.hd-gif-search-row {
	display: flex;
	gap: 8px;
	margin-bottom: var(--hd-spacing-md);
}

.hd-gif-search-row input {
	flex-grow: 1;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: var(--hd-radius-md);
	color: #fff;
	padding: 8px 12px;
	font-size: 12px;
	outline: none;
	transition: border-color 0.2s ease;
}

.hd-gif-search-row input:focus {
	border-color: var(--hd-primary);
}

.hd-gif-search-row button {
	background: var(--hd-primary);
	border: none;
	border-radius: var(--hd-radius-md);
	color: #fff;
	font-size: 12px;
	font-family: 'Outfit', sans-serif;
	font-weight: 700;
	padding: 8px 16px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.hd-gif-search-row button:hover {
	background: #c2185b;
	box-shadow: 0 4px 12px var(--hd-primary-glow);
}

.hd-gif-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.hd-gif-grid img {
	width: 100%;
	height: 68px;
	object-fit: cover;
	border-radius: var(--hd-radius-md);
	cursor: pointer;
	transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
	            border-color 0.2s ease, 
	            filter 0.2s ease;
	border: 1.5px solid transparent;
	background: rgba(255,255,255,0.02);
}

.hd-gif-grid img:hover {
	transform: scale(1.06);
	filter: brightness(1.15);
	border-color: var(--hd-primary);
	box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Rendered GIF visual cards in comments */
.hd-comment-gif-wrapper {
	margin-top: 12px;
	display: block;
	max-width: 240px;
}

.hd-comment-gif {
	width: 100%;
	max-height: 180px;
	object-fit: contain;
	border-radius: var(--hd-radius-md);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	transition: border-color 0.2s ease;
	display: block;
}

.hd-comment-gif:hover {
	border-color: var(--hd-primary);
}

.hd-spinner {
	width: 24px;
	height: 24px;
	border: 2.5px solid rgba(255,255,255,0.06);
	border-top-color: var(--hd-primary);
	border-radius: 50%;
	animation: hd-spin 0.8s linear infinite;
}
