/*
 Theme Name:   CoinRadar Child
 Theme URI:    https://coinradar.top/
 Description:  Child theme for GeneratePress, custom built for CoinRadar.
 Author:       Your Name
 Template:     generatepress
 Version:      1.19.0
 Text Domain:  coinradar-child
*/

:root {
    --primary-gold: #D4AF37;
    --bg-color: #fcfcfc;
    --border-color: #e5e7eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --red-badge: #ef4444;
    --green-ticker: #10b981;
    --red-ticker: #ef4444;
}

/* =====================================================================
 *  فونت استعداد (Estedad) - فونت اصلی سایت
 * ===================================================================== */
@font-face {
	font-family: 'Estedad';
	src: url('fonts/Estedad-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Estedad';
	src: url('fonts/Estedad-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Estedad';
	src: url('fonts/Estedad-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6,
.site-title,
.site-description,
.entry-title,
.nav-menu,
.qotd-bar {
	font-family: 'Estedad', -apple-system, Tahoma, sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
	font-weight: 700 !important;
}

body,
p, a, span, div, li {
	font-weight: 400;
}

/* قفل کردن اسکرول کل صفحه و تنظیم ارتفاع */
body.coinradar-dashboard {
    margin: 0;
    padding: 0;
    font-family: IRANSans, Tahoma, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    direction: rtl;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden !important; /* جلوگیری قطعی از اسکرول کل مرورگر - فقط داشبورد */
}
body.coinradar-dashboard .qotd-bar {
    flex-shrink: 0; /* نوار سخن روز جمع نشه، فضای خودشو نگه داره */
}

/* ساختار گرید: فضای باقی‌مانده‌ی زیر نوار سخن روز رو پر می‌کنه */
.cr-layout-grid {
    display: grid;
    grid-template-columns: 180px minmax(350px, 1.2fr) minmax(350px, 1fr) 120px;
    flex: 1;
    min-height: 0; /* اجازه بده گرید به‌جای بیرون‌زدگی، ارتفاع واقعی باقی‌مانده رو بگیره */
}

/* --- تنظیمات اسکرول مستقل --- */

/* ستون‌های ساده (منو و پیش‌نمایش) */
.cr-sidebar-nav, 
.cr-preview-column {
    height: 100%;
    overflow-y: auto;
}

/* ستون‌های فلکس (لیست مطالب و قیمت زنده) */
.cr-feed-column, 
.cr-ticker-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* کلید اصلی: جلوگیری از بیرون زدن محتوای فرزند */
}

/* لیست‌هایی که باید داخل ستون فلکس اسکرول بخورند */
.cr-post-list, 
.cr-ticker-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* کلید اصلی: اجبار فلکس‌باکس به ایجاد اسکرول */
}

/* استایل اسکرول‌بار برای زیبایی بیشتر در تمام ستون‌ها */
.cr-sidebar-nav, .cr-post-list, .cr-preview-column, .cr-ticker-list {
    scrollbar-width: thin; 
}
.cr-sidebar-nav::-webkit-scrollbar, .cr-post-list::-webkit-scrollbar, 
.cr-preview-column::-webkit-scrollbar, .cr-ticker-list::-webkit-scrollbar {
    width: 4px;
}
.cr-sidebar-nav::-webkit-scrollbar-thumb, .cr-post-list::-webkit-scrollbar-thumb, 
.cr-preview-column::-webkit-scrollbar-thumb, .cr-ticker-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* --- ستون منو (راست) --- */
.cr-sidebar-nav {
    border-left: 1px solid var(--border-color);
    background: #fff;
    padding: 20px 0;
    height: 100%;
}
.cr-logo {
    margin-bottom: 24px;
}
.cr-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}
.cr-logo-svg {
    width: 130px;
    height: auto;
}
.cr-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cr-menu li a {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 12.5px;
    transition: all 0.3s;
}
.cr-menu li a svg {
    margin-left: 8px;
    flex-shrink: 0;
    fill: var(--text-muted);
}
.cr-menu li a:hover {
    color: var(--primary-gold);
    background: #fafafa;
}
.cr-menu li a:hover svg {
    fill: var(--primary-gold);
}
.cr-badge.red {
    background: var(--red-badge);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: auto;
}
.cr-dropdown-toggle {
    position: relative;
}
.cr-dropdown-arrow {
    margin-right: auto;
    margin-left: 0;
    transition: transform 0.25s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}
.cr-dropdown-toggle.cr-dropdown-open .cr-dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary-gold);
}
.cr-submenu {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fafafa;
    transition: max-height 0.3s ease;
}
.cr-submenu.cr-submenu-open {
    max-height: 252px; /* حدود ۵ تا ۶ آیتم؛ بقیه با اسکرول */
    overflow-y: auto;
}
.cr-submenu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px 9px 12px;
    font-size: 12.5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.cr-submenu li a:hover {
    background: #fff;
    color: var(--text-main);
}
.cr-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cr-cat-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cr-cat-count {
    font-size: 10px;
    color: var(--text-muted);
    background: #ececE4;
    border-radius: 10px;
    padding: 1px 7px;
    flex-shrink: 0;
    font-family: Arial, sans-serif;
}
.cr-submenu.cr-submenu-open::-webkit-scrollbar {
    width: 4px;
}
.cr-submenu.cr-submenu-open::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* --- ستون لیست مطالب (وسط راست) --- */
.cr-feed-column {
    background: #fff;
}
.cr-top-bar {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}
#cr-live-search {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    outline: none;
}
#cr-live-search:focus {
    border-color: var(--primary-gold);
}
.cr-filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0 15px;
    cursor: pointer;
    border-radius: 4px;
}
.cr-post-list {
    flex: 1;
}
.cr-post-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px 30px 15px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
}
.cr-post-item:hover, .cr-post-item.active {
    background: #fdfbf7;
    border-right: 3px solid var(--hover-accent, var(--primary-gold));
}

