/* == ЗАГАЛЬНІ СТИЛІ ==*/

	@font-face {
		font-family: 'Minecraft';
		src: url('https://qqq-craft.top/assets/Minecraft_1.1.ttf') format('truetype');
	}
	
	body {
		font-family: 'Minecraft', sans-serif;
		background-color: #f0ece2;
		color: #333;
		margin: 0;
		padding: 0;
		background-image: url('https://qqq-craft.top/assets/old-wall.png');
		//background-attachment: fixed;
	}
	
	header {
		background: url('https://qqq-craft.top/assets/background.png') no-repeat center/cover;
		color: #fff;
		text-align: center;
		position: relative;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	}
	
	footer {
		background: #5a4d41;
		color: #fff;
		text-align: center;
		padding: 20px 0;
		position: relative;
		bottom: 0;
		width: 100%;
		height: 300px;
		border-top: 5px solid #7b674f;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	}
	
	section {
		margin: 30px auto;
		padding: 20px;
		max-width: 1000px;
		min-height: 700px;
		background-color: #fdf7e1;
		border: 5px solid #9e644c;
		border-radius: 10px;
		box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
		position: relative;
	}	
	
	@media (max-width: 1120px) {
		section {
			max-width: 1120px;
			margin: 20px auto;
			border-radius: 0;
			border-left: 0;
			border-right: 0;
		}
		section::before,
		section::after {
			display: none;
		}
	}
	
	img, video {
		border-radius: 5px;
	}
	
	span {
		text-wrap: nowrap;
	}
	
	a {
		text-decoration: none;
		color: #333;
		border-bottom: 2px solid #333;
	}

	a:hover {
		color: #7b674f;
		border-bottom: 2px solid #7b674f;
	}
	
	iframe {
		width: 100%;
		border: none;
		outline: none;
		box-shadow: none;
		border-radius: 5px;
	}
	
	iframe:focus {
		outline: none;
		border: none;
	}

	.box-shadow {
		box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
	}

	code {
		display: inline-block;
		background-color: #7a5c54;
		color: #cdbeac;
		font-family: 'Minecraft', sans-serif;
		padding: 0.25em 0.5em;
		border: 2px solid #a6857c;
		border-radius: 6px;
		box-shadow: 2px 2px 0 #8b484a;
		font-size: 0.95em;
		line-height: 1.4;
		white-space: nowrap;
	}

	@media (max-width: 480px) {
		h1, h2 {
			font-size: 2em;
		}
	}	

/* == НАВІГАЦІЙНА ПАНЕЛЬ ==*/

	/* Базові стилі для nav */
	nav {
	  background-color: #fdf7e1;
	  border-top: 5px solid #7b674f;
      border-bottom: 5px solid #7b674f;
	  width: 100%;
	  z-index: 1000;
	}
	
	nav ul {
	  list-style: none;
	  padding: 0;
	  margin: 0;
	  display: flex;
	  align-items: center;
	  justify-content: space-around;
	  white-space: nowrap;
	}
	
	nav ul li {
	  margin: 0;
	  text-align: center;
	  flex-shrink: 0;
	  position: relative;
	}
	
	nav a {
	  color: #333;
	  text-decoration: none;
	  font-size: 1.2em;
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  padding: 15px 0px;
	  border: none;
	}
	
	nav span.emoji {
	  font-size: 1.2em;
	}
	
	nav a.active, nav a:hover {
	  color: #7b674f;
	  font-weight: bold;
	  border: none;
	}

	/* Десктопна версія - sticky до верху */
	@media (min-width: 769px) and (orientation: landscape) {
		.emoji {
			display: none;
		}
		
		nav {
			position: sticky !important;
			top: 0 !important;
			overflow-x: visible;
			position: -webkit-sticky !important; /* Для Safari */
		}

		nav ul {
			justify-content: center;
		}
		
		nav ul li {
			margin: 0 20px;
		}
	}

	/* Планшети в портретній орієнтації - floating внизу */
	@media (orientation: portrait) {
		header {
           border-bottom: 5px solid #7b674f;
		}
		
		nav {
			position: fixed !important;
			width: 80%;
			left: 10%;
			bottom: 20px;
			top: auto !important;
			border: 5px solid #7b674f;
			border-radius: 10px;
			font-size: 0.7em;
			transition: transform 0.3s ease-in-out;
			filter: drop-shadow(1px 1px 10px rgba(0, 0, 0, 0.3));
		}
		
		.emoji {
			display: block;
		}
		
		nav ul li {
			display: block;
			margin: 10px 0;
		}
		
		nav.hidden {
			transform: translateY(150%);
		}
		
		nav ul {
			overflow-x: auto;
		}
		
		nav a {
			padding: 5px 10px;
		}
		
		nav span.emoji {
			font-size: 2em;
		}
		
		nav::before,
		nav::after {
			content: "";
			position: absolute;
			width: 60px;
			height: 60px;
			background-size: contain;
			background-repeat: no-repeat;
			filter: drop-shadow(1px 1px 10px rgba(0, 0, 0, 0.3));
			pointer-events: none;
		}
		
		nav::before {
			top: -18px;
			left: -24px;
			background-image: url('/assets/horns-left.png');
		}
		
		nav::after {
			top: -18px;
			right: -24px;
			background-image: url('/assets/horns-right.png');
		}
		
		/* Приховування input всередині nav на портретній орієнтації */
		nav input,
		nav .input,
		nav form {
			display: none !important;
		}
	}

	/* Мобільна версія - floating внизу */
	@media (max-width: 768px) {
		header {
           border-bottom: 5px solid #7b674f;
		}
		nav {
			position: fixed !important;
			width: 80%;
			left: 10%;
			bottom: 20px;
			top: auto !important;
			border: 5px solid #7b674f;
			border-radius: 10px;
			font-size: 0.7em;
			transition: transform 0.3s ease-in-out;
			filter: drop-shadow(1px 1px 10px rgba(0, 0, 0, 0.3));
		}
		
		nav ul li {
			display: block;
			margin: 10px 0;
		}
		
		nav.hidden {
			transform: translateY(150%);
		}
		
		nav ul {
			overflow-x: auto;
		}
		
		nav a {
			padding: 5px 10px;
		}
		
		nav span.emoji {
			font-size: 2em;
		}
		
		nav::before,
		nav::after {
			content: "";
			position: absolute;
			width: 60px;
			height: 60px;
			background-size: contain;
			background-repeat: no-repeat;
			filter: drop-shadow(1px 1px 10px rgba(0, 0, 0, 0.3));
			pointer-events: none;
		}
		
		nav::before {
			top: -18px;
			left: -24px;
			background-image: url('/assets/horns-left.png');
		}
		
		nav::after {
			top: -18px;
			right: -24px;
			background-image: url('/assets/horns-right.png');
		}
		
		/* Приховування input всередині nav на мобільних */
		nav input,
		nav .input,
		nav form {
			display: none !important;
		}
	}

	@media (max-width: 480px) {
		.emoji {
			display: block;
		}
		nav a {
			font-size: 1.2em;
		}
	}

	.input {
	  font-size: 16px;
	  padding: 8px 15px;
	  border: 2px solid #a57c55;
	  border-radius: 10px;
	  width: 100%;
	  transition: all 0.3s ease;
	  background: #f8f0e3;
	  color: #493728; 
	  box-sizing: border-box;
	}
	
	input, select, textarea {
		font-family:inherit;
	}

	.input:focus {
	  outline: none;
	  border-color: #ffd700;
	  box-shadow: 0 0 10px #ffd700;
	}

	#suggestions {
	  position: absolute;
	  top: calc(100%);
	  left: 0;
	  width: 200px; 
	  background: #f8f0e3; 
	  border: 2px solid #a57c55;
	  border-top: none; 
	  border-radius: 0 0 10px 10px;
	  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	  max-height: 150px; 
	  overflow-y: auto; 
	  z-index: 1000;
	  display: none; 
	}

	#suggestions div {
	  padding: 8px 15px;
	  cursor: pointer;
	  color: #493728;
	}

	#suggestions div:hover {
	  background: rgba(255, 215, 0, 0.2);
	  text-shadow: 0 0 5px #ffd700;
	}

