/* ==================================================
   1. Fear & Greed Index Widget
   ================================================== */
.crypto-fng-widget {
	max-width: 300px;
	margin: 20px auto;
	padding: 20px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.05);
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	border: 1px solid #f0f0f0;
}

.crypto-fng-title {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 18px;
	color: #333;
	font-weight: 700;
}

.crypto-gauge {
	position: relative;
	width: 200px;
	height: 100px; /* half of the circle */
	overflow: hidden;
	margin: 0 auto 15px auto;
}

.crypto-gauge-bg {
	width: 200px;
	height: 200px;
	border-radius: 100px;
	/* Conic gradient for 0-180 degrees starting from left (270deg is 9 o clock) */
	background: conic-gradient(
		from 270deg,
		#ea3943 0deg, 
		#ea3943 45deg, 
		#f39c12 45deg, 
		#f39c12 90deg, 
		#f1c40f 90deg, 
		#f1c40f 135deg, 
		#16c784 135deg, 
		#16c784 180deg, 
		transparent 180deg
	);
	position: absolute;
	top: 0;
	left: 0;
}

/* Kim chỉ nam (Needle) */
.crypto-gauge-fill {
	position: absolute;
	bottom: -2px; 
	left: 100px; /* Ngay chính giữa */
	width: 80px; 
	height: 4px;
	background: #222;
	border-radius: 2px;
	transform-origin: left center;
	/* Kim chỉ xoay từ 180deg (0) đến 360deg (100) */
	transform: rotate(calc(180deg + var(--rotation, 0deg)));
	z-index: 2;
	transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s;
}

/* Nút che trục kim */
.crypto-gauge-cap {
	position: absolute;
	bottom: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 30px;
	height: 30px;
	background: #fff;
	border: 4px solid #222;
	border-radius: 50%;
	z-index: 3;
}

.crypto-fng-details {
	margin-top: 10px;
}

.crypto-fng-value {
	font-size: 28px;
	font-weight: 800;
	color: #111;
	line-height: 1.2;
}

.crypto-fng-class {
	font-size: 14px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 600;
	margin-top: 5px;
}


/* ==================================================
   2. Inline Coin Price
   ================================================== */
.crypto-inline-price {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	padding: 2px 8px;
	border-radius: 6px;
	font-family: inherit;
	font-weight: 600;
	white-space: nowrap;
}

.crypto-inline-price .crypto-val {
	color: #111;
}

.crypto-inline-price .crypto-change {
	font-size: 0.9em;
}

.crypto-inline-price .crypto-change.crypto-up {
	color: #16c784;
}

.crypto-inline-price .crypto-change.crypto-down {
	color: #ea3943;
}


/* ==================================================
   3. Bull / Bear Vote
   ================================================== */
.crypto-vote-container {
	margin: 40px 0;
	padding: 25px;
	background: #fafbfc;
	border: 1px solid #e1e4e8;
	border-radius: 12px;
	text-align: center;
}

.crypto-vote-title {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 20px;
	color: #24292e;
}

.crypto-vote-buttons {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-bottom: 20px;
}

.crypto-vote-buttons .btn-vote {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	color: #fff;
}

.crypto-vote-buttons .btn-vote:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.crypto-vote-buttons .btn-vote:active {
	transform: translateY(1px);
}

.bull-btn {
	background-color: #16c784;
}

.bear-btn {
	background-color: #ea3943;
}

.crypto-vote-results {
	max-width: 400px;
	margin: 0 auto;
	animation: fadeIn 0.5s ease-out forwards;
}

.vote-bar {
	display: flex;
	height: 12px;
	border-radius: 6px;
	overflow: hidden;
	background: #eee;
	margin-bottom: 10px;
}

.vote-bull-bar {
	background: #16c784;
	transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.vote-bear-bar {
	background: #ea3943;
	transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.vote-labels {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	font-weight: 600;
}

.bull-label { color: #16c784; }
.bear-label { color: #ea3943; }

.crypto-vote-message {
	margin-top: 15px;
	font-size: 14px;
	color: #555;
	font-style: italic;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}
