.emoji-store {
	max-width: 1000px;
	margin: 1rem auto;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	border-radius: var(--border-radius);
	padding: 40px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);

	/* Entrance animation for the entire store */
	/* opacity: 1;
	transform: translateY(30px) scale(0.95);
	animation: store-entrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; */
}

@keyframes store-entrance {
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.store-header {
	text-align: center;
	margin-bottom: 20px;

	/* Header entrance animation */
	opacity: 0;
	transform: translateY(-20px);
	animation: header-entrance 0.2s ease-out 0.2s forwards;
}

@keyframes header-entrance {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.store-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: white;
	margin-bottom: 12px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.store-subtitle {
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.8);
	padding: 0 2rem;
	font-weight: 400;
	margin-bottom: 15px;
}

/* Category Sections */
.category-section {
	margin-bottom: 50px;

	/* Category entrance animation */
	opacity: 0;
	transform: translateY(20px);
	animation: category-entrance 0.4s ease-out forwards;
}

.category-section:nth-child(1) {
	animation-delay: 0.4s;
}
.category-section:nth-child(2) {
	animation-delay: 0.5s;
}
.category-section:nth-child(3) {
	animation-delay: 0.6s;
}
.category-section:nth-child(4) {
	animation-delay: 0.7s;
}
.category-section:nth-child(5) {
	animation-delay: 0.8s;
}
.category-section:nth-child(6) {
	animation-delay: 0.9s;
}
.category-section:nth-child(7) {
	animation-delay: 1s;
}
.category-section:nth-child(8) {
	animation-delay: 1.1s;
}
.category-section:nth-child(9) {
	animation-delay: 1.2s;
}
.category-section:nth-child(10) {
	animation-delay: 1.3s;
}

@keyframes category-entrance {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.category-section:last-child {
	margin-bottom: 0;
}

.category-header {
	display: flex;
	align-items: center;
	margin-bottom: 25px;
	padding-bottom: 15px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.category-icon {
	font-size: 2rem;
	margin-right: 15px;

	/* Icon entrance animation */
	opacity: 0;
	transform: scale(0) rotate(-180deg);
	animation: icon-entrance 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
	animation-delay: inherit;
}

@keyframes icon-entrance {
	to {
		opacity: 1;
		transform: scale(1) rotate(0deg);
	}
}

.category-title {
	font-size: 1.8rem;
	font-weight: 600;
	color: white;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	margin: 0;
	margin-inline-end: 10px;
}

.category-count {
	margin-inline-start: auto;
	background: rgba(255, 255, 255, 0.2);
	color: white;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 0.9rem;
	font-weight: 500;

	/* Count badge entrance animation */
	opacity: 0;
	transform: translateX(20px) scale(0.8);
	animation: count-entrance 0.4s ease-out forwards;
	animation-delay: calc(var(--category-delay, 0s) + 0.2s);
}

@keyframes count-entrance {
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 20px;
}

/* Store Items Container (for backward compatibility) */
.store-items {
	display: block;
}

/* Emoji Cards */
.emoji-card {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border-radius: 16px;
	padding: 20px;
	text-align: center;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	position: relative;
	overflow: hidden;

	/* Set final state directly */
	opacity: 1;
	transform: translateY(0) scale(1);

	/* Card entrance animation - remove forwards fill-mode */
	animation: card-entrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes card-entrance {
	from {
		opacity: 0;
		transform: translateY(30px) scale(0.9);
	}
	to {
		opacity: var(--final-opacity, 1);
		transform: translateY(0) scale(1);
	}
}

@keyframes card-entrance-unavailable {
	to {
		opacity: 0.6;
		transform: translateY(0) scale(1);
	}
}

.emoji-card:hover {
	transform: scale(1.025) !important;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s ease;
}

.emoji-card.owned {
	background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
	border-color: #4caf50;
}

.emoji-card.active {
	background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%);
	border-color: #ff9800;
	box-shadow: 0 0 30px rgba(255, 152, 0, 0.3);
}

.emoji-display {
	font-size: 4rem;
	margin-top: 10px;
	margin-bottom: 12px;
	display: block;
	transition: transform 0.3s ease;
	user-select: none;

	/* Set final state directly instead of relying on animation forwards */
	opacity: 1;
	transform: scale(1) rotate(0deg);

	/* Emoji entrance animation - remove forwards fill-mode */
	animation: emoji-entrance 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	animation-delay: calc(var(--card-delay, 0s) + 0.1s);
}

@keyframes emoji-entrance {
	from {
		opacity: 0;
		transform: scale(0) rotate(180deg);
	}
	to {
		opacity: 1;
		transform: scale(1) rotate(0deg);
	}
}
.emoji-card:hover .emoji-display {
	transform: scale(1.1) rotate(5deg);
	transition: transform 0.2s ease;
}

.emoji-name {
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 10px;
}

.emoji-price {
	font-size: 1.2rem;
	font-weight: bold;
	color: #6c5ce7;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.coin-icon {
	width: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.processing {
	opacity: 0.5;
	pointer-events: none;
}

.purchase-btn {
	background: #6c5ce7;
	color: white;
	border: none;
	border-radius: 8px;
	padding: 12px 20px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
	position: relative;
	overflow: hidden;
}

.purchase-btn:hover {
	background: #5a4fcf;
}

.use-btn {
	background: #00b894;
}

.use-btn:hover {
	background: #00a085;
}

.active-btn {
	background: #fdcb6e;
	cursor: default;
}

.active-btn:hover {
	background: #fdcb6e;
	transform: none;
}

.emoji-card.unavailable {
	--final-opacity: 0.6;
	opacity: 0.6;
	pointer-events: none;
}

.unavailable-btn {
	background-color: #ccc !important;
	color: #666 !important;
	cursor: not-allowed !important;
}

.status-badge.unavailable {
	background-color: #f44336;
	color: white;
}

/* Status Badge */
.status-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 0.7rem;
	font-weight: 600;
	opacity: 0;
	user-select: none;
	transform: translateX(20px);
	transition: all 0.3s ease;
	z-index: 3;
}

.status-badge.owned {
	background: #4caf50;
	color: white;
	opacity: 1;
	transform: translateX(0);
}

.status-badge.active {
	background: #ff9800;
	color: white;
	opacity: 1;
	transform: translateX(0);
}

/* Rarity Tags */
.rarity-tag {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 8px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	z-index: 2;
	user-select: none;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

	/* Rarity tag entrance animation */
	opacity: 0;
	transform: translateX(-20px) scale(0.8);
	animation: rarity-entrance 0.4s ease-out forwards;
	animation-delay: calc(var(--card-delay, 0s) + 0.2s);
}

@keyframes rarity-entrance {
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

.rarity-common {
	background: #95a5a6;
	color: white;
}

.rarity-rare {
	background: #3498db;
	color: white;
}

.rarity-epic {
	background: #9b59b6;
	color: white;
}

.rarity-legendary {
	background: linear-gradient(135deg, #f39c12, #e67e22);
	color: white;
}

/* Animations */
.ripple {
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.6);
	transform: scale(0);
	animation: ripple-animation 0.6s linear;
	pointer-events: none;
}

@keyframes ripple-animation {
	to {
		transform: scale(4);
		opacity: 0;
	}
}

.purchase-animation {
	animation: purchase-success 0.6s ease;
}

@keyframes purchase-success {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
	}
}

/* Utility class to reset animations for dynamic content */
.no-animate,
.no-animate * {
	animation: none !important;
	opacity: 1 !important;
	transform: none !important;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	.emoji-store,
	.store-header,
	.category-section,
	.emoji-card,
	.emoji-display,
	.category-icon,
	.category-count,
	.progress-section,
	.progress-bar {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.rarity-tag {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

.progress-section {
	max-width: 400px;
	margin: 0 auto;
	padding: 20px;

	/* Progress section entrance animation */
	opacity: 0;
	transform: translateY(15px) scale(0.95);
	animation: progress-entrance 0.4s ease-out 0.3s forwards;
}

@keyframes progress-entrance {
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.progress-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: white;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.progress-stats {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.progress-count {
	font-size: 1.1rem;
	font-weight: 700;
	color: white;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.progress-percentage {
	font-size: 1.1rem;
	font-weight: 700;
	color: white;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.progress-bar-container {
	width: 100%;
	height: 12px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	overflow: hidden;
	position: relative;
}

.progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
	border-radius: 6px;
	position: relative;
	overflow: hidden;

	/* Start with 0 width */
	width: 0%;

	/* Smooth transition when width changes */
	transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar::after {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	animation: progress-shine 2s ease-in-out infinite;
	animation-delay: 1s;
}

@keyframes progress-shine {
	0% {
		left: -100%;
	}
	50%,
	100% {
		left: 100%;
	}
}

/* Responsive Design */
@media (max-width: 768px) {
	.emoji-store {
		padding: 24px;
		margin: 10px;
	}

	.store-header {
		margin-bottom: 14px;
	}

	.store-title {
		font-size: 2rem;
	}

	.store-subtitle {
		font-size: 1rem;
	}

	.category-section {
		margin-bottom: 35px;
	}

	.category-header {
		margin-bottom: 20px;
		padding-bottom: 12px;
	}

	.category-title {
		font-size: 1.4rem;
	}

	.category-icon {
		font-size: 1.5rem;
		margin-right: 10px;
	}

	.category-count {
		font-size: 0.8rem;
		padding: 4px 8px;
	}

	.category-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.emoji-card {
		padding: 15px;
		border-radius: 12px;
	}

	.emoji-display {
		font-size: 3.5rem;
		margin-bottom: 8px;
	}

	.emoji-name {
		font-size: 0.85rem;
		margin-bottom: 8px;
	}

	.emoji-price {
		font-size: 1rem;
		margin-bottom: 12px;
	}

	.coin-icon {
		width: 16px;
	}

	.purchase-btn {
		padding: 10px 16px;
		font-size: 0.8rem;
	}

	.status-badge {
		top: 8px;
		right: 8px;
		padding: 3px 6px;
		font-size: 0.6rem;
	}

	.rarity-tag {
		top: 8px;
		left: 8px;
		padding: 2px 6px;
		font-size: 0.5rem;
	}

	.progress-section {
		max-width: none;
		margin: 0;
		padding: 16px;
	}

	.progress-title {
		font-size: 1rem;
	}

	.progress-stats {
		margin-bottom: 10px;
	}

	.progress-count {
		font-size: 1rem;
	}

	.progress-percentage {
		font-size: 1rem;
	}

	.progress-bar-container {
		height: 10px;
	}
}

/* For very small screens (phones in portrait) */
@media (max-width: 480px) {
	.emoji-store {
		padding: 10px;
		margin: 6px;
	}

	.store-header {
		margin-bottom: 10px;
	}

	.store-subtitle {
		display: none;
	}

	.store-title {
		margin-bottom: 6px;
	}

	.category-section {
		margin-bottom: 25px;
	}

	.category-header {
		margin-bottom: 15px;
		padding-bottom: 8px;
	}

	.category-grid {
		gap: 10px;
	}

	.emoji-card {
		padding: 12px;
	}

	.emoji-display {
		font-size: 3rem;
	}

	.emoji-name {
		font-size: 0.8rem;
	}

	.emoji-price {
		font-size: 0.9rem;
	}

	.purchase-btn {
		padding: 8px 12px;
		font-size: 0.75rem;
	}

	.progress-section {
		padding: 12px;
	}

	.progress-title {
		font-size: 0.9rem;
	}

	.progress-stats {
		margin-bottom: 8px;
	}

	.progress-count {
		font-size: 0.9rem;
	}

	.progress-percentage {
		font-size: 0.9rem;
	}

	.progress-bar-container {
		height: 8px;
	}
}