/* --- ستون زمان: قبل از تیتر، وسط‌چین عمودی نسبت به کل کادر --- */
.cr-post-time-col {
    flex-shrink: 0;
    min-width: 46px;
    text-align: center;
}
.cr-post-time-col .cr-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --- بدنه‌ی اصلی: تیتر --- */
.cr-post-main {
    flex: 1;
    min-width: 0;
}
.cr-post-item[data-coin-symbol] .cr-post-main {
    padding-left: 150px; /* جا برای بج قیمت گوشه‌ی بالا-چپ */
}
.cr-post-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 10px;
}
.cr-post-title {
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
    color: var(--text-main);
}
.cr-post-item:hover .cr-post-title {
    color: var(--hover-accent, var(--primary-gold));
}

/* --- بج قیمت زنده (پیل طلایی)، گوشه‌ی بالا-چپ آیتم --- */
.cr-post-price-badge {
    position: absolute;
    top: 10px;
    left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--primary-gold);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 10.5px;
    font-family: Arial, sans-serif;
    line-height: 1.3;
    white-space: nowrap;
}
.cr-post-price-badge .price {
    color: #0f172a;
    font-weight: 700;
}
.cr-post-price-badge .symbol {
    color: var(--primary-gold);
    font-weight: 700;
}
.cr-post-price-badge .change.up { color: var(--green-ticker); font-weight: 700; }
.cr-post-price-badge .change.down { color: var(--red-ticker); font-weight: 700; }
.cr-post-price-loading {
    color: #94a3b8;
    font-size: 10px;
}

/* --- آمار پایین-چپ آیتم: زمان مطالعه، بازدید، دیدگاه --- */
.cr-post-stats {
    position: absolute;
    bottom: 8px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10.5px;
    color: var(--text-muted);
}
.cr-post-stats .cr-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.cr-post-stats svg {
    opacity: 0.65;
    flex-shrink: 0;
}

/* --- ستون پیش‌نمایش (وسط چپ) --- */
.cr-preview-column {
    background: #f9fafb;
    padding: 30px;
    border-left: 1px solid var(--border-color);
    height: 100%;
}
.cr-preview-inner .hd-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.5;
}
.cr-preview-inner .hd-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 12px;
    color: var(--text-muted);
}
.cr-tag {
    background: #e5e7eb;
    padding: 3px 8px;
    border-radius: 4px;
    color: #374151;
}
.cr-preview-inner .hd-excerpt {
    font-size: 15px;
    line-height: 1.8;
    color: #4b5563;
}
.cr-read-more {
    color: var(--primary-gold);
    font-weight: bold;
    text-decoration: none;
    margin-right: 5px;
}

/* --- ستون قیمت زنده (چپ) --- */
.cr-ticker-column {
    background: #f4f5f7; 
    border-right: 1px solid var(--border-color);
}
.cr-ticker-tabs {
    display: flex;
    background: #eef0f3;
    border-bottom: 1px solid var(--border-color);
}
.cr-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    color: #64748b;
    transition: background 0.2s;
}
.cr-tab.active {
    background: #fff;
    color: #0f172a;
    font-weight: bold;
}
.cr-coin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 6px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    font-family: Arial, sans-serif;
}
.cr-coin-left {
    color: #64748b;
}
.cr-coin-left.gold {
    color: var(--primary-gold);
}
.cr-coin-right {
    text-align: right;
}
.cr-coin-price {
    display: block;
    color: #0f172a;
}
.cr-coin-change {
    display: block;
    font-size: 10px;
    margin-top: 3px;
}
.cr-coin-change.up { color: #10b981; }
.cr-coin-change.down { color: #ef4444; }
.cr-loading {
    padding: 20px 10px;
    text-align: center;
    font-size: 11px;
    color: #64748b;
}

/* --- ریسپانسیو (موبایل) --- */
@media (max-width: 900px) {
    .cr-layout-grid {
        grid-template-columns: 1fr;
        overflow: auto;
    }
    .cr-sidebar-nav, .cr-ticker-column, .cr-preview-column {
        display: none;
    }
    .cr-mobile-preview-box {
        margin-top: 15px;
        padding: 15px;
        background: #f9fafb;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        display: none;
    }
    body.coinradar-dashboard {
        overflow: auto; /* فعال کردن اسکرول در موبایل */
        height: auto;
    }
}


/* =====================================================================
 *  سخن روز (Quote of the Day)
 * ===================================================================== */
.qotd-bar {
	background: #0a0a0a;
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.qotd-bar::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(212, 175, 55, 0.10) 0%, transparent 35%, transparent 65%, rgba(212, 175, 55, 0.10) 100%);
	pointer-events: none;
}

.qotd-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 24px;
	padding: 10px 15px;
	font-size: 14px;
	line-height: 1.6;
}

.qotd-quote {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-width: 0;
}

.qotd-label {
	color: #d4af37;
	font-weight: 700;
	white-space: nowrap;
	flex-shrink: 0;
	position: relative;
	padding-inline-start: 14px;
}

.qotd-label::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #d4af37;
	box-shadow: 0 0 6px 1px rgba(212, 175, 55, 0.8);
}

.qotd-icon {
	color: #d4af37;
	font-size: 15px;
	flex-shrink: 0;
	opacity: 0.9;
}

.qotd-text {
	color: #f1f1f1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.qotd-date {
	display: flex;
	align-items: center;
	gap: 7px;
	color: #b9b9b9;
	font-size: 12.5px;
	flex-shrink: 0;
	white-space: nowrap;
}

.qotd-date i {
	color: #d4af37;
}

@media (max-width: 767px) {
	.qotd-inner {
		flex-direction: column;
		align-items: flex-start;
		padding: 10px 15px;
	}
	.qotd-text {
		white-space: normal;
	}
	.qotd-date {
		font-size: 11.5px;
	}
}

/* =====================================================================
 *  پیش‌نمایش مطلب - نسخه جدید (نوار واکنش، دسته‌بندی رنگی، دکمه بستن و ...)
 * ===================================================================== */

.cr-preview-column {
    position: relative;
}

