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

/* Botçao das Linguas*/
/* From Uiverse.io by pipic1 */
.button {
	--key-text-color: #969faf;
	--docsearch-key-shadow:
		inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff,
		0 1px 2px 1px rgba(30, 35, 90, 0.4);
	--docsearch-key-gradient: linear-gradient(-225deg, #d5dbe4, #f8f8f8);
	border: none;
	background: var(--docsearch-key-gradient);
	border-radius: 3px;
	box-shadow: var(--docsearch-key-shadow);
	color: var(--key-text-color);
	cursor: pointer;
	height: 2.5em;
	text-align: center;
	padding: 0.6em;
	margin: 0 0.6em;
	display: inline-block;
	text-transform: uppercase;
	font-weight: bold;
	font-size: 1em;
	min-width: 1em;
	line-height: 1em;
	user-select: none;
	position: fixed;
	top: 12px;
	right: 12px;
	z-index: 999999;
}

/* Botão de idioma na taskbar (visível só no mobile) */
.tray-lang {
	display: none;
	color: #969faf;
	font-size: 0.85em;
	font-weight: bold;
	cursor: pointer;
	padding: 0.4em 0.6em;
	height: 2.2em;
	line-height: 1em;
	border: none;
	border-radius: 3px;
	background: linear-gradient(-225deg, #d5dbe4, #f8f8f8);
	box-shadow:
		inset 0 -2px 0 0 #cdcde6,
		inset 0 0 1px 1px #fff,
		0 1px 2px 1px rgba(30, 35, 90, 0.4);
	user-select: none;
	text-transform: uppercase;
	align-items: center;
	justify-content: center;
	transition: opacity 0.1s;
	flex-shrink: 0;
}

.tray-lang:hover {
	opacity: 0.85;
}

/* CRT GLOBAL */
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background-image: url("../images/background.jpg");
	background-attachment: fixed;
	font-family:
		"JetBrains Mono", "Fira Code", "Consolas", "Courier New", monospace;
	position: relative;
	isolation: isolate;
	padding-bottom: 48px; /* espaço para a taskbar */
	padding-top: 12px;
}

/* camada CRT */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		repeating-linear-gradient(
			0deg,
			rgba(0, 0, 0, 0.15) 0px,
			rgba(0, 0, 0, 0.15) 1px,
			transparent 2px,
			transparent 4px
		),
		radial-gradient(
			circle at center,
			rgba(0, 0, 0, 0) 0%,
			rgba(0, 0, 0, 0.35) 100%
		);
	mix-blend-mode: multiply;
	pointer-events: none;
	z-index: 1;
}

/* leve flicker */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(255, 255, 255, 0.02);
	opacity: 0.03;
	animation: flicker 0.15s infinite;
	pointer-events: none;
	z-index: 2;
}

@keyframes flicker {
	0% {
		opacity: 0.02;
	}
	50% {
		opacity: 0.04;
	}
	100% {
		opacity: 0.02;
	}
}

.container {
	display: flex;
	justify-content: center;
	position: relative;
	z-index: 3;
	width: 100%;
	padding: 0 8px;
}

/* Wrapper */
.window-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 800px;
	width: 100%;
	position: relative;
	z-index: 3;
}

/* XP */
.window-xp {
	background: linear-gradient(
		180deg,
		#0997ff 0%,
		#0053ee 4%,
		#0050ee 96%,
		#06f 100%
	);
	border-radius: 8px 8px 0 0;
	padding: 3px;
	/*box-shadow: 0 0 0 1px #0831d9;*/
	width: 100%;
}

.title-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 6px;
	color: white;
	font-weight: bold;
	font-size: 13px;
	text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
	cursor: move;
	user-select: none;
}

.title-text {
	display: flex;
	align-items: center;
	gap: 6px;
}

.window-buttons {
	display: flex;
	gap: 2px;
}