/* == АНІМАЦІЯ ЗАВАНТАЖЕННЯ ==*/

	.loading-indicator {
		text-align: center;
		padding: 2rem;
		color: #666;
	}

	.spinner {
		border: 3px solid #7b674f;
		border-top: 3px solid #a57c55;
		border-radius: 50%;
		width: 30px;
		height: 30px;
		animation: spin 1s linear infinite;
		margin: 0 auto 1rem;
	}

	@keyframes spin {
		0% { transform: rotate(0deg); }
		100% { transform: rotate(360deg); }
	}

	.end-message {
		text-align: center;
		padding: 2rem;
		color: #999;
		font-style: italic;
	}

/* == ЗАГОЛОВКИ ==*/

	h1 {
		text-align: center;
		font-size: 2.5em;
		margin-bottom: 20px;
		color: #5a4d41;
	}
	
	/* Адаптивні стилі для мобільних пристроїв */
	@media (max-width: 600px) {
	  .tab-header {
		font-size: 20px; /* Зменшення шрифта на маленьких екранах */
		flex: 1 1 100%; /* Заголовки займають всю ширину на малих екранах */
	  }
	}

/* == ТАБЛИЦІ == */

	.table-wrapper {
		overflow-x: auto;
		border-radius: 5px;
	    align-items: stretch;
		background-color: #f3e6ca;
	}
	table {
		width: 100%;
		border-collapse: collapse;
		font-size: 1.2em;
	}
	table th, table td {
		padding: 10px;
		text-align: center;
		border: 0px solid #7b674f;
	}
	table th {
		background: #f3e6ca;
		color: #5a4d41;
		text-transform: uppercase;
	}
	table td {
		background-color: #f3e6ca;
		justify-content: center;
	}
	table tr:nth-child(even) td,
	table tr:nth-child(even) th {
		background-color: #e1d5b5;
	}

	table a:hover {
		border-bottom: 2px solid #333;
	}

