:root {
	--bg-primary: #f6f6ef;
	--bg-secondary: #ffffff;
	--text-primary: #000000;
	--text-secondary: #828282;
	--text-link: #000000;
	--text-visited: #828282;
	--border-color: #e6e6df;
	--accent-color: #44298e;
	--hover-bg: #f0f0f0;
	--shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
	--bg-primary: #1a1a1a;
	--bg-secondary: #2d2d2d;
	--text-primary: #ffffff;
	--text-secondary: #b3b3b3;
	--text-link: #ffffff;
	--text-visited: #b3b3b3;
	--border-color: #404040;
	--accent-color: #44298e;
	--hover-bg: #404040;
	--shadow: rgba(255, 255, 255, 0.1);
}

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

body {
	font-family: "Courier New", "Monaco", "Lucida Console", monospace;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	line-height: 1.4;
	transition: all 0.3s ease;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.header {
	background-color: var(--accent-color);
	color: white;
	padding: 8px 12px;
	margin-bottom: 20px;
	border: 1px solid var(--accent-color);
	font-size: 14px;
	font-weight: bold;
	position: relative;
}

.header h1 {
	font-size: 16px;
	font-weight: bold;
	display: inline-block;
	margin-right: 15px;
}

.header-subtitle {
	font-size: 12px;
	opacity: 0.9;
	display: inline-block;
}

.theme-toggle {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: white;
	padding: 4px 8px;
	font-size: 11px;
	cursor: pointer;
	font-family: inherit;
	border-radius: 2px;
	transition: all 0.2s ease;
}

.theme-toggle:hover {
	background: rgba(255, 255, 255, 0.1);
}

.controls {
	background-color: var(--bg-secondary);
	border: 1px solid var(--border-color);
	padding: 10px;
	margin-bottom: 20px;
	font-size: 12px;
}

.controls-row {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.btn {
	background: none;
	border: none;
	color: var(--text-link);
	cursor: pointer;
	font-family: inherit;
	font-size: 12px;
	text-decoration: underline;
	padding: 2px 4px;
	transition: all 0.2s ease;
}

.btn:hover {
	background-color: var(--hover-bg);
}

.btn.active {
	color: #8163d2;
	font-weight: bold;
}

.refresh-btn {
	color: #8163d2;
	text-decoration: none;
	border: 1px solid #8163d2;
	padding: 4px 8px;
	border-radius: 2px;
}

.refresh-btn:hover {
	background-color: #8163d2;
	color: white;
}

.separator {
	color: var(--text-secondary);
	margin: 0 5px;
}

.feeds-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.feed-section {
	background-color: var(--bg-secondary);
	border: 1px solid var(--border-color);
}

.feed-header {
	background-color: var(--bg-primary);
	border-bottom: 1px solid var(--border-color);
	padding: 8px 12px;
	font-size: 13px;
	font-weight: bold;
	color: var(--text-primary);
}

.feed-items {
	padding: 0;
}

.feed-item {
	border-bottom: 1px solid var(--border-color);
	padding: 8px 12px;
	transition: background-color 0.2s ease;
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.feed-item:hover {
	background-color: var(--hover-bg);
}

.feed-item:last-child {
	border-bottom: none;
}

.item-number {
	color: var(--text-secondary);
	font-size: 11px;
	min-width: 20px;
	text-align: right;
	margin-top: 1px;
}

.item-content {
	flex: 1;
	min-width: 0;
}

.item-title {
	font-size: 12px;
	margin-bottom: 2px;
}

.item-title a {
	color: var(--text-link);
	text-decoration: none;
	word-wrap: break-word;
}

.item-title a:visited {
	color: var(--text-visited);
}

.item-title a:hover {
	text-decoration: underline;
}

.item-meta {
	font-size: 10px;
	color: var(--text-secondary);
	margin-bottom: 4px;
}

.item-meta .separator {
	margin: 0 3px;
}

.item-description {
	font-size: 11px;
	color: var(--text-secondary);
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.loading {
	text-align: center;
	padding: 20px;
	color: var(--text-secondary);
	font-size: 12px;
	background-color: var(--bg-secondary);
	border: 1px solid var(--border-color);
}

.loading-text {
	display: inline-block;
	position: relative;
}

.loading-text::after {
	content: "";
	position: absolute;
	right: -15px;
	top: 0;
	width: 0;
	height: 1em;
	border-right: 2px solid var(--text-secondary);
	animation: blink 1s infinite;
}

.error {
	background-color: #ffebee;
	color: #c62828;
	border: 1px solid #ffcdd2;
	padding: 8px 12px;
	font-size: 11px;
	margin: 5px 0;
}

[data-theme="dark"] .error {
	background-color: #2d1b1b;
	color: #ff6b6b;
	border-color: #4d2929;
}

.stats {
	color: var(--text-secondary);
	font-size: 10px;
	margin-left: auto;
}

@keyframes blink {
	0%,
	50% {
		opacity: 1;
	}
	51%,
	100% {
		opacity: 0;
	}
}

@media (max-width: 768px) {
	.container {
		padding: 10px;
	}
	.header {
		padding: 6px 8px;
	}
	.header h1 {
		font-size: 14px;
	}
	.header-subtitle {
		display: block;
		margin-top: 2px;
	}
	.theme-toggle {
		position: static;
		transform: none;
		margin-top: 5px;
		display: block;
	}
	.controls {
		padding: 8px;
	}
	.controls-row {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		align-items: center;
	}
	.controls-group {
		display: flex;
		align-items: center;
		gap: 8px;
		flex-wrap: wrap;
	}
	.btn {
		padding: 6px 12px;
		border: 1px solid var(--border-color);
		border-radius: 4px;
		background-color: var(--bg-primary);
		text-decoration: none;
		font-size: 11px;
		min-width: 50px;
		text-align: center;
	}
	.btn:hover {
		background-color: var(--hover-bg);
	}
	.btn.active {
		background-color: #8163d2;
		color: white;
		border-color: #8163d2;
	}
	.refresh-btn {
		background-color: #8163d2;
		color: white;
		border-color: #8163d2;
		text-decoration: none;
		padding: 6px 12px;
	}
	.refresh-btn:hover {
		background-color: #6b4fb8;
	}
	.separator {
		display: none;
	}
	.stats {
		grid-column: 1 / -1;
		text-align: center;
		margin: 5px 0 0 0;
		font-size: 10px;
	}
	.feed-item {
		flex-direction: column;
		gap: 4px;
	}
	.item-number {
		align-self: flex-start;
	}
}

.compact-mode .feed-item {
	padding: 4px 12px;
}
.compact-mode .item-description {
	display: none;
}
.compact-mode .item-meta {
	margin-bottom: 0;
}
