@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
	--bg-primary: #0d1117;
	--bg-secondary: #161b22;
	--bg-card: #1c2128;
	--bg-card-hover: #21262d;
	--border-color: #30363d;
	--accent: #f97316;
	--accent-hover: #ea580c;
	--accent-glow: rgba(249, 115, 22, 0.15);
	--text-primary: #e6edf3;
	--text-secondary: #8b949e;
	--text-muted: #6e7681;
	--success: #238636;
	--danger: #da3633;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	background: var(--bg-primary);
	color: var(--text-primary);
	min-height: 100vh;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* ========== AUTH SCREEN ========== */
.auth-screen {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 2rem;
	background: radial-gradient(ellipse at top, #1a2332 0%, var(--bg-primary) 60%);
}

.auth-box {
	text-align: center;
	max-width: 420px;
	width: 100%;
	animation: fadeInUp 0.6s ease-out;
}

.auth-logo {
	width: 80px;
	height: 80px;
	margin: 0 auto 1.5rem;
	background: linear-gradient(135deg, var(--accent), #fb923c);
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	box-shadow: 0 8px 32px rgba(249, 115, 22, 0.3);
}

.auth-box h1 {
	font-size: 2rem;
	font-weight: 800;
	margin-bottom: 0.5rem;
	letter-spacing: -0.02em;
}

.auth-subtitle {
	color: var(--text-secondary);
	font-size: 1rem;
	margin-bottom: 2rem;
}

.steam-btn-wrap {
	display: flex;
	justify-content: center;
}

.steam-btn-wrap img {
	border-radius: var(--radius-sm) !important;
	transition: transform 0.2s, box-shadow 0.2s !important;
}

.steam-btn-wrap img:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

/* ========== TOPBAR ========== */
.topbar {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 2rem;
	background: rgba(13, 17, 23, 0.85);
	backdrop-filter: blur(20px);
	border-bottom: 1px solid var(--border-color);
}

.topbar-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--text-primary);
}

.topbar-brand svg {
	color: var(--accent);
}

.btn-logout {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	color: var(--text-secondary);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s;
}

.btn-logout:hover {
	background: var(--danger);
	border-color: var(--danger);
	color: white;
}

/* ========== MAIN CONTENT ========== */
.main-content {
	padding: 2rem;
	max-width: 1600px;
	margin: 0 auto;
}

/* ========== KNIFE SECTION ========== */
.knife-section {
	margin-bottom: 2.5rem;
}

.knife-card {
	display: flex;
	align-items: center;
	gap: 2rem;
	background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	padding: 2rem;
	box-shadow: var(--shadow);
	position: relative;
	overflow: hidden;
}

.knife-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--accent), #fb923c);
}

.knife-image-wrap {
	position: relative;
	width: 200px;
	height: 200px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.knife-image-wrap img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.knife-card:hover .knife-image-wrap img {
	transform: scale(1.08) rotate(-3deg);
}

.knife-glow {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
	pointer-events: none;
}

.knife-info {
	flex: 1;
}

.knife-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--accent);
	margin-bottom: 0.25rem;
}

.knife-name {
	font-size: 1.75rem;
	font-weight: 800;
	margin-bottom: 1.25rem;
	letter-spacing: -0.02em;
}

.knife-form .form-select {
	max-width: 320px;
}

/* ========== WEAPONS GRID ========== */
.weapons-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
}