/* == ШАПКА САЙТУ == */

	.header-background {
		background-color: rgba(90, 77, 65, 0.6);
	}
	
	.header-content {
		margin: 0px auto;
		max-width: 1000px;
		min-height: 200px;
		padding: 30px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		z-index: 1;
		position: relative;
	}
	
	.logo {
		border: 0px;
	}
	.logo img {
		width: 180px;
		-webkit-filter: drop-shadow(5px 5px 15px #222);
		filter: drop-shadow(5px 5px 15px #222);
	}
	
	@media (max-width: 768px) {
		.header-content {
			flex-direction: column;
			justify-content: center;
			align-items: center;
			text-align: center;
		}
		h1 {
			font-size: 2.5em;
			letter-spacing: 2px;
		}
		table {
			font-size: 0.9em;
		}
	}

/* == КАРТОЧКИ ==*/

	.box-container {
	  display: grid;
	  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	  gap: 20px;
	  justify-content: space-around;
	  align-items: stretch;
	  margin-top: 10px;
	  padding: 0; 
	}

	.box {
	  background: linear-gradient(135deg, #fdfbdf, #f4e4ba);
	  border: 5px solid #9e644c;
	  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	  border-radius: 12px;
	  padding: 10px;
	  max-width: 100%;
	  text-align: center;
	  position: relative;
	  color: #4a3b2c;
	  transition: transform 0.3s ease, box-shadow 0.3s ease;
	}
	
	.box img {
		max-width: 100%;
		height: auto;
		border-radius: 8px;
		margin: 10px;
		-webkit-filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.3));
		filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.3));
	}

	.box h3 {
		font-size: 1.6em;
		margin: 10px 0;
		color: #8b5e34;
	}

	.box p {
		font-size: 1.2em;
		margin: 5px 0;
	}

	.box:hover {
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
	}

	@media (max-width: 768px) {
		.box-container {
			grid-template-columns: 1fr;
		}
	}

/* == РІЖКИ ==*/

	.horns::before,
	.horns::after {
		content: "";
		position: absolute;
		width: 80px;
		height: 80px;
		background-size: contain;
		background-repeat: no-repeat;
		-webkit-filter: drop-shadow(1px 1px 10px rgba(0, 0, 0, 0.3));
		filter: drop-shadow(1px 1px 10px rgba(0, 0, 0, 0.3));
		pointer-events: none;
	}
	
	.horns::before {
		top: -24px;
		left: -32.4px;
		background-image: url('/assets/horns-left.png');
	}
	
	.horns::after {
		top: -24px;
		right: -31.5px;
		background-image: url('/assets/horns-right.png');
	}

/* == КНОПКИ ==*/

	.button {
	  font-family: 'Minecraft', sans-serif;
	  display: inline-block;
	  background-color: #8B4513;
	  color: #f0e6d6;
	  font-size: 18px;
	  padding: 10px;
	  margin-top: 10px;
	  margin-bottom: 10px;
	  border: 3px solid #4B2D0B;
	  border-radius: 15px;
	  box-shadow: 0 5px 0 #4B2D0B, 0 5px 15px rgba(0, 0, 0, 0.2);
	  transition: background-color 0.3s, transform 0.2s;
	  cursor: pointer;
	  text-shadow: 1px 1px 2px #000;
	  text-decoration: none;
	}
	
	.button:hover {
		border: 3px solid #4B2D0B;
	    color: #f0e6d6;
	}
	
	.box .button {
	  display: block;
	  margin: 20px;
	}
	
	.button:hover {
	  background-color: #a0522d;
	  transform: translateY(-3px);
	}
	
	.button:active {
	  background-color: #7B3F00;
	  box-shadow: 0 2px 0 #4B2D0B;
	}
	
	.button img {
	  margin: 0px;
	  padding: 0px;
	}
	
	.button-secondary {
		display: inline-block;
		margin-top: 10px;
		padding: 10px 15px;
		color: #fff;
		background: #8b4513;
		border-radius: 5px;
		text-decoration: none;
		box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
	}

	.button-secondary:hover {
		background: #5e320f;
		color: #fff;
	}
	
