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

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	background-color: #f5f5f5;
	color: #333;
}

/* Login Page */
.login-container {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
	background: white;
	padding: 3rem;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
	text-align: center;
	max-width: 400px;
}

.login-box h1 {
	margin-bottom: 1rem;
	color: #333;
}

.login-box p {
	margin-bottom: 2rem;
	color: #666;
}

.github-login-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background-color: #24292e;
	color: white;
	padding: 0.75rem 1.5rem;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 600;
	transition: background-color 0.3s;
}

.github-login-btn:hover {
	background-color: #1b1f23;
}

/* Navbar */
.navbar {
	background-color: #667eea;
	color: white;
	padding: 1rem 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.nav-content h1 {
	font-size: 1.5rem;
}

.nav-right {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.username {
	font-size: 0.9rem;
}

.logout-btn {
	color: white;
	text-decoration: none;
	padding: 0.5rem 1rem;
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 5px;
	transition: background-color 0.3s;
}

.logout-btn:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

/* Container */
.container {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 0 2rem;
}

/* Add Item Section */
.add-item-section {
	background: white;
	padding: 2rem;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	margin-bottom: 2rem;
}

.add-item-section h2 {
	margin-bottom: 1.5rem;
	color: #333;
}

.form-group {
	margin-bottom: 1rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #555;
}

.form-group input {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 5px;
	font-size: 1rem;
}

.form-group input:focus {
	outline: none;
	border-color: #667eea;
}

.btn {
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 5px;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.3s;
}

.btn-primary {
	background-color: #667eea;
	color: white;
}

.btn-primary:hover {
	background-color: #5568d3;
}

.btn-small {
	padding: 0.4rem 0.6rem;
	font-size: 1.2rem;
	border-radius: 4px;
	margin: 0 0.2rem;
	min-width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.btn-refresh {
	background-color: #4299e1;
	color: white;
}

.btn-refresh:hover {
	background-color: #3182ce;
}

.btn-history {
	background-color: #48bb78;
	color: white;
}

.btn-history:hover {
	background-color: #38a169;
}

.btn-delete {
	background-color: #f56565;
	color: white;
}

.btn-delete:hover {
	background-color: #e53e3e;
}

.btn-danger {
	background-color: #f56565;
	color: white;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
}

.btn-danger:hover {
	background-color: #e53e3e;
}

.btn-secondary {
	background-color: #4299e1;
	color: white;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	margin-right: 0.5rem;
}

.btn-secondary:hover {
	background-color: #3182ce;
}

.action-buttons {
	white-space: nowrap;
}

/* Items Section */
.items-section {
	background: white;
	padding: 2rem;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.items-section h2 {
	margin-bottom: 1.5rem;
	color: #333;
}

.items-header {
	margin-bottom: 1rem;
	display: flex;
	justify-content: flex-end;
}

.form-hint {
	font-size: 0.9rem;
	color: #666;
	margin-top: -0.5rem;
	margin-bottom: 1rem;
}

.loading {
	text-align: center;
	padding: 2rem;
	color: #666;
}

.error-message {
	background-color: #fed7d7;
	color: #c53030;
	padding: 1rem;
	border-radius: 5px;
	margin-bottom: 1rem;
}

.no-items {
	text-align: center;
	padding: 3rem;
	color: #999;
	font-size: 1.1rem;
}

/* Table */
table {
	width: 100%;
	border-collapse: collapse;
}

thead {
	background-color: #f7fafc;
}

th {
	padding: 1rem;
	text-align: left;
	font-weight: 600;
	color: #555;
	border-bottom: 2px solid #e2e8f0;
}

td {
	padding: 1rem;
	border-bottom: 1px solid #e2e8f0;
}

.item-image {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 5px;
}

.item-title {
	font-weight: 600;
	color: #333;
}

.item-url {
	color: #667eea;
	text-decoration: none;
	font-size: 0.9rem;
	display: block;
	margin-top: 0.25rem;
}

.item-url:hover {
	text-decoration: underline;
}

.price {
	font-size: 1.2rem;
	font-weight: 700;
	color: #48bb78;
}

.price-reduction {
	color: #f56565;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

/* Modal */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
	background-color: white;
	margin: 5% auto;
	padding: 2rem;
	border-radius: 10px;
	width: 80%;
	max-width: 800px;
	position: relative;
}

.close {
	color: #aaa;
	position: absolute;
	right: 1.5rem;
	top: 1rem;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

.close:hover,
.close:focus {
	color: #000;
}

#modalTitle {
	margin-bottom: 1.5rem;
}

.price-stats {
	background-color: #f7fafc;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.price-stat-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
}

.price-stat-item {
	padding: 0.5rem;
}

.price-stat-item strong {
	color: #2d3748;
	display: block;
	margin-bottom: 0.25rem;
}

.price-stat-item small {
	color: #718096;
	font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
	.nav-content {
		flex-direction: column;
		gap: 1rem;
	}

	.container {
		padding: 0 1rem;
	}

	table {
		font-size: 0.9rem;
	}

	.item-image {
		width: 60px;
		height: 60px;
	}

	.modal-content {
		width: 95%;
		margin: 10% auto;
	}
}
