/* dark mode toggle switch style */
.toggle-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 26px;
	margin: 1rem auto;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: 0.4s;
	border-radius: 34px;
}

.slider::before {
	position: absolute;
	content: '';
	height: 20px;
	width: 20px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.4s;
	border-radius: 50%;
}

.toggle-switch input:checked + .slider {
	background-color: #333;
}

.toggle-switch input:checked + .slider::before {
	transform: translateX(24px);
}

/* dark mode theme styles */
body.dark-mode {
	background: #111;
	color: #eee;
}

body.dark-mode h1 {
	color: #eee;
}

body.dark-mode #search-input {
	background-color: #222;
	color: #eee;
	border-color: #666;
}

body.dark-mode mark {
	background-color: #a68d79;
}

body.dark-mode #arena-content.index {
	border: 1px solid #333;
	background: #1a1a1a;
}

body.dark-mode .index-block {
	border-bottom: 1px solid #333;
}

body.dark-mode .index-row {
	background: #1a1a1a;
}

body.dark-mode .index-row:hover {
	background: #222;
	box-shadow: 0 1px 3px rgba(255, 255, 255, 0.05);
}

body.dark-mode .index-number {
	border: 1px solid #555;
	color: #ccc;
	background: #1a1a1a;
}

body.dark-mode .index-number:hover {
	background-color: #444;
}

body.dark-mode .index-year {
	color: #bbb;
}

body.dark-mode .index-title {
	color: #eee;
}

body.dark-mode .index-meta {
	color: #aaa;
}

body.dark-mode .index-channel {
	color: #ccc;
}

body.dark-mode .index-arrow {
	color: rgba(200, 200, 200, 0.4);
}

body.dark-mode .index-thumbnail {
	opacity: 0.85;
}

body.dark-mode .channel-description {
	color: #777;
}

body.dark-mode .block-content {
	background: #222;
	color: #ddd;
}

body.dark-mode .block-description {
	color: #aaa;
}

body.dark-mode .image-container {
	background: #333;
}

body.dark-mode .block-content a {
	color: #80e0ff;
}

body.dark-mode .block-content a:hover {
	color: #b3f0ff;
}

body.dark-mode #loading-spinner {
	background: #111;
}

body.dark-mode .gear-spinner {
	border-color: #777;
}

body.dark-mode .site-nav button {
	color: #ccc;
	border-color: transparent;
}

body.dark-mode .site-nav button.active {
	color: #fff;
	border-color: #fff;
}

body.dark-mode .sort-container select {
	background-color: #222;
	color: #eee;
	border: 1px solid #666;
}

body.dark-mode .sort-options label {
	color: #ccc;
}

body.dark-mode #sort-select,
body.dark-mode #channel-select {
	background: #222;
	color: #eee;
	border: 1px solid #555;
}

/* dark mode readings view */
body.dark-mode .readings-view .index-block {
	background: #1a1a1a;
	border: 1px solid #333;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .readings-view .index-block:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body.dark-mode .readings-view .index-title {
	color: #eee;
}

body.dark-mode .readings-view .index-meta {
	color: #aaa;
}

body.dark-mode .readings-view .index-channel {
	color: #bbb;
	background: #333;
}

body.dark-mode .readings-view .block-content {
	color: #ddd;
}

body.dark-mode .readings-view .block-content a {
	color: #80e0ff;
}

body.dark-mode .readings-view .block-content a:hover {
	color: #b3f0ff;
}

/* dark mode base for reading links */
body.dark-mode .readings-view .index-title a {
	color: #f5f5f5;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

body.dark-mode .readings-view .index-title a:hover {
	color: #ccc;
}

body.dark-mode .readings-view .index-title a:visited {
	color: #f5f5f5;
}

/* base reading view link styling (light mode) */
.readings-view .index-title a {
	color: inherit;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.readings-view .index-title a:hover {
	color: #666;
}

.readings-view .index-title a:visited {
	color: inherit;
}

/* readings view layout cleanup */
.readings-view .index-block {
	background: none;
	padding: 0 1rem;
	border: none;
	border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
}

.readings-view .index-row {
	background-color: transparent;
	padding: 0.5rem 0;
	border-radius: 0;
	box-shadow: none;
}

/* dark mode dotted border for readings */
body.dark-mode .readings-view .index-block {
	border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
}

/* dark mode for about section */
body.dark-mode #about-section {
	background: #1a1a1a;
	color: #eee;
	box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

body.dark-mode #about-section h2,
body.dark-mode #about-section h3 {
	color: #fff;
}

body.dark-mode #about-section a {
	color: #80e0ff;
}

body.dark-mode #about-section a:hover {
	color: #b3f0ff;
	text-decoration: underline;
}

body.dark-mode .small-tag {
	color: #ddd;
	background: #444;
}

body.dark-mode .small-tag:hover {
	background: #666;
}
