.gift-tgs {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-width: 24px;
	min-height: 24px;
	line-height: 0;
}

.gift-tgs > svg {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.gift-tgs:not(.is-ready)::before {
	position: absolute;
	inset: 22%;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 70%);
	animation: gift-tgs-wait 1.4s ease-in-out infinite;
	content: "";
}

.gift-tgs.is-broken::before {
	animation: none;
	opacity: .4;
}

@keyframes gift-tgs-wait {
	0%,
	100% {
		opacity: .35;
		transform: scale(.85);
	}

	50% {
		opacity: 1;
		transform: scale(1);
	}
}

.gift-media-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.gift-media-none {
	color: rgba(255, 255, 255, .2);
	font-size: 34px;
}

body.gift-lock {
	overflow: hidden;
}

.gift-widget {
	margin-bottom: 20px;
	padding: 14px 16px 18px;
	border: 1px solid #393946;
	border-radius: 18px;
	background: #2d2d37;
}

.gift-widget [hidden],
.gift-modal [hidden] {
	display: none !important;
}

.gift-widget-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 13px;
	padding-bottom: 11px;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.gift-widget-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

.gift-widget-title > i {
	color: #f5c518;
	font-size: 17px;
}

.gift-widget-count,
.gift-modal-head-count {
	padding: 1px 8px;
	border-radius: 999px;
	background: rgba(245, 197, 24, .12);
	color: #f5c518;
	font-size: 11px;
	font-weight: 700;
}

.gift-total {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 1px 8px;
	border: 1px solid rgba(46, 204, 113, .2);
	border-radius: 999px;
	background: rgba(46, 204, 113, .1);
	color: #4fea9f;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.gift-widget-head-right {
	display: flex;
	align-items: center;
	gap: 7px;
}

.gift-btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 34px;
	padding: 0 14px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(90deg, #f5c518, #d4920a);
	color: #1a1000;
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
	cursor: pointer;
	transition: opacity .15s, transform .15s;
}

.gift-btn-primary:hover {
	opacity: .9;
	transform: translateY(-1px);
}

.gift-btn-primary:disabled {
	opacity: .4;
	cursor: not-allowed;
	transform: none;
}

.gift-btn-sm {
	height: 28px;
	padding: 0 11px;
	font-size: 12px;
}

.gift-btn-all {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 28px;
	padding: 0 11px;
	border: 1px solid #393946;
	border-radius: 10px;
	background: rgba(255, 255, 255, .06);
	color: rgba(255, 255, 255, .6);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.gift-btn-all:hover {
	border-color: #f5c518;
	color: #fff;
}

.gift-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
}

.gift-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 18px;
	color: rgba(255, 255, 255, .3);
	font-size: 13px;
}

.gift-card {
	--gr: 79, 160, 255;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 0;
	cursor: pointer;
	transition: transform .18s;
}

.gift-card.rarity-rare,
.gift-option.rarity-rare,
.gift-preview-window.rarity-rare,
.gift-live-card--rare {
	--gr: 174, 104, 255;
}

.gift-card.rarity-epic,
.gift-option.rarity-epic,
.gift-preview-window.rarity-epic,
.gift-live-card--epic {
	--gr: 245, 197, 24;
}

.gift-card:hover {
	transform: translateY(-4px);
}

.gift-card-img-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 8%;
	overflow: hidden;
	border: 1px solid rgba(var(--gr), .35);
	border-radius: 14px;
	background: radial-gradient(70% 70% at 50% 45%, rgba(var(--gr), .25), rgba(var(--gr), 0) 72%), #1d1d25;
	transition: box-shadow .18s;
}

.gift-card:hover .gift-card-img-wrap {
	box-shadow: 0 6px 20px rgba(var(--gr), .35);
}

.gift-card-label {
	overflow: hidden;
	width: 100%;
	color: rgba(255, 255, 255, .75);
	font-size: 11.5px;
	font-weight: 700;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@keyframes gift-pop {
	0% {
		opacity: 0;
		transform: scale(.4) rotate(-8deg);
	}

	55% {
		opacity: 1;
		transform: scale(1.12) rotate(3deg);
	}

	100% {
		opacity: 1;
		transform: scale(1) rotate(0);
	}
}

.gift-card--new {
	animation: gift-pop .52s cubic-bezier(.34, 1.56, .64, 1) both;
}

.gift-modal,
.gift-preview {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.gift-modal.show,
.gift-preview.show {
	display: flex;
}

.gift-modal-bg,
.gift-preview-bg {
	position: absolute;
	inset: 0;
	background: rgba(6, 6, 10, .72);
	backdrop-filter: blur(4px);
}

.gift-modal-window,
.gift-preview-window {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 520px;
	max-width: 100%;
	max-height: calc(100vh - 40px);
	border: 1px solid #393946;
	border-radius: 20px;
	background: #24242d;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
	color: #fff;
	animation: gift-in .22s ease both;
}

@keyframes gift-in {
	from {
		opacity: 0;
		transform: translateY(14px) scale(.98);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.gift-modal-window--wide {
	width: 860px;
}

.gift-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
	font-size: 15px;
	font-weight: 800;
}

.gift-modal-head > span {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.gift-modal-head i.bxs-gift {
	color: #f5c518;
}

.gift-modal-close,
.gift-preview-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .06);
	color: rgba(255, 255, 255, .7);
	font-size: 22px;
	cursor: pointer;
}

.gift-modal-close:hover,
.gift-preview-close:hover {
	color: #fff;
}

.gift-modal-all-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 12px;
	padding: 18px 20px 22px;
	overflow: auto;
}

.gift-preview-window {
	align-items: center;
	width: 380px;
	padding: 26px 24px 22px;
	text-align: center;
}

.gift-preview-close {
	position: absolute;
	top: 12px;
	right: 12px;
}

.gift-preview-img-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 200px;
	height: 200px;
	margin-bottom: 12px;
	border-radius: 24px;
	background: radial-gradient(60% 60% at 50% 50%, rgba(var(--gr, 79, 160, 255), .35), rgba(var(--gr, 79, 160, 255), 0) 72%);
}