/* == АНІМАЦІЯ ЗАВАНТАЖЕННЯ == */
	
	.skeleton {
		border-radius: 5px;
		animation: loading 1.2s infinite;
	}
	@keyframes loading {
		0% {
			background-color: #988970;
		}
		50% {
			background-color: #604839;
		}
		100% {
			background-color: #988970;
		}
	}

/* == ВКЛАДКИ == */

	.tab-links {
		list-style-type: none;
		padding: 0;
		display: flex;
		justify-content: start;
		border-bottom: 5px solid #7b674f;
	}

	.tab-links li {
		margin-right: 20px;
		padding: 20px 0px;
	}

	.tab-links li a {
		text-decoration: none;
		color: #333;
		font-size: 1.2em;
	}

	.tab-links li.active a {
		font-weight: bold;
		color: #7b6758;
	}

	.tab {
		display: none;
	}

	.tab.active {
		display: block;
	}

	/* == Адаптивність для мобільних пристроїв == */

	/* Мобільні екрани (до 768px) */
	@media (max-width: 768px) {
		.tab-links {
			flex-direction: column;
			align-items: center;
		}

		.tab-links li {
			padding: 8px 15px;
			text-align: center;
		}

		.tab-links li a {
			font-size: 1em;
		}
	}

	/* Екрани менше 480px */
	@media (max-width: 480px) {
		.tab-links {
			flex-direction: column;
			align-items: stretch;
		}

		.tab-links li {
			width: 100%;
			padding: 10px; 
		}

		.tab-links li a {
			font-size: 0.9em;
		}
	}

/* == СТИЛІ ДЛЯ СКРОЛУ == */

	::-webkit-scrollbar {
		width: 8px;
		height: 8px;
	}

	::-webkit-scrollbar-thumb {
		background-color: #a57c55;
		border-radius: 10px;
		border: 2px solid #f8f0e3;
	}

	::-webkit-scrollbar-track {
		background-color: transparent;
	}

/* == УНІВЕРСАЛЬНІ КЛАСИ == */

	.text-image {
	  display: flex;
	  align-items: center;
	  justify-content: space-between;
	  gap: 3rem;
	  margin: 4rem 0;
	  flex-wrap: wrap;
	}

	.text-image.split .text,
	.text-image.split .image {
	  flex: 1 1 45%;
	}

	.text-image.reverse {
	  flex-direction: row-reverse;
	}

	.text-image .text {
	  font-size: 1.1rem;
	  line-height: 1.6;
	}

	.text-image .image img {
	  width: 100%;
	  height: auto;
	  border-radius: 12px;
	  box-shadow: 0 0 20px rgba(0,0,0,0.2);
	}

	/* Mobile adaptation */
	@media (max-width: 768px) {
	  .text-image {
		flex-direction: column !important;
		text-align: center;
	  }

	  .text-image .text,
	  .text-image .image {
		flex: 1 1 100%;
	  }

	  .text-image .image img {
		max-width: 100%;
	  }
	}
	
    /* Стилі для тексту останнього оновлення кешу */
	.cache-update-text {
		color: #888888;   /* Сірий колір */
		font-size: 14px;   /* Невеликий розмір шрифту */
		text-align: right; /* Вирівнювання тексту по правому краю */
	}
	
	/* Секція реакцій */
	.reactions {
		margin-top: 15px;
		display: flex;
		gap: 10px;
		flex-wrap: wrap;
	}

	.reaction-button {
		background: rgba(253, 251, 223, 0.3);
		border: 2px solid #f4e4ba;
		border-radius: 20px;
		padding: 8px 18px;
		font-size: 0.95em;
		cursor: pointer;
		color: #6e4e4b;;
		transition: all 0.3s;
		font-weight: 600;
		backdrop-filter: blur(5px);
	}

	.reaction-button:hover {
		background: rgba(253, 251, 223, 0.5);
		transform: scale(1.05);
	}