/* دکمه بستن پیش‌نمایش - فقط با هاور روی ستون نمایش داده می‌شود */
.cr-preview-close {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #6b7280;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.85);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.2s, color 0.2s;
}
.cr-preview-column:hover .cr-preview-close,
.cr-preview-close:focus {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.cr-preview-close:hover {
    background: var(--red-badge);
    color: #fff;
}

/* --- نوار واکنش‌ها --- */
.hd-reaction-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 18px;
    background: #fff;
}
.cr-reaction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    border: none;
    border-left: 1px solid var(--border-color);
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.hd-reaction-bar .cr-reaction:nth-child(4n) {
    border-left: none;
}
.hd-reaction-bar .cr-reaction:nth-child(-n+4) {
    border-bottom: 1px solid var(--border-color);
}
.cr-reaction svg {
    flex-shrink: 0;
}
.cr-reaction-count {
    font-size: 10px;
    font-family: Arial, sans-serif;
    opacity: 0.65;
}
.cr-reaction.active .cr-reaction-count,
.cr-reaction:hover .cr-reaction-count {
    opacity: 1;
}
.cr-reaction.active,
.cr-reaction:hover {
    background: currentColor;
}
.cr-reaction:hover span,
.cr-reaction.active span,
.cr-reaction:hover svg,
.cr-reaction.active svg {
    color: #fff;
    fill: #fff;
}

