.mcw-widget {
	--mcw-bg: #ffffff;
	--mcw-fg: #1a1d29;
	--mcw-muted: #6b7280;
	--mcw-border: #e5e7eb;
	--mcw-up: #16a34a;
	--mcw-down: #dc2626;
	--mcw-accent: #4f46e5;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: var(--mcw-bg);
	color: var(--mcw-fg);
	border: 1px solid var(--mcw-border);
	border-radius: 6px;
	padding: 16px;
	max-width: 720px;
	box-sizing: border-box;
}
.mcw-widget.mcw-fullwidth { max-width: 100%; }
.mcw-widget.mcw-rounded { border-radius: 16px; }
.mcw-widget.mcw-theme-dark {
	--mcw-bg: #14161f;
	--mcw-fg: #f3f4f6;
	--mcw-muted: #9ca3af;
	--mcw-border: #2a2d3a;
}
.mcw-widget * { box-sizing: border-box; }

/* Table */
.mcw-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mcw-table th { text-align: left; padding: 8px 10px; color: var(--mcw-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--mcw-border); }
.mcw-table td { padding: 10px; border-bottom: 1px solid var(--mcw-border); vertical-align: middle; }
.mcw-table tr:last-child td { border-bottom: none; }
.mcw-symbol { font-weight: 700; margin-right: 6px; }
.mcw-name { color: var(--mcw-muted); font-size: 13px; }
.mcw-col-name { display: flex; flex-direction: column; }

.mcw-change { font-weight: 600; font-size: 13px; white-space: nowrap; }
.mcw-up { color: var(--mcw-up); }
.mcw-down { color: var(--mcw-down); }
.mcw-flat { color: var(--mcw-muted); }

/* flash animation on price update */
.mcw-flash-up { animation: mcwFlashUp 900ms ease; }
.mcw-flash-down { animation: mcwFlashDown 900ms ease; }
@keyframes mcwFlashUp { 0% { background-color: rgba(22,163,74,.25); } 100% { background-color: transparent; } }
@keyframes mcwFlashDown { 0% { background-color: rgba(220,38,38,.25); } 100% { background-color: transparent; } }

/* Cards */
.mcw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.mcw-card { border: 1px solid var(--mcw-border); border-radius: 10px; padding: 14px; }
.mcw-card-head { display: flex; flex-direction: column; margin-bottom: 8px; }
.mcw-card-price { font-size: 20px; font-weight: 700; margin: 4px 0; }
.mcw-card-cap { font-size: 12px; color: var(--mcw-muted); margin-top: 6px; }

/* Ticker */
.mcw-ticker-track { overflow: hidden; white-space: nowrap; border: 1px solid var(--mcw-border); border-radius: 999px; padding: 10px 0; }
.mcw-ticker-inner { display: inline-block; animation: mcwScroll 30s linear infinite; }
.mcw-ticker-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 20px; font-size: 14px; }
@keyframes mcwScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.mcw-ticker-track:hover .mcw-ticker-inner { animation-play-state: paused; }

/* List */
.mcw-list { list-style: none; margin: 0; padding: 0; }
.mcw-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--mcw-border); font-size: 14px; }
.mcw-list li:last-child { border-bottom: none; }
.mcw-list .mcw-price { margin-left: auto; font-weight: 600; }

/* Chart */
.mcw-chart-wrap { width: 100%; }
.mcw-chart-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.mcw-chart-title { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.mcw-chart-title .mcw-price { font-weight: 700; }
.mcw-chart-ranges { display: flex; gap: 4px; }
.mcw-range-btn { border: 1px solid var(--mcw-border); background: transparent; color: var(--mcw-fg); padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.mcw-range-btn.active, .mcw-range-btn:hover { background: var(--mcw-accent); border-color: var(--mcw-accent); color: #fff; }
.mcw-chart-canvas { width: 100% !important; height: 280px !important; }

/* Converter */
.mcw-converter { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.mcw-converter-row { display: flex; gap: 8px; }
.mcw-converter-row input, .mcw-converter-row select, .mcw-conv-result { flex: 1; padding: 10px; border: 1px solid var(--mcw-border); border-radius: 8px; background: var(--mcw-bg); color: var(--mcw-fg); font-size: 14px; }
.mcw-conv-result { display: flex; align-items: center; font-weight: 700; }
.mcw-converter-equals { text-align: center; color: var(--mcw-muted); }

.mcw-admin-error {
	margin-top: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.5;
	background: #fff4e5; border: 1px solid #f0b849; color: #6b4a00; border-radius: 6px;
}
.mcw-widget.mcw-theme-dark .mcw-admin-error { background: #3a2c00; border-color: #6b4a00; color: #ffd889; }

/* Footer */
.mcw-updated-at { margin-top: 12px; font-size: 11px; color: var(--mcw-muted); display: flex; align-items: center; gap: 6px; }
.mcw-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mcw-muted); display: inline-block; }
.mcw-live-dot.mcw-live-on { background: var(--mcw-up); box-shadow: 0 0 0 rgba(22,163,74,.6); animation: mcwPulse 2s infinite; }
@keyframes mcwPulse {
	0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); }
	70% { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
	100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

@media (max-width: 480px) {
	.mcw-table { font-size: 12px; }
	.mcw-chart-title { font-size: 15px; }
}
