@import "fonts.css";
@import "anims.css";

:root {
	--primary: #ff6ec7;
	--secondary: #8c52ff;
	--accent: #00d4d4;
	--dark: #17081f;
	--darker: #0a010f;
	--light: #f8f0ff;
	--gradient: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
	--card-gradient: linear-gradient(45deg, rgba(255, 110, 199, 0.7), rgba(140, 82, 255, 0.7));
	--hover-gradient: linear-gradient(45deg, rgba(140, 82, 255, 0.8), rgba(0, 212, 212, 0.8));
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Poppins", sans-serif;
}

body {
	background-color: var(--darker);
	background-image: radial-gradient(circle at 25% 25%, rgba(255, 110, 199, 0.05) 0%, transparent 40%), radial-gradient(circle at 75% 75%, rgba(140, 82, 255, 0.05) 0%, transparent 40%), radial-gradient(circle at 50% 50%, rgba(0, 212, 212, 0.05) 0%, transparent 60%);
	color: var(--light);
	min-height: 100vh;
	overflow-x: hidden;
	position: relative;
}

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 25px;
	margin-bottom: 40px;
	background: rgba(26, 6, 41, 0.6);
	backdrop-filter: blur(10px);
	border-radius: 15px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
	position: sticky;
	top: 20px;
	z-index: 10;
	border-left: 3px solid var(--primary);
}

.logo-container {
	display: flex;
	align-items: center;
	gap: 15px;
}

.logo {
	font-size: 1.5rem;
	font-weight: 700;
	background: var(--gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.back-button {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: rgba(140, 82, 255, 0.2);
	border: 1px solid rgba(140, 82, 255, 0.3);
	border-radius: 30px;
	color: white;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
	transition: all 0.3s ease;
}

.back-button:hover {
	background: rgba(140, 82, 255, 0.3);
	transform: translateX(-5px);
}

.page-header {
	text-align: center;
	margin-bottom: 40px;
	position: relative;
}

.page-title {
	font-size: 2.8rem;
	margin-bottom: 15px;
	background: var(--gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	position: relative;
	display: inline-block;
}

.page-title::after {
	content: "";
	position: absolute;
	bottom: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 100px;
	height: 4px;
	background: var(--accent);
	border-radius: 2px;
}

.page-subtitle {
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.8);
	font-size: 1.1rem;
}

.search-container {
	margin: 0 auto 30px;
	width: 100%;
	max-width: 600px;
	position: relative;
}

.search-input {
	width: 100%;
	padding: 15px 20px 15px 50px;
	background: rgba(26, 6, 41, 0.6);
	border: 1px solid rgba(140, 82, 255, 0.3);
	border-radius: 30px;
	color: white;
	font-size: 1rem;
	transition: all 0.3s ease;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 5px 25px rgba(0, 212, 212, 0.2);
}

.search-icon {
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--primary);
	font-size: 1.2rem;
}

.categories {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.category-button {
	padding: 8px 18px;
	background: rgba(26, 6, 41, 0.6);
	border: 1px solid rgba(140, 82, 255, 0.3);
	border-radius: 20px;
	color: white;
	font-size: 0.9rem;
	cursor: pointer;
	transition: all 0.3s ease;
}

.category-button:hover,
.category-button.active {
	background: var(--gradient);
	border-color: transparent;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(140, 82, 255, 0.3);
}

.items-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
	position: relative;
	z-index: 1;
}

.item-card {
	background: rgba(26, 6, 41, 0.6);
	backdrop-filter: blur(5px);
	border-radius: 15px;
	overflow: hidden;
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(140, 82, 255, 0.15);
	display: flex;
	flex-direction: column;
	height: 220px;
	justify-content: center;
	align-items: center;
}

.item-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(140, 82, 255, 0.2);
	border-color: rgba(140, 82, 255, 0.3);
}

.item-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--card-gradient);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: -1;
	border-radius: 15px;
}

.item-card:hover::before {
	opacity: 0.1;
}

.item-image {
	height: 120px;
	width: 100%;
	object-fit: cover;
	border-bottom: 2px solid rgba(0, 212, 212, 0.3);
}

.item-content {
	padding: 15px;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.item-name {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 10px;
	color: var(--primary);
	word-break: break-all;
}

.item-info {
	display: flex;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.7);
	margin-top: auto;
	justify-content: center;
	align-items: center;
}