.weapon-card {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.weapon-card:hover {
	transform: translateY(-4px);
	border-color: var(--accent);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(249, 115, 22, 0.1);
}

.weapon-card.has-skin {
	border-color: rgba(249, 115, 22, 0.3);
}

.weapon-card.has-skin:hover {
	border-color: var(--accent);
}

.weapon-image-wrap {
	position: relative;
	height: 160px;
	background: linear-gradient(180deg, rgba(249,115,22,0.03) 0%, transparent 60%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.weapon-image-wrap img {
	max-width: 85%;
	max-height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
	transition: transform 0.3s ease;
}

.weapon-card:hover .weapon-image-wrap img {
	transform: scale(1.05);
}

.weapon-info {
	padding: 1rem 1.25rem 1.25rem;
}

.weapon-name {
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--text-primary);
}

.weapon-form {
	margin-bottom: 0.75rem;
}

.weapon-form .form-select,
.knife-form .form-select {
	background-color: var(--bg-secondary);
	border: 1px solid var(--border-color);
	color: var(--text-primary);
	font-size: 0.875rem;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
}

.weapon-form .form-select:hover,
.knife-form .form-select:hover {
	border-color: var(--accent);
}

.weapon-form .form-select:focus,
.knife-form .form-select:focus {
	background-color: var(--bg-secondary);
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-glow);
	color: var(--text-primary);
}

.btn-settings {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.6rem 1rem;
	background: var(--bg-secondary);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	color: var(--text-secondary);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-settings:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: white;
}

.btn-settings.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-settings.disabled:hover {
	background: var(--bg-secondary);
	border-color: var(--border-color);
	color: var(--text-secondary);
}

/* ========== MODAL ========== */
.modal-content {
	background: var(--bg-secondary);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}

.modal-header {
	border-bottom: 1px solid var(--border-color);
	padding: 1.25rem 1.5rem;
}

.modal-title {
	font-weight: 700;
	font-size: 1.1rem;
}

.modal-body {
	padding: 1.5rem;
}

.modal-footer {
	border-top: 1px solid var(--border-color);
	padding: 1rem 1.5rem;
}

.modal-footer .btn-secondary {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	color: var(--text-secondary);
}

.modal-footer .btn-secondary:hover {
	background: var(--border-color);
	color: var(--text-primary);
}

.modal-footer .btn-primary {
	background: var(--accent);
	border: 1px solid var(--accent);
	font-weight: 600;
}

.modal-footer .btn-primary:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
}

.btn-close {
	filter: invert(1);
	opacity: 0.5;
}

.btn-close:hover {
	opacity: 1;
}

.form-label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-secondary);
	margin-bottom: 0.5rem;
}

.form-control,
.form-select {
	background-color: var(--bg-primary);
	border: 1px solid var(--border-color);
	color: var(--text-primary);
	border-radius: 8px;
	padding: 0.6rem 0.875rem;
	font-size: 0.9375rem;
}

.form-control:focus,
.form-select:focus {
	background-color: var(--bg-primary);
	border-color: var(--accent);
	color: var(--text-primary);
	box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.weapon-card {
	animation: fadeInUp 0.4s ease-out backwards;
}

.weapon-card:nth-child(1) { animation-delay: 0.02s; }
.weapon-card:nth-child(2) { animation-delay: 0.04s; }
.weapon-card:nth-child(3) { animation-delay: 0.06s; }
.weapon-card:nth-child(4) { animation-delay: 0.08s; }
.weapon-card:nth-child(5) { animation-delay: 0.10s; }
.weapon-card:nth-child(6) { animation-delay: 0.12s; }
.weapon-card:nth-child(7) { animation-delay: 0.14s; }
.weapon-card:nth-child(8) { animation-delay: 0.16s; }
.weapon-card:nth-child(9) { animation-delay: 0.18s; }
.weapon-card:nth-child(10) { animation-delay: 0.20s; }
.weapon-card:nth-child(n+11) { animation-delay: 0.22s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
	.knife-card {
		flex-direction: column;
		text-align: center;
		gap: 1.5rem;
	}

	.knife-image-wrap {
		width: 160px;
		height: 160px;
	}

	.knife-form .form-select {
		margin: 0 auto;
	}

	.weapons-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 1rem;
	}

	.main-content {
		padding: 1rem;
	}

	.topbar {
		padding: 0.875rem 1rem;
	}
}

@media (max-width: 480px) {
	.weapons-grid {
		grid-template-columns: 1fr 1fr;
	}

	.weapon-image-wrap {
		height: 120px;
	}
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
	background: var(--border-color);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #484f58;
}