/* رنگ فلت اختصاصی هر واکنش */
.cr-reaction-like        { color: #10b981; }
.cr-reaction-dislike     { color: #ef4444; }
.cr-reaction-funny       { color: #f59e0b; }
.cr-reaction-save        { color: #3b82f6; }
.cr-reaction-bullish     { color: #059669; }
.cr-reaction-bearish     { color: #e11d48; }
.cr-reaction-important   { color: #8b5cf6; }
.cr-reaction-toxic       { color: #65a30d; }

/* --- ردیف تیتر با آیکون باز کردن --- */
.hd-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.hd-expand-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 4px;
    border-radius: 6px;
    color: var(--text-muted);
    background: #f3f4f6;
    transition: background 0.15s, color 0.15s;
}
.hd-expand-icon:hover {
    background: var(--primary-gold);
    color: #fff;
}
.hd-title-row .hd-title {
    flex: 1;
    margin-bottom: 0;
}

/* --- متادیتا: دسته‌بندی‌های رنگی + کپی لینک --- */
.hd-meta {
    flex-wrap: wrap;
}
.hd-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cr-cat-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    opacity: 0.92;
    transition: opacity 0.15s;
}
.cr-cat-badge:hover {
    opacity: 1;
}
.cr-copy-link {
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cr-copy-link:hover {
    background: #f3f4f6;
    color: var(--primary-gold);
}
.cr-copy-link.copied {
    color: var(--green-ticker);
}

/* --- ادامه مطلب با آیکون فلش --- */
.cr-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cr-read-more svg {
    transform: scaleX(-1); /* فلش رو به سمت جلو در چیدمان راست‌به‌چپ */
}

/* --- اشتراک‌گذاری در شبکه‌های اجتماعی --- */
.hd-share {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.hd-share-label {
    font-size: 13px;
    color: var(--text-muted);
}
.hd-share-icons {
    display: flex;
    gap: 8px;
}
.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    transition: opacity 0.15s, transform 0.15s;
}
.share-icon:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}
.share-twitter    { background: #000000; }
.share-instagram  { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.share-telegram   { background: #26A5E4; }
.share-facebook   { background: #1877F2; }

/* ریسپانسیو موبایل برای بخش‌های جدید */
@media (max-width: 900px) {
    .hd-reaction-bar {
        grid-template-columns: repeat(4, 1fr);
    }
    .cr-preview-close {
        display: none;
    }
}


/* =====================================================================
 *  پیغام کوتاه (Toast) - اطلاع‌رسانی باز شدن مطلب در تب جدید
 * ===================================================================== */
.cr-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1f2937;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: opacity 0.25s ease, transform 0.25s ease;
    direction: rtl;
}
.cr-toast svg {
    color: var(--primary-gold);
    flex-shrink: 0;
}
.cr-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
    .cr-toast {
        bottom: 16px;
        width: calc(100% - 32px);
        max-width: 360px;
        justify-content: center;
    }
}


/* =====================================================================
 *  هدر تیره و مینیمال (تک‌نوشته، آرشیو و بقیه صفحات - نه صفحه اصلی داشبورد)
 * ===================================================================== */
.cr-site-header {
    background: #0a0a0a;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    direction: rtl;
}
.cr-site-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cr-header-logo {
    display: flex;
    align-items: center;
    color: #f1f1f1;
    text-decoration: none;
    flex-shrink: 0;
}
.cr-header-logo-svg {
    width: 140px;
    height: auto;
}

/* --- منو --- */
.cr-header-nav > ul {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.cr-header-nav > ul > li {
    position: relative;
}
.cr-header-nav a {
    display: block;
    color: #f1f1f1;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.cr-header-nav > ul > li > a:hover {
    background: rgba(212, 175, 55, 0.12);
    color: var(--primary-gold);
}
.cr-header-submenu {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    min-width: 180px;
    background: #141414;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 6px;
    list-style: none;
    margin: 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    z-index: 20;
}
.cr-header-submenu.cr-open {
    display: block;
}
.cr-header-submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 7px 10px;
    color: #d1d5db;
}
.cr-header-submenu a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
.cr-header-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- سمت راست: تیکر بیت‌کوین + دکمه --- */
.cr-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.cr-header-ticker {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    color: #f1f1f1;
    white-space: nowrap;
}
.cr-header-btc-symbol {
    color: var(--primary-gold);
    font-weight: 700;
}
.cr-header-btc-change.up { color: var(--green-ticker); }
.cr-header-btc-change.down { color: var(--red-ticker); }

.cr-header-btn {
    background: var(--primary-gold);
    color: #0a0a0a;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.cr-header-btn:hover {
    opacity: 0.85;
}

/* --- همبرگر موبایل --- */
.cr-header-burger {
    display: none;
    background: transparent;
    border: none;
    color: #f1f1f1;
    cursor: pointer;
    padding: 4px;
}

/* --- ریسپانسیو --- */
@media (max-width: 900px) {
    .cr-header-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #0a0a0a;
        border-bottom: 1px solid rgba(212, 175, 55, 0.25);
        padding: 10px 16px;
    }
    .cr-header-nav.cr-header-nav-open {
        display: block;
    }
    .cr-header-nav > ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .cr-header-submenu {
        position: static;
        border: none;
        background: transparent;
        box-shadow: none;
        padding-right: 16px;
    }
    .cr-header-actions .cr-header-btn {
        display: none;
    }
    .cr-header-burger {
        display: block;
    }
    .cr-site-header {
        position: relative;
    }
    .cr-site-header-inner {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .cr-header-ticker {
        display: none;
    }
}


/* =====================================================================
 *  حالت فعال فیلتر «ذخیره‌های من» تو سایدبار
 * ===================================================================== */
.cr-menu li a.cr-active-filter {
    color: var(--primary-gold);
    background: #fdfbf7;
    font-weight: 700;
}
.cr-menu li a.cr-active-filter svg {
    fill: var(--primary-gold);
}


/* =====================================================================
 *  مودال ثبت‌نام / ورود
 * ===================================================================== */
.cr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.6);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cr-modal-overlay[hidden] {
    display: none;
}
.cr-modal-box {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #0f0f0f;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    padding: 28px 24px;
    direction: rtl;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.cr-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s;
}
.cr-modal-close:hover {
    color: #fff;
}

.cr-auth-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 4px;
}
.cr-auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 8px 0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cr-auth-tab.active {
    background: var(--primary-gold);
    color: #0a0a0a;
    font-weight: 700;
}

.cr-auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cr-auth-form[hidden] {
    display: none;
}
.cr-auth-form input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 10px 12px;
    color: #f1f1f1;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.cr-auth-form input::placeholder {
    color: #6b7280;
}
.cr-auth-form input:focus {
    border-color: var(--primary-gold);
}
.cr-auth-submit {
    background: var(--primary-gold);
    color: #0a0a0a;
    border: none;
    border-radius: 6px;
    padding: 10px 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}
.cr-auth-submit:hover {
    opacity: 0.88;
}
.cr-auth-submit:disabled {
    opacity: 0.6;
    cursor: default;
}
.cr-auth-message {
    font-size: 12px;
    min-height: 16px;
}
.cr-auth-message.cr-auth-error {
    color: var(--red-badge);
}
.cr-auth-message.cr-auth-success {
    color: var(--green-ticker);
}

/* =====================================================================
 *  صفحه‌ی پنل کاربری (page-panel.php)
 * ===================================================================== */
.cr-panel-wrap {
    background: #f9fafb;
    min-height: 70vh;
    padding: 40px 20px;
    direction: rtl;
}
.cr-panel-container {
    max-width: 640px;
    margin: 0 auto;
}
.cr-panel-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--text-main);
}
.cr-panel-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.cr-notice-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.cr-notice-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.cr-notice-warning button {
    background: #92400e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.cr-panel-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.cr-panel-section h2 {
    font-size: 15px;
    margin: 0 0 14px;
    color: var(--text-main);
}
.cr-panel-section p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 6px 0;
}
.cr-panel-logout {
    margin-top: 12px;
    background: transparent;
    border: 1px solid var(--red-badge);
    color: var(--red-badge);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.cr-panel-logout:hover {
    background: var(--red-badge);
    color: #fff;
}
.cr-panel-empty {
    color: var(--text-muted);
    font-size: 13px;
}
.cr-panel-saved-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cr-panel-saved-list li {
    border-bottom: 1px solid #f3f4f6;
    padding: 10px 0;
}
.cr-panel-saved-list li:last-child {
    border-bottom: none;
}
.cr-panel-saved-list a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}
.cr-panel-saved-list a:hover {
    color: var(--primary-gold);
}

/* =====================================================================
 *  رفع قطعی مشکل عدم اسکرول در موبایل (همه‌ی صفحات)
 * ===================================================================== */
.cr-modal-overlay[hidden] {
    display: none !important;
    pointer-events: none !important;
}

@media (max-width: 900px) {
    html, body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        position: static !important;
    }
    body.coinradar-dashboard {
        overflow-y: auto !important;
        height: auto !important;
    }
}

/* هدر تیره‌ی تک‌نوشته، فقط تو موبایل روی صفحه اصلی هم نشون داده بشه */
.cr-mobile-only-header { display: none; }
@media (max-width: 900px) {
    .cr-mobile-only-header { display: block; }
}

/* =====================================================================
 *  ویجت «بازارهای جهانی» - زیر منوی راست
 * ===================================================================== */
.cr-world-markets {
    margin-top: 24px;
    padding: 16px 14px 4px;
    border-top: 1px solid var(--border-color);
}
.cr-wm-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 14px 0;
}
.cr-wm-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-ticker);
    flex-shrink: 0;
    animation: cr-wm-pulse 2s infinite;
}
@keyframes cr-wm-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.cr-wm-sessions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 10px;
}
.cr-wm-session {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
}
.cr-wm-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cr-wm-dot.cr-wm-open { background: var(--green-ticker); }
.cr-wm-dot.cr-wm-closed { background: #d1d5db; }
.cr-wm-name {
    flex: 1;
    min-width: 0;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cr-wm-time {
    color: var(--text-muted);
    font-family: Arial, sans-serif;
    font-size: 10.5px;
    flex-shrink: 0;
}
.cr-wm-countdown {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 14px 0;
    line-height: 1.6;
}
.cr-wm-countdown-time {
    font-family: Arial, sans-serif;
    color: var(--primary-gold);
    font-weight: 700;
}
.cr-wm-metals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}
.cr-wm-metal-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}
.cr-wm-metal-icon {
    font-size: 12px;
    flex-shrink: 0;
}
.cr-wm-metal-name {
    color: var(--text-main);
    flex-shrink: 0;
}
.cr-wm-metal-price {
    flex: 1;
    min-width: 0;
    text-align: left;
    color: var(--text-main);
    font-family: Arial, sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cr-wm-metal-change {
    font-family: Arial, sans-serif;
    font-size: 10px;
    flex-shrink: 0;
    min-width: 40px;
    text-align: left;
}
.cr-wm-metal-change.up { color: var(--green-ticker); }
.cr-wm-metal-change.down { color: var(--red-ticker); }

/* =====================================================================
 *  شاخص ترس و طمع بازار
 * ===================================================================== */
.cr-fear-greed-widget {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.cr-fg-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 6px 0;
}
.cr-fg-heading svg {
    color: var(--primary-gold);
    flex-shrink: 0;
}
.cr-fg-gauge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cr-fg-loading {
    padding: 20px 0 4px;
    font-size: 11.5px;
    color: var(--text-muted);
}
.cr-fg-gauge {
    width: 160px;
    height: auto;
    margin-bottom: -18px;
}
.cr-fg-value {
    font-size: 26px;
    font-weight: 700;
    font-family: Arial, sans-serif;
}
.cr-fg-label {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* =====================================================================
 *  نبض بازار (نظرسنجی)
 * ===================================================================== */
.cr-market-pulse {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.cr-pulse-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px 0;
}
.cr-pulse-heading svg {
    color: var(--primary-gold);
    flex-shrink: 0;
}
.cr-pulse-question {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    margin: 0 0 12px 0;
    line-height: 1.6;
}
.cr-pulse-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cr-pulse-options:not(.cr-pulse-voted) .cr-pulse-option {
    cursor: pointer;
}
.cr-pulse-option {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    transition: border-color 0.15s, background 0.15s;
}
.cr-pulse-options:not(.cr-pulse-voted) .cr-pulse-option:hover {
    border-color: var(--primary-gold);
    background: #fdfbf7;
}
.cr-pulse-option.cr-pulse-my-vote {
    border-color: var(--primary-gold);
}
.cr-pulse-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    margin-bottom: 6px;
}
.cr-pulse-option-label {
    font-weight: 500;
    color: var(--text-main);
}
.cr-pulse-option-pct {
    color: var(--text-muted);
    font-family: Arial, sans-serif;
}
.cr-pulse-bar-track {
    height: 6px;
    border-radius: 3px;
    background: #f1efe8;
    overflow: hidden;
}
.cr-pulse-options:not(.cr-pulse-voted) .cr-pulse-bar-track {
    display: none;
}
.cr-pulse-bar-fill {
    height: 100%;
    background: var(--primary-gold);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.cr-pulse-total {
    font-size: 11px;
    color: var(--text-muted);
    margin: 10px 0 0 0;
    text-align: center;
}

/* =====================================================================
 *  حالت خالی ستون پیش‌نمایش
 * ===================================================================== */
.cr-empty-state {
    padding: 40px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
.cr-article-loading {
    padding: 40px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* =====================================================================
 *  ویجت «پربازدیدترین‌های اخیر» - حالت پیش‌فرض ستون پیش‌نمایش
 * ===================================================================== */
.cr-trending-widget {
    padding-top: 4px;
}
.cr-trending-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 14px 0;
}
.cr-trending-heading svg {
    color: var(--primary-gold);
    flex-shrink: 0;
}
.cr-trending-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cr-trending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 6px;
    border-bottom: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.cr-trending-item:last-child {
    border-bottom: none;
}
.cr-trending-item:hover {
    background: #fff;
}
.cr-trending-rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: Arial, sans-serif;
}
.cr-trending-item:nth-child(n+4) .cr-trending-rank {
    background: #d1d5db;
    color: #4b5563;
}
.cr-trending-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
}
.cr-trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cr-trending-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cr-trending-title {
    font-size: 12.5px;
    line-height: 1.5;
    font-weight: 500;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cr-trending-item:hover .cr-trending-title {
    color: var(--primary-gold);
}
.cr-trending-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    color: var(--text-muted);
}
.cr-trending-views svg {
    opacity: 0.65;
    flex-shrink: 0;
}

/* =====================================================================
 *  نمایش کامل مطلب داخل ستون پیش‌نمایش (بدون رفتن به صفحه‌ی جدا)
 * ===================================================================== */
.cr-full-article {
    padding-top: 4px;
}
.cr-full-featured-image {
    margin: 16px 0;
    max-width: 280px;
}
.cr-full-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.cr-full-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 14px 0;
    color: var(--text-main);
}
.cr-full-content {
    font-size: 15px;
    line-height: 2;
    color: #374151;
    margin-top: 10px;
}
.cr-full-content p {
    margin: 0 0 16px 0;
}
.cr-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.cr-full-content h2,
.cr-full-content h3 {
    margin: 24px 0 12px 0;
}