.gift-preview-rarity {
	padding: 3px 12px;
	border: 1px solid rgba(var(--gr, 79, 160, 255), .5);
	border-radius: 999px;
	color: rgb(var(--gr, 79, 160, 255));
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.gift-preview-name {
	margin: 10px 0 6px;
	font-size: 19px;
	font-weight: 800;
}

.gift-preview-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: rgba(255, 255, 255, .6);
	font-size: 13px;
	font-weight: 600;
}

.gift-preview-msg {
	margin-top: 6px;
	padding: 10px 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .05);
	color: #fff;
	font-style: italic;
}

.gift-preview-actions {
	width: 100%;
	margin-top: 14px;
}

.gift-preview-actions:empty {
	display: none;
}

.gift-btn-sell {
	width: 100%;
	height: 40px;
	border: 1px solid rgba(46, 204, 113, .35);
	border-radius: 12px;
	background: rgba(46, 204, 113, .12);
	color: #4fea9f;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}

.gift-btn-sell:disabled {
	opacity: .5;
	cursor: default;
}

.gift-send-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 14px 20px 0;
}

.gift-send-search {
	display: flex;
	flex: 1 1 220px;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 12px;
	background: #1b1b22;
	color: rgba(255, 255, 255, .45);
}

.gift-send-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: #fff;
	font-size: 13.5px;
}

.gift-send-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	border-radius: 12px;
	background: #1b1b22;
}

.gift-send-tabs button {
	height: 30px;
	padding: 0 12px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: rgba(255, 255, 255, .6);
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}

.gift-send-tabs button.is-on {
	background: #34343f;
	color: #f5c518;
}

.gift-send-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 10px;
	min-height: 160px;
	padding: 14px 20px;
	overflow: auto;
}

.gift-option {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 10px 8px;
	border: 1px solid rgba(var(--gr, 79, 160, 255), .25);
	border-radius: 14px;
	background: radial-gradient(70% 60% at 50% 35%, rgba(var(--gr, 79, 160, 255), .16), rgba(var(--gr, 79, 160, 255), 0) 72%), #1d1d25;
	color: #fff;
	cursor: pointer;
	transition: border-color .15s, transform .15s;
}

.gift-option:hover {
	transform: translateY(-2px);
}

.gift-option.active {
	border-color: rgb(var(--gr, 79, 160, 255));
	box-shadow: 0 0 0 1px rgb(var(--gr, 79, 160, 255)), 0 8px 24px rgba(var(--gr, 79, 160, 255), .25);
}

.gift-option-img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 78px;
}

.gift-option-name {
	overflow: hidden;
	width: 100%;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gift-option-price {
	color: #f5c518;
	font-size: 12px;
	font-weight: 800;
}

.gift-option-stock {
	position: absolute;
	top: 6px;
	right: 6px;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .45);
	color: rgba(255, 255, 255, .7);
	font-size: 10.5px;
	font-weight: 700;
}

.gift-option-disabled {
	opacity: .4;
	cursor: not-allowed;
}

.gift-option-sold {
	position: absolute;
	top: 6px;
	left: 6px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #e74c3c;
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
}

.gift-send-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 14px 20px 18px;
	border-top: 1px solid rgba(255, 255, 255, .07);
}

.gift-send-selected {
	display: flex;
	flex: 1 1 240px;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.gift-send-selected-hint {
	color: rgba(255, 255, 255, .4);
	font-size: 13px;
}

.gift-send-sel-img {
	display: flex;
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
}

.gift-send-sel-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.gift-send-sel-info b {
	font-size: 14px;
}

.gift-send-sel-info span {
	color: rgba(255, 255, 255, .55);
	font-size: 12px;
}

.gift-send-form {
	display: flex;
	flex: 1 1 360px;
	gap: 8px;
}

.gift-send-msg {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 12px;
	outline: 0;
	background: #1b1b22;
	color: #fff;
	font-size: 13.5px;
}

.gift-btn-send {
	height: 40px;
}

.pgx-gift__stage .gift-tgs,
.pgx-gift__stage .gift-media-img {
	width: 82%;
	height: 82%;
	transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.pgx-gift:hover .pgx-gift__stage .gift-tgs {
	transform: scale(1.07);
}

.pgx-gview__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 190px;
	height: 190px;
}

@media (max-width: 720px) {
	.gift-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.gift-modal,
	.gift-preview {
		align-items: flex-end;
		padding: 0;
	}

	.gift-modal-window,
	.gift-preview-window {
		width: 100%;
		max-height: 92vh;
		border-radius: 20px 20px 0 0;
	}

	.gift-send-grid {
		grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	}

	.gift-option-img {
		width: 64px;
		height: 64px;
	}
}
