/*
 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.13.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-submenu {
    display: none;
    list-style: none;
    padding-right: 40px;
    background: #fafafa;
}
.cr-submenu li a {
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-muted);
}

/* --- ستون لیست مطالب (وسط راست) --- */
.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-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-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%;
    }
}