/* --- نسخه‌ی همیشه-قابل‌مشاهده‌ی مطلب، فقط تو موبایلِ صفحه‌ی تک‌نوشته (چون ستون پیش‌نمایش اونجا مخفیه) --- */
.cr-mobile-only-article { display: none; }
@media (max-width: 900px) {
    .cr-mobile-only-article {
        display: block;
        padding: 15px;
    }
    .cr-mobile-only-article .cr-full-featured-image {
        max-width: 100%;
    }
}

/* =====================================================================
 *  ============  v1.18 — ارتقای بصری بزرگ (CoinRadar Polish)  ============
 *  الهام از CryptoPanic، طلای گرم و پخته، حس عمق، خوانایی حرفه‌ای
 *  تمام دستورات این بخش، دستورات بالاتر رو در همون کلاس‌ها بازنویسی می‌کنند.
 * ===================================================================== */

/* --- پالت طلایی لوکس + متغیرهای جدید --- */
:root {
    --primary-gold: #C9A24C;         /* طلای گرم و پخته */
    --gold-bright: #E5B84B;          /* درخشش */
    --gold-deep: #A8862F;            /* تیره برای عمق */
    --gold-soft: #F4E4B8;            /* نرم برای پس‌زمینه */
    --gold-tint: rgba(201, 162, 76, 0.08);
    --gold-glow: rgba(201, 162, 76, 0.35);
    --gold-gradient: linear-gradient(135deg, #E5B84B 0%, #C9A24C 50%, #A8862F 100%);
    --gold-shine: linear-gradient(90deg, transparent, rgba(229,184,75,0.45), transparent);

    --surface-1: #ffffff;
    --surface-2: #fbfaf7;            /* خیلی مایل به کرم روشن */
    --surface-3: #f6f3ec;            /* پس‌زمینه ستون قیمت */
    --border-soft: #ecebe5;
    --border-strong: #dfddd3;

    --text-strong: #17181a;
    --text-main: #26272b;
    --text-muted: #6f7078;
    --text-faint: #9b9ca2;

    --shadow-sm: 0 1px 2px rgba(20,18,10,0.04);
    --shadow-md: 0 4px 14px rgba(20,18,10,0.06), 0 1px 3px rgba(20,18,10,0.04);
    --shadow-lg: 0 12px 30px rgba(20,18,10,0.10), 0 3px 6px rgba(20,18,10,0.05);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --ease-out: cubic-bezier(.22,.61,.36,1);
}

/* پس‌زمینه کلی داشبورد کمی گرم‌تر */
body.coinradar-dashboard {
    background: var(--surface-2);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- اسکرول‌بار سفارشی طلایی --- */
.cr-sidebar-nav::-webkit-scrollbar,
.cr-post-list::-webkit-scrollbar,
.cr-preview-column::-webkit-scrollbar,
.cr-ticker-list::-webkit-scrollbar {
    width: 6px;
}
.cr-sidebar-nav::-webkit-scrollbar-thumb,
.cr-post-list::-webkit-scrollbar-thumb,
.cr-preview-column::-webkit-scrollbar-thumb,
.cr-ticker-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
    border-radius: 8px;
    border: 1.5px solid var(--surface-1);
}
.cr-sidebar-nav::-webkit-scrollbar-thumb:hover,
.cr-post-list::-webkit-scrollbar-thumb:hover,
.cr-preview-column::-webkit-scrollbar-thumb:hover,
.cr-ticker-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #F0C766, var(--primary-gold));
}