.window-btn {
	width: 21px;
	height: 21px;
	background: linear-gradient(180deg, #f5f5ff 0%, #d6dff7 50%, #b7c8e7 100%);
	border: 1px solid #003c74;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 11px;
	font-weight: bold;
	color: #000;
}

.window-btn:hover {
	background: linear-gradient(180deg, #fff 0%, #e5eeff 50%, #c8d5f0 100%);
}

.window-btn.close {
	background: linear-gradient(180deg, #ff5f5f 0%, #ff3030 50%, #d40000 100%);
	color: #fff;
}

.window-btn.close:hover {
	background: linear-gradient(180deg, #ff8080 0%, #ff5050 50%, #ff0000 100%);
}

.window-content {
	background: linear-gradient(180deg, #ece9d8 0%, #f5f4ef 100%);
	border: 2px solid #fff;
	border-top: none;
	padding: 20px;
	box-shadow: inset 0 0 0 1px #ccc;
}

/* Perfil */
.profile-section {
	background: #fff;
	border: 2px solid #316ac5;
	border-radius: 6px;
	padding: 20px;
	display: flex;
	gap: 15px;
	align-items: center;
	box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
	width: 100%;
}

.profile-pic {
	width: 120px;
	height: 120px;
	border: 3px solid #316ac5;
	border-radius: 4px;
	overflow: hidden;
	flex-shrink: 0;
}

.profile-pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.profile-info {
	flex: 1;
	min-width: 0; /* evita overflow em flex */
}

.profile-info h1 {
	color: #316ac5;
	font-size: 24px;
	margin-bottom: 10px;
}

.profile-info p {
	color: #333;
	line-height: 1.6;
	font-size: 14px;
}

/* socials */
.social-section {
	margin-top: 15px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.social-item {
	background: linear-gradient(180deg, #e3e9f7 0%, #cbd7f0 100%);
	border: 1px solid #316ac5;
	border-radius: 4px;
	padding: 6px 10px;
	font-size: 12px;
	cursor: pointer;
}

/* terminal */
.terminal-box {
	background: #0a0a0a;
	width: 100%;
	border: 3px solid #0831d9;
	border-top: none;
	border-radius: 0 0 8px 8px;
	padding: 20px 30px;
	font-family:
		"JetBrains Mono", "Fira Code", "Consolas", "Courier New", monospace;
	font-size: 14px;
	box-shadow:
		0 8px 32px rgba(0, 0, 0, 0.6),
		inset 0 0 60px rgba(0, 255, 80, 0.03);
	position: relative;
	overflow: hidden;
}

/* Efeito de tela CRT */
.terminal-box::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		0deg,
		transparent,
		transparent 2px,
		rgba(0, 0, 0, 0.15) 2px,
		rgba(0, 0, 0, 0.15) 4px
	);
	pointer-events: none;
	z-index: 1;
}

.terminal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #1e1e1e;
	position: relative;
	z-index: 2;
}

.terminal-dots {
	display: flex;
	gap: 6px;
}

.terminal-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
}

.terminal-dot.red {
	background: #4a0000;
	box-shadow: 0 0 4px #ff000066;
}
.terminal-dot.yellow {
	background: #3a3000;
	box-shadow: 0 0 4px #ffcc0066;
}
.terminal-dot.green {
	background: #003a00;
	box-shadow: 0 0 4px #00ff0066;
}

.terminal-label {
	font-size: 11px;
	color: #fff;
	margin: 0;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.terminal-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	position: relative;
	z-index: 2;
}

.terminal-cmd {
	color: #00c853;
	margin: 0;
	text-shadow: 0 0 8px #00c85388;
}

.terminal-out {
	color: #ccc;
	margin: 0;
}

.terminal-body a {
	color: #00c853;
	text-shadow: 0 0 8px #00c85388;
	text-decoration: none;
}

.terminal-body a:hover {
	text-decoration: underline;
}

/* Cursor piscando */
.terminal-cursor {
	display: inline-block;
	width: 8px;
	height: 14px;
	background: #00c853;
	vertical-align: middle;
	box-shadow: 0 0 6px #00c853;
	animation: blink 1s step-end infinite;
}

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

/* TASKBAR */
.taskbar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 40px;
	background: linear-gradient(180deg, #245edb 0%, #1941a5 50%, #1941a5 100%);
	border-top: 2px solid #4584ff;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	padding: 0 4px;
	gap: 4px;
	z-index: 99999;
}

/* botão iniciar */
.start-button {
	height: 32px;
	padding: 0 12px;
	background: linear-gradient(180deg, #5eac56 0%, #3c8d36 50%, #2c6b28 100%);
	border: 1px solid #0e4e0a;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 6px;
	color: white;
	font-weight: bold;
	font-size: 13px;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
	cursor: pointer;
	box-shadow:
		inset 1px 1px 0 rgba(255, 255, 255, 0.3),
		2px 2px 4px rgba(0, 0, 0, 0.3);
	transition: all 0.1s;
	white-space: nowrap;
	flex-shrink: 0;
}

.start-button:hover {
	background: linear-gradient(180deg, #70be68 0%, #4ea048 50%, #3c8036 100%);
}

.start-button:active {
	transform: translateY(1px);
	box-shadow:
		inset 2px 2px 4px rgba(0, 0, 0, 0.4),
		1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* divisor */
.taskbar-divider {
	width: 2px;
	height: 28px;
	background: linear-gradient(180deg, #1941a5 0%, #4584ff 50%, #1941a5 100%);
	box-shadow:
		-1px 0 0 rgba(0, 0, 0, 0.3),
		1px 0 0 rgba(255, 255, 255, 0.2);
	flex-shrink: 0;
}

/* itens */
.taskbar-items {
	flex: 1;
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
	min-width: 0;
}

.taskbar-items::-webkit-scrollbar {
	display: none;
}

.taskbar-item {
	height: 32px;
	padding: 0 10px;
	background: linear-gradient(180deg, #3d7ce8 0%, #2563d9 50%, #1a4cb8 100%);
	border: 1px solid #0d3a8f;
	border-radius: 3px;
	display: flex;
	align-items: center;
	gap: 6px;
	color: white;
	font-size: 12px;
	cursor: pointer;
	white-space: nowrap;
	box-shadow:
		inset 1px 1px 0 rgba(255, 255, 255, 0.2),
		1px 1px 3px rgba(0, 0, 0, 0.3);
	transition: all 0.1s;
	min-width: 36px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.taskbar-item:hover {
	background: linear-gradient(180deg, #4e8df9 0%, #3674ea 50%, #2563d9 100%);
}

.taskbar-item.active {
	background: linear-gradient(180deg, #1a4cb8 0%, #2563d9 50%, #3d7ce8 100%);
	box-shadow:
		inset 2px 2px 4px rgba(0, 0, 0, 0.4),
		1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* system tray */
.system-tray {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 8px;
	height: 32px;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.1) 0%,
		rgba(255, 255, 255, 0.05) 100%
	);
	border: 1px solid rgba(0, 0, 0, 0.3);
	border-radius: 3px;
	margin-left: 4px;
	flex-shrink: 0;
}

/* relógio */
.clock {
	color: white;
	font-size: 12px;
	text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
	padding: 0 4px;
}

/* scanlines */
@keyframes scanline {
	0% {
		top: 0;
	}
	100% {
		top: 100%;
	}
}

.scanline {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 2px;
	pointer-events: none;
	z-index: 99998;
	background: rgba(255, 255, 255, 0.08);
	animation: scanline 8s linear infinite;
}

.window-wrapper {
	width: 100%;
	max-width: 800px;
	display: flex;
	flex-direction: column;
}

/* ============================================================
   RESPONSIVO — MOBILE (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {
	body {
		align-items: flex-start;
		padding-top: 10px;
		padding-bottom: 52px;
		background-attachment: scroll; /* fixed trava no iOS */
	}

	.container {
		padding: 0 4px;
		align-items: flex-start;
	}

	.window-wrapper {
		width: 100%;
	}

	/* Barra de título */
	.title-bar {
		font-size: 12px;
		padding: 3px 5px;
		cursor: default; /* sem drag no mobile */
	}

	/* Conteúdo da janela */
	.window-content {
		padding: 10px;
	}

	/* Perfil empilha verticalmente */
	.profile-section {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 12px 10px;
		gap: 10px;
	}

	.profile-pic {
		width: 80px;
		height: 80px;
	}

	.profile-info h1 {
		font-size: 17px;
		margin-bottom: 6px;
	}

	.profile-info p {
		font-size: 12.5px;
		line-height: 1.55;
	}

	/* Social buttons */
	.social-section {
		justify-content: center;
		gap: 6px;
		margin-top: 10px;
	}

	.social-item {
		font-size: 12px;
		padding: 8px 12px; /* touch target maior */
	}

	/* Terminal */
	.terminal-box {
		padding: 14px 14px;
		font-size: 12.5px;
	}

	.terminal-label {
		font-size: 10px;
		letter-spacing: 1px;
	}

	.terminal-cmd {
		font-size: 12.5px;
	}

	.terminal-out {
		font-size: 12px;
		line-height: 1.55;
	}

	/* Taskbar: esconde ícones de tray, mantém relógio */
	.tray-icon {
		display: none;
	}

	.system-tray {
		padding: 0 6px;
		gap: 4px;
	}

	.start-button {
		font-size: 12px;
		padding: 0 10px;
		height: 30px;
	}

	.taskbar-item .label {
		display: none;
	}

	.taskbar-item {
		padding: 0 10px;
		height: 30px;
	}

	/* Esconde botão fixo de idioma — vai para a taskbar */
	.button {
		display: none;
	}

	/* Mostra o botão de idioma na taskbar */
	.tray-lang {
		display: flex;
		align-items: center;
	}

	/* Desktop icon */
	.desktop-icon {
		top: 14px;
		left: 14px;
		width: 64px;
	}

	.desktop-icon-img {
		font-size: 32px;
	}

	.desktop-icon-label {
		font-size: 10px;
	}

	/* ── Start Menu mobile: ocupa toda a largura ── */
	.start-menu {
		width: 100%;
		border-radius: 6px 6px 0 0;
		font-size: 14px;
	}

	.start-menu-header {
		padding: 10px 14px;
		background: #1a4a96;
		border-bottom: 1px solid #0a2a6a;
	}

	.start-menu-body {
		flex-direction: column;
		min-height: auto;
	}

	.sm-left {
		flex: none;
		width: 100%;
		padding: 4px 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	}

	.sm-right {
		flex: none;
		width: 100%;
		padding: 4px 0;
	}

	.sm-item {
		padding: 10px 16px; /* touch target generoso */
		font-size: 13.5px;
	}

	.start-menu-footer {
		background: #1e3e8a;
		padding: 8px 10px;
		justify-content: flex-end;
	}

	.sm-search {
		display: none;
	}

	.sm-power-group {
		flex-shrink: 0;
	}
}

/* ============================================================
   RESPONSIVO — TABLET (601px – 800px)
   ============================================================ */
@media (min-width: 601px) and (max-width: 800px) {
	body {
		padding-top: 16px;
		background-attachment: scroll;
	}

	.container {
		padding: 0 10px;
	}

	.window-content {
		padding: 16px;
	}

	.profile-section {
		padding: 16px;
		gap: 14px;
	}

	.profile-info h1 {
		font-size: 20px;
	}

	.profile-pic {
		width: 100px;
		height: 100px;
	}

	.terminal-box {
		padding: 16px 20px;
		font-size: 13.5px;
	}

	/* Start menu: ligeiramente mais estreito que desktop */
	.start-menu {
		width: min(430px, 100%);
	}
}

/* ===== UTILITÁRIO ===== */
.hidden {
  display: none !important;
}

/* ===== ÍCONE DE DESKTOP ===== */
.desktop-icon {
  position: fixed;
  top: 24px;
  left: 24px;
  width: 72px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  padding: 6px 4px;
  border-radius: 4px;
  transition: background 0.1s;
}

.desktop-icon:hover {
  background: rgba(100, 150, 255, 0.25);
}

.desktop-icon.selected {
  background: rgba(100, 150, 255, 0.35);
  outline: 1px dotted rgba(150, 190, 255, 0.8);
}

.desktop-icon-img {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(1px 2px 4px rgba(0,0,0,0.7));
}

.desktop-icon-label {
  margin-top: 5px;
  color: white;
  font-size: 11px;
  text-shadow:
    1px 1px 2px rgba(0,0,0,1),
    -1px -1px 2px rgba(0,0,0,0.8);
  word-break: break-all;
  line-height: 1.3;
}

/* ===== MENU INICIAR ===== */
.start-menu {
  position: fixed;
  bottom: 40px;
  left: 0;
  width: 430px;
  border: 1px solid #0831d9;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px -4px 20px rgba(0,0,0,0.6);
  z-index: 99997;
  font-size: 13px;
  overflow: hidden;
  font-family: "Segoe UI", "JetBrains Mono", sans-serif;
}

.start-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #1e5fa8 53%, #1a4a8a 53%);
  border-bottom: 1px solid #06288a;
}

.sm-avatar {
  width: 46px;
  height: 46px;
  border-radius: 3px;
  border: 2px solid rgba(255,255,255,0.5);
  object-fit: cover;
  flex-shrink: 0;
}

.sm-username {
  color: white;
  font-weight: bold;
  font-size: 15px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.start-menu-body {
  display: flex;
  min-height: 200px;
}

.sm-left {
  flex: 0 0 53%;
  padding: 6px 0;
  background: rgba(240, 244, 255, 0.98);
}

.sm-right {
  flex: 0 0 47%;
  padding: 6px 0;
  background: linear-gradient(180deg, #4278c8 0%, #1e4ea8 100%);
}

.sm-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  cursor: pointer;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.1s;
  font-size: 13px;
}

.sm-right .sm-item {
  color: white;
}

.sm-item:hover {
  background: rgba(70, 120, 220, 0.18);
}

.sm-right .sm-item:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sm-icon {
  font-size: 17px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sm-separator {
  height: 1px;
  background: rgba(0,0,0,0.12);
  margin: 5px 10px;
}

.sm-right .sm-separator {
  background: rgba(255,255,255,0.2);
}

.sm-all-programs {
  justify-content: space-between;
  font-size: 12px;
  color: #333;
  font-style: italic;
}

.start-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: linear-gradient(90deg, #c6d3ef 53%, #1640a0 53%);
  border-top: 1px solid rgba(0,0,0,0.2);
  gap: 8px;
}

.sm-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid #9ab;
  border-radius: 12px;
  padding: 4px 10px;
  width: 200px;
  flex-shrink: 0;
}

.sm-search input {
  border: none;
  outline: none;
  font-size: 11px;
  width: 100%;
  background: transparent;
  color: #333;
  font-family: inherit;
}

.sm-power-group {
  display: flex;
  gap: 4px;
}

.sm-power-btn {
  width: 30px;
  height: 30px;
  background: linear-gradient(180deg, #cc2200 0%, #8a1500 100%);
  border: 1px solid #600;
  border-radius: 4px;
  color: white;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.sm-power-btn:hover {
  background: linear-gradient(180deg, #ee3300 0%, #aa2000 100%);
}

/* ===== TASKBAR ITEM ACTIVE (minimizado) ===== */
.taskbar-item.active {
  background: linear-gradient(180deg, #1a4cb8 0%, #2563d9 50%, #3d7ce8 100%);
  box-shadow:
    inset 2px 2px 4px rgba(0, 0, 0, 0.4),
    1px 1px 2px rgba(0, 0, 0, 0.2);
  border-color: #4080ff;
}

/* ============================================================
   MOBILE — overrides das novas classes (start menu, desktop icon)
   Precisa vir DEPOIS das classes globais para vencer no cascade
   ============================================================ */
@media (max-width: 600px) {
  .start-menu {
    width: 100%;
    border-radius: 6px 6px 0 0;
    font-size: 14px;
  }

  .start-menu-header {
    background: #1a4a96;
    border-bottom: 1px solid #0a2a6a;
  }

  .start-menu-body {
    flex-direction: column;
    min-height: auto;
  }

  .sm-left {
    flex: none;
    width: 100%;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  .sm-right {
    flex: none;
    width: 100%;
    padding: 4px 0;
  }

  .sm-item {
    padding: 10px 16px;
    font-size: 13.5px;
  }

  .start-menu-footer {
    background: #1e3e8a;
    padding: 8px 10px;
    justify-content: flex-end;
  }

  /* Remove a barra de busca no mobile */
  .sm-search {
    display: none;
  }

  .sm-power-group {
    flex-shrink: 0;
  }
}
