/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove margins */
body, h1, h2, h3, h4, h5, h6, p, blockquote, figure, hr, dl, dd {
  margin: 0;
}

/* Remove padding and list styles on lists */
ul, ol {
  padding: 0;
  list-style: none;
}

/* Set consistent background, font, and line-height */
body {
  background-color: white;
  color: black;
  font-family: sans-serif;
  line-height: 1.5;
  font-size: 16px;
}

/* Set consistent link styles */
a {
  text-decoration: none;
  color: inherit;
}

/* Reset table styles */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Reset form elements */
/* button, input, textarea, select {
  font: inherit;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  appearance: none;
}
 */
/* Remove default styles for images */
img {
  max-width: 100%;
  display: block;
}

/* Remove default blockquote and figure styling */
blockquote, figure {
  margin: 0;
}

/* Remove fieldset border */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

/* Reset all headings to inherit size and weight */
h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
}

body {
	font-family: Arial, sans-serif;
	/* margin: 20px; */
	padding: 0;
}

main {
	padding: 20px;
}

.page-header-1 {
	text-align: center;
	margin-bottom: 20px;
}

.container {
	display: flex;
	flex-direction: column;
}

textarea {
	width: 100%;
	height: 400px;
	padding: 10px;
	font-size: 14px;
	margin-bottom: 10px;
}

.right-panel {
	display: flex;
	flex-direction: column;
	width: 100%;
}

button {
	margin: 10px 0;
	padding: 10px 20px;
	cursor: pointer;
	align-self: flex-start;
}

#preview, #html-code {
	border: 1px solid #ddd;
	padding: 10px;
	background-color: #f9f9f9;
	min-height: 200px;
	word-wrap: break-word;
}

#html-code {
	white-space: pre-wrap;
	overflow-x: scroll;
	text-wrap: nowrap;
}

.tabs {
	display: flex;
	margin-bottom: 10px;
}

.tab {
	padding: 10px 20px;
	cursor: pointer;
	border: 1px solid #ddd;
	margin-right: 5px;
	background-color: #eee;
}

.active {
	background-color: #ccc;
}

/* Стили для верхнего меню */
header {
	background-color: #333;
	color: white;
	padding: 10px;
	position: relative;
}

.menu-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.menu-icon {
	font-size: 24px;
	cursor: pointer;
	display: none;
}

nav.menu {
	display: flex;
	align-items: center;
}

nav.menu ul {
	list-style-type: none;
	display: flex;
	margin: 0;
	padding: 0;
}

nav.menu ul li {
	margin-right: 20px;
}

nav.menu ul li a {
	color: white;
	text-decoration: none;
}

.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 10;
	display: none;
}

/* Адаптивность */
@media(min-width: 768px) {
	.container {
			flex-direction: row;
			justify-content: space-between;
	}

	textarea {
			width: 48%;
	}

	.right-panel {
			width: 48%;
	}
}

@media(max-width: 767px) {
	.menu-icon {
			display: block;
	}

	nav.menu {
			display: none;
			flex-direction: column;
			position: fixed;
			top: 0;
			left: 0;
			width: 250px;
			height: 100%;
			background-color: white;
			padding: 10px;
			z-index: 100;
	}

	nav.menu ul {
			flex-direction: column;
	}

	nav.menu ul li {
			margin: 10px 0;
	}

	nav.menu ul li a {
			color: black;
	}
}

#preview ul, #preview ol {
	padding-left: 1em;
	list-style: circle;
}
#preview li:has(input) {
	list-style: none;
	padding-left: 0;
	margin-left: -1rem;
}
#preview a {
	color: #5f2ada;
} 
#preview hr {
	margin: 1rem 0;
}
#preview code, pre {
	background: #ddd;
}
#preview code {
	padding: 3px 5px;
}
#preview table td, #preview table th {
	border: 1px solid #ddd;
	padding: 6px 4px;
}
#preview pre {
	padding: 10px;
} 
#preview blockquote {
	padding-left: .3em;
    border-left: .3em solid #ddd;
}

textarea {
	border: 1px solid #ddd;
	outline: none;
}

input[type="checkbox"] {
	margin: 3px 3px 3px 4px;
	padding: initial;
}

.page-text {
	line-height: 1.6;
	max-width: 36em;
	margin: 2rem auto 2rem auto;
}
.page-text p, .page-text h2 {
	margin-bottom: .75rem;
}
.page-text h2:not(:first-child) {
	margin-top: 1.3em;
}
.page-text ul {
	list-style: circle;
	padding: 1.1em;
}
.page-text a {
	color: #5f2ada;
}
.page-text pre code {
	/* max-width: 100%; */
	text-align: left;
}
.page-text pre {
	max-width: 100%;
	padding: 10px 6px;
	overflow: hidden;
	overflow-x: auto;
}