/* --- سایدبار (منوی راست) --- */
.cr-sidebar-nav {
    background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
    border-left: 1px solid var(--border-soft);
    box-shadow: inset -1px 0 0 rgba(201,162,76,0.03);
}
.cr-logo-svg { filter: drop-shadow(0 2px 4px rgba(201,162,76,0.15)); }

.cr-menu li a {
    position: relative;
    font-size: 13px;
    padding: 11px 16px;
    margin: 1px 8px;
    border-radius: 8px;
    transition: color .25s var(--ease-out), background .25s var(--ease-out), padding .25s var(--ease-out);
}
.cr-menu li a::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 3px;
    height: 0;
    background: var(--gold-gradient);
    border-radius: 3px;
    transform: translateY(-50%);
    transition: height .3s var(--ease-out);
}
.cr-menu li a:hover {
    background: var(--gold-tint);
    color: var(--gold-deep);
    padding-right: 20px;
}
.cr-menu li a:hover::before { height: 60%; }
.cr-menu li a:hover svg { fill: var(--gold-deep); transform: translateX(-2px); }
.cr-menu li a svg { transition: transform .25s var(--ease-out), fill .25s var(--ease-out); }

.cr-badge.red {
    background: linear-gradient(135deg, #f24e4e, #d43535);
    box-shadow: 0 2px 6px rgba(220,53,53,0.35);
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 700;
    letter-spacing: .2px;
}

/* --- نوار بالای فید (جستجو و فیلتر) --- */
.cr-feed-column { background: var(--surface-1); }
.cr-top-bar {
    background: linear-gradient(180deg, #ffffff, #fbfaf7);
    border-bottom: 1px solid var(--border-soft);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
}
#cr-live-search {
    padding: 10px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: #fbfaf7;
    font-size: 13.5px;
    transition: all .25s var(--ease-out);
}
#cr-live-search:focus {
    border-color: var(--primary-gold);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--gold-tint);
}
.cr-filter-btn {
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 8px 18px;
    background: #ffffff;
    font-size: 13px;
    color: var(--text-main);
    transition: all .25s var(--ease-out);
}
.cr-filter-btn:hover {
    border-color: var(--primary-gold);
    color: var(--gold-deep);
    background: var(--gold-tint);
}