.current-price {
	font-weight: 600;
	color: var(--accent);
	font-size: 150%;
}

.price-trend {
	display: flex;
	align-items: center;
	gap: 4px;
}

.trend-up {
	color: #2ecc71;
}

.trend-down {
	color: #e74c3c;
}

.trend-stable {
	color: #f39c12;
}

.view-more {
	text-align: center;
	margin: 20px 0 40px;
}

.more-button {
	background: var(--gradient);
	color: white;
	border: none;
	padding: 12px 30px;
	border-radius: 30px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 5px 15px rgba(140, 82, 255, 0.3);
}

.more-button:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(140, 82, 255, 0.4);
}

#sort {
	width: 100%;
	padding: 15px 20px;
	background: rgba(26, 6, 41, 0.6);
	border: 1px solid rgba(140, 82, 255, 0.3);
	border-radius: 30px;
	color: white;
	font-size: 1rem;
	transition: all 0.3s ease;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300d4d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
}

#sort::after {
	content: "";
	width: 10px;
	height: 10px;
	border-right: 2px solid #00d4d4;
	border-bottom: 2px solid #00d4d4;
	transform: rotate(45deg);
	transition: all 0.3s ease;
}
#sort:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 5px 25px rgba(0, 212, 212, 0.2);
}

.footer {
	margin-top: auto;
	padding: 30px 0;
	text-align: center;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.footer-logo {
	font-size: 1.5rem;
	font-weight: 700;
	background: var(--gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.footer-links {
	display: flex;
	gap: 20px;
}

.footer-link {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	transition: color 0.3s ease;
}

.footer-link:hover {
	color: var(--accent);
}

.footer-social {
	display: flex;
	gap: 15px;
}

.social-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(26, 6, 41, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	text-decoration: none;
	transition: all 0.3s ease;
	border: 1px solid rgba(140, 82, 255, 0.2);
}

.social-icon:hover {
	background: var(--gradient);
	transform: translateY(-3px);
	border-color: transparent;
}

.copyright {
	margin-top: 30px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.9rem;
}

.close {
	position: fixed;
	top: 30px;
	right: 30px;
	background-color: #e74c3c;
	padding: 10px;
}
.close:hover {
	cursor: pointer;
	animation: redflash 2s infinite linear;
}

@keyframes redflesh {
	0% {
		color: #e74c3c;
	}
	50% {
		color: white;
	}
	100% {
		color: #e74c3c;
	}
}
/* Popup Styles */
#popup {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	box-sizing: border-box;
	padding: 0;
	backdrop-filter: blur(15px);
	background: rgba(19, 2, 28, 0.9);
	transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
	opacity: 0;
	pointer-events: none;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
}

#popup.active {
	opacity: 1;
	pointer-events: auto;
}

.popup-container {
	width: 100%;
	max-width: 900px;
	height: 90%;
	max-height: 700px;
	background: rgba(42, 14, 56, 0.95);
	border-radius: 20px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(140, 82, 255, 0.2);
	display: flex;
	flex-direction: column;
}

.popup-header {
	padding: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	background: rgba(19, 2, 28, 0.5);
}

.popup-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--accent);
}

.close-button {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 110, 199, 0.15);
	border: none;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	color: white;
	font-size: 1.2rem;
	transition: all 0.3s ease;
}

.close-button:hover {
	background: var(--primary);
	transform: rotate(90deg);
}

.popup-content {
	flex: 1;
	overflow: hidden;
}

#popup > iframe {
	width: 100%;
	height: 100%;
	border: none;
	overflow: hidden;
}

#item-image {
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	width: 50%;
}

@media screen and (max-width: 768px) {
	.top-bar {
		flex-direction: column;
		gap: 15px;
		padding: 15px;
		position: relative;
		top: 0;
		margin-bottom: 20px;
	}

	.page-title {
		font-size: 2rem;
	}

	.items-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 15px;
	}

	.item-card {
		height: 200px;
	}

	.item-image {
		height: 100px;
	}

	.footer-content {
		flex-direction: column;
		text-align: center;
	}

	.footer-links,
	.footer-social {
		justify-content: center;
	}

	.popup-container {
		width: 95%;
		height: 80%;
	}
}