/* --- کارت‌های پست: طراحی مدرن، عمق ظریف، هاور با گرادیان طلایی --- */
.cr-post-item {
    padding: 16px 18px 32px 18px;
    border-bottom: 1px solid var(--border-soft);
    transition: background .25s var(--ease-out), transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
    border-right: 3px solid transparent;
}
.cr-post-item::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 3px;
    background: var(--gold-gradient);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform .35s var(--ease-out);
    pointer-events: none;
}
.cr-post-item:hover,
.cr-post-item.active {
    background: linear-gradient(90deg, #fdfbf3 0%, #ffffff 60%);
    border-right-color: transparent;
    box-shadow: inset 0 -1px 0 rgba(201,162,76,0.10);
}
.cr-post-item:hover::after,
.cr-post-item.active::after {
    transform: scaleY(1);
}
.cr-post-title {
    font-size: 14.5px;
    line-height: 1.75;
    font-weight: 600;
    color: var(--text-strong);
    letter-spacing: -0.1px;
    transition: color .2s var(--ease-out);
}
.cr-post-item:hover .cr-post-title,
.cr-post-item.active .cr-post-title { color: var(--gold-deep); }

.cr-post-time-col .cr-time {
    display: inline-block;
    padding: 3px 9px;
    background: var(--gold-tint);
    color: var(--gold-deep);
    font-weight: 600;
    font-size: 10.5px;
    border-radius: 999px;
    border: 1px solid rgba(201,162,76,0.18);
}

/* --- بج قیمت زنده روی کارت: شیشه‌ای با درخشش --- */
.cr-post-price-badge {
    background: linear-gradient(135deg, #ffffff, #fdf8ea);
    border: 1px solid rgba(201,162,76,0.5);
    box-shadow: 0 2px 8px rgba(201,162,76,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    padding: 4px 12px;
    font-size: 11px;
    top: 12px;
    left: 18px;
}
.cr-post-price-badge .symbol {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}
.cr-post-price-badge .change.up  { color: #0f9d6b; }
.cr-post-price-badge .change.down { color: #dc2f3c; }

/* --- آمار پایین کارت --- */
.cr-post-stats {
    left: 18px;
    bottom: 10px;
    font-size: 11px;
    color: var(--text-faint);
    gap: 12px;
}
.cr-post-stats .cr-stat { transition: color .2s var(--ease-out); }
.cr-post-item:hover .cr-post-stats .cr-stat { color: var(--text-muted); }

/* --- ستون پیش‌نمایش: زمینه گرم روشن --- */
.cr-preview-column {
    background: linear-gradient(180deg, #fbfaf5 0%, #f7f4ec 100%);
    border-left: 1px solid var(--border-soft);
    padding: 34px 32px;
}
.cr-preview-inner .hd-title,
.cr-full-title {
    font-size: 25px;
    line-height: 1.65;
    letter-spacing: -0.3px;
    color: var(--text-strong);
    margin-bottom: 16px;
}

/* --- دکمه بستن پیش‌نمایش با درخشش طلایی --- */
.cr-preview-close {
    background: #ffffff;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-soft);
}
.cr-preview-close:hover {
    background: var(--gold-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--gold-glow);
    border-color: transparent;
}

/* --- بج دسته‌بندی: گرد و تمیز‌تر --- */
.cr-cat-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1px;
    opacity: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.cr-cat-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* --- آیکون‌های ابزار (باز کردن + کپی لینک) --- */
.hd-expand-icon,
.cr-copy-link {
    border-radius: 8px;
    transition: all .2s var(--ease-out);
    background: rgba(201,162,76,0.06);
    color: var(--text-muted);
}
.hd-expand-icon:hover {
    background: var(--gold-gradient);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--gold-glow);
}
.cr-copy-link:hover {
    background: var(--gold-tint);
    color: var(--gold-deep);
    transform: scale(1.06);
}

/* =====================================================================
 *  نوار واکنش‌ها v2: دکمه‌های پیل تعاملی مدرن
 * ===================================================================== */
.hd-reaction-bar {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px !important;
    grid-template-columns: unset !important;
    background: transparent !important;
    border: none !important;
    padding: 2px 0;
    margin-bottom: 20px !important;
}
.hd-reaction-bar .cr-reaction {
    flex: 1 1 calc(25% - 6px);
    min-width: 82px;
    padding: 8px 10px !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    font-weight: 500;
    font-size: 12px !important;
    gap: 7px !important;
    box-shadow: 0 1px 2px rgba(20,18,10,0.03);
    transition: transform .2s var(--ease-out), box-shadow .25s var(--ease-out),
                border-color .25s var(--ease-out), background .25s var(--ease-out) !important;
    position: relative;
    overflow: hidden;
}
.hd-reaction-bar .cr-reaction::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity .25s var(--ease-out);
    pointer-events: none;
}
.hd-reaction-bar .cr-reaction:hover {
    transform: translateY(-2px);
    border-color: currentColor !important;
    background: #ffffff !important;
    box-shadow: 0 6px 16px rgba(20,18,10,0.10);
}
.hd-reaction-bar .cr-reaction:hover::before { opacity: 0.08; }
.hd-reaction-bar .cr-reaction:hover span,
.hd-reaction-bar .cr-reaction:hover svg {
    color: currentColor !important;
    fill: currentColor !important;
}
.hd-reaction-bar .cr-reaction.active {
    background: currentColor !important;
    border-color: currentColor !important;
    box-shadow: 0 6px 18px rgba(20,18,10,0.14);
    transform: translateY(-1px);
}
.hd-reaction-bar .cr-reaction.active::before { opacity: 0 !important; }
.hd-reaction-bar .cr-reaction.active svg,
.hd-reaction-bar .cr-reaction.active span {
    color: #ffffff !important;
    fill: #ffffff !important;
}
.cr-reaction-count {
    font-weight: 700;
    opacity: 0.85 !important;
    font-size: 11px !important;
    background: rgba(0,0,0,0.05);
    padding: 1px 7px;
    border-radius: 999px;
    transition: background .25s var(--ease-out);
}
.hd-reaction-bar .cr-reaction:hover .cr-reaction-count {
    background: rgba(0,0,0,0.06);
}
.hd-reaction-bar .cr-reaction.active .cr-reaction-count {
    background: rgba(255,255,255,0.28) !important;
    color: #ffffff !important;
}
/* اثر ضربه‌ای هنگام کلیک روی واکنش */
@keyframes crReactPulse {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.14); }
    100% { transform: scale(1); }
}
.hd-reaction-bar .cr-reaction.cr-pulse { animation: crReactPulse .35s var(--ease-out); }

/* حذف border-left گرید قدیمی که ظاهر رو خراب می‌کرد */
.hd-reaction-bar .cr-reaction {
    border-left: 1px solid var(--border-soft) !important;
    border-bottom: 1px solid var(--border-soft) !important;
}

/* رنگ‌های ملایم شده برای هارمونی */
.cr-reaction-like        { color: #10b981; }
.cr-reaction-dislike     { color: #ef4444; }
.cr-reaction-funny       { color: #eab308; }
.cr-reaction-save        { color: #3b82f6; }
.cr-reaction-bullish     { color: #059669; }
.cr-reaction-bearish     { color: #e11d48; }
.cr-reaction-important   { color: #a855f7; }
.cr-reaction-toxic       { color: #84cc16; }

@media (max-width: 480px) {
    .hd-reaction-bar .cr-reaction {
        flex: 1 1 calc(50% - 4px);
        font-size: 12px !important;
    }
}

/* =====================================================================
 *  ستون قیمت زنده: کارت‌های پخته و درخشش طلایی
 * ===================================================================== */
.cr-ticker-column {
    background: linear-gradient(180deg, #171614 0%, #0f0e0c 100%);
    border-right: 1px solid rgba(201,162,76,0.18);
    color: #efe9d5;
    position: relative;
}
.cr-ticker-column::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--gold-shine);
    opacity: 0.5;
}
.cr-ticker-tabs {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(201,162,76,0.15);
}
.cr-tab {
    color: #c8bfa4;
    font-weight: 600;
    padding: 13px 0;
    transition: all .25s var(--ease-out);
    position: relative;
}
.cr-tab:hover { color: var(--gold-bright); }
.cr-tab.active {
    background: transparent;
    color: var(--gold-bright);
}
.cr-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--gold-gradient);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--gold-glow);
}

.cr-coin {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background .2s var(--ease-out), transform .2s var(--ease-out);
    cursor: pointer;
}
.cr-coin:hover {
    background: rgba(201,162,76,0.06);
    transform: translateX(2px);
}
.cr-coin-left { color: #a89f83; font-weight: 600; font-size: 11px; }
.cr-coin-left.gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}
.cr-coin-price { color: #f5f0dc; font-weight: 600; }
.cr-coin-change.up   { color: #34d399; font-weight: 700; }
.cr-coin-change.down { color: #f87171; font-weight: 700; }
.cr-loading { color: #a89f83; }

/* --- بج قیمت داخل نوار سخن روز (ETH و ...) هم زیباتر --- */
.qotd-bar { border-bottom: 1px solid rgba(201,162,76,0.35); }
.qotd-label { text-shadow: 0 0 20px var(--gold-glow); }

/* =====================================================================
 *  تک‌مقاله: خوانایی حرفه‌ای و تایپوگرافی مطلوب
 * ===================================================================== */
.cr-full-featured-image {
    max-width: 100%;
    margin: 20px 0 24px 0;
}
.cr-full-featured-image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform .5s var(--ease-out);
}
.cr-full-featured-image:hover img {
    transform: scale(1.01);
    box-shadow: var(--shadow-lg);
}
.cr-full-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    line-height: 1.65 !important;
    letter-spacing: -0.4px;
    background: linear-gradient(180deg, var(--text-strong), #3a3a3f);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 18px !important;
}
.cr-full-content {
    font-size: 15.5px;
    line-height: 2.1;
    color: #2a2b30;
    max-width: 68ch;
}
.cr-full-content p { margin: 0 0 18px 0; }
.cr-full-content h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-strong);
    margin: 32px 0 12px 0;
    padding-right: 12px;
    border-right: 4px solid var(--primary-gold);
    line-height: 1.5;
}
.cr-full-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 26px 0 10px 0;
}
.cr-full-content a {
    color: var(--gold-deep);
    text-decoration: none;
    border-bottom: 1px dashed rgba(201,162,76,0.4);
    transition: color .2s, border-color .2s;
}
.cr-full-content a:hover {
    color: var(--gold-bright);
    border-bottom-color: var(--gold-bright);
}
.cr-full-content blockquote {
    background: linear-gradient(90deg, var(--gold-tint), transparent);
    border-right: 4px solid var(--primary-gold);
    padding: 14px 18px;
    margin: 22px 0;
    border-radius: var(--radius-sm);
    color: var(--text-strong);
    font-style: normal;
    font-weight: 500;
}
.cr-full-content ul,
.cr-full-content ol {
    padding-right: 22px;
    margin: 0 0 18px 0;
}
.cr-full-content li { margin-bottom: 8px; }
.cr-full-content img { box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); }
.cr-full-content code {
    background: #f5f0e2;
    color: var(--gold-deep);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* --- اشتراک‌گذاری: کمی صیقلی --- */
.share-icon {
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.share-icon:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: var(--shadow-md);
}

/* --- ادامه مطلب دکمه --- */
.cr-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold-deep) !important;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--gold-tint);
    transition: all .25s var(--ease-out);
}
.cr-read-more:hover {
    background: var(--gold-gradient);
    color: #ffffff !important;
    box-shadow: 0 4px 12px var(--gold-glow);
    transform: translateX(-3px);
}

/* --- پربازدیدترین‌ها: کارت‌های ظریف --- */
.cr-trending-item {
    padding: 10px;
    border-radius: var(--radius-md);
    transition: background .25s var(--ease-out), transform .2s var(--ease-out);
}
.cr-trending-item:hover {
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.cr-trending-thumb {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* --- نوار سخن روز (QOTD): درخشش طلایی --- */
.qotd-bar { background: linear-gradient(180deg, #0d0c0a 0%, #050505 100%); }
.qotd-label { color: var(--gold-bright); }
.qotd-label::before { background: var(--gold-bright); box-shadow: 0 0 10px var(--gold-glow); }
.qotd-icon { color: var(--gold-bright); }
.qotd-date i { color: var(--gold-bright); }

/* --- هدر تیره (سایر صفحات) --- */
.cr-site-header { border-bottom: 1px solid rgba(201,162,76,0.28); }
.cr-header-btn {
    background: var(--gold-gradient);
    color: #0a0a0a;
    box-shadow: 0 4px 12px var(--gold-glow);
    transition: all .25s var(--ease-out);
}
.cr-header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--gold-glow);
    opacity: 1;
}

/* --- تایپوگرافی متون داخل پیش‌نمایش (نسخه چکیده) --- */
.cr-preview-inner .hd-excerpt {
    font-size: 15.5px;
    line-height: 2;
    color: #3a3b40;
}

/* --- انتقال ظرف‌بندی و ورودی --- */
@keyframes crFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cr-post-item { animation: crFadeUp .35s var(--ease-out) both; }
.cr-post-item:nth-child(1) { animation-delay: 0ms; }
.cr-post-item:nth-child(2) { animation-delay: 30ms; }
.cr-post-item:nth-child(3) { animation-delay: 60ms; }
.cr-post-item:nth-child(4) { animation-delay: 90ms; }
.cr-post-item:nth-child(5) { animation-delay: 120ms; }
.cr-post-item:nth-child(n+6) { animation-delay: 150ms; }

/* --- محتوای پیش‌نمایش هم با ورودی نرم --- */
.cr-preview-inner > * { animation: crFadeUp .4s var(--ease-out) both; }
.cr-preview-inner > *:nth-child(2) { animation-delay: 60ms; }
.cr-preview-inner > *:nth-child(3) { animation-delay: 120ms; }
.cr-preview-inner > *:nth-child(4) { animation-delay: 180ms; }

/* --- Focus states دسترس‌پذیر --- */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
    border-radius: 6px;
}

/* --- Selection --- */
::selection {
    background: var(--gold-tint);
    color: var(--gold-deep);
}

/* --- ریسپانسیو ارتقای موبایل --- */
@media (max-width: 900px) {
    .cr-post-item { padding: 14px 15px 28px 15px; }
    .cr-post-title { font-size: 14px; line-height: 1.7; }
    .cr-preview-column,
    .cr-mobile-only-article { padding: 20px 16px; }
    .cr-full-title { font-size: 22px !important; }
    .cr-full-content { font-size: 15px; line-height: 2; }
    .hd-reaction-bar .cr-reaction { min-width: 78px; }
}

/* =====================================================================
 *  پایان بخش ارتقای v1.18
 * ===================================================================== */