/* ==========================================================================
   X6 AI TACTICAL — scoped mini-app UI inside hero device frame
   All classes prefixed .tac- to avoid global collisions.
   ========================================================================== */

.tac-app {
	--tac-teal: #00f2ff;
	--tac-orange: #ff8c00;
	--tac-bg: #020608;
	--tac-glass: rgba(13, 25, 35, 0.9);
	--tac-border: rgba(0, 242, 255, 0.2);
	--tac-text: #e2e8f0;
	--tac-dim: #94a3b8;
	--tac-void: #03a9f4;

	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	background: var(--tac-bg);
	color: var(--tac-text);
	font-family: 'Inter', sans-serif;
	overflow: hidden;
	border-radius: inherit;
}

/* --- Boot sequence --- */
.tac-boot {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 20px 14px;
	background: var(--tac-bg);
	transition: opacity .6s ease;
}
.tac-boot[data-hidden="true"] {
	opacity: 0;
	pointer-events: none;
}

.tac-boot::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.25) 2px, rgba(0,0,0,.25) 4px);
	pointer-events: none;
	opacity: .5;
}

.tac-boot__terminal {
	font-family: 'JetBrains Mono', monospace;
	font-size: 8px;
	line-height: 1.55;
	color: #64748b;
	max-height: 55vh;
	overflow: hidden;
	margin-bottom: 14px;
	position: relative;
	z-index: 1;
}
.tac-boot__terminal > div {
	animation: tac-fade .18s ease-out both;
}
.tac-boot__terminal .tac-term--teal  { color: #5eead4; }
.tac-boot__terminal .tac-term--bold  { color: #fff; font-weight: 700; letter-spacing: .02em; }
.tac-boot__terminal .tac-term--green { color: #4ade80; }
.tac-boot__terminal .tac-term--hl    { color: var(--tac-teal); }

@keyframes tac-fade {
	from { opacity: 0; transform: translateY(2px); }
	to { opacity: 1; transform: none; }
}

.tac-boot__progress-wrap { position: relative; z-index: 1; }
.tac-boot__progress {
	height: 2px;
	background: rgba(100, 116, 139, .15);
	border-radius: 100px;
	overflow: hidden;
}
.tac-boot__progress > div {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #0d9488, #5eead4);
	box-shadow: 0 0 8px rgba(20,184,166,.5);
	transition: width .3s ease;
}
.tac-boot__meta {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 7px;
	color: #475569;
	letter-spacing: .15em;
}
.tac-boot__meta span:last-child { color: var(--tac-teal); font-weight: 700; }

/* --- Main content --- */
.tac-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	opacity: 0;
	transition: opacity .7s ease;
}
.tac-content[data-visible="true"] { opacity: 1; }

.tac-content::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 30%, rgba(0,242,255,.04), transparent 60%);
	pointer-events: none;
}

/* Header */
.tac-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 9px 12px;
	border-bottom: 1px solid var(--tac-border);
	background: var(--tac-glass);
	backdrop-filter: blur(8px);
	position: relative;
	z-index: 2;
	flex-shrink: 0;
}
.tac-icon-btn {
	width: 24px; height: 24px;
	background: transparent;
	border: 1px solid var(--tac-border);
	border-radius: 6px;
	color: var(--tac-teal);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.tac-header__title { text-align: center; line-height: 1.2; }
.tac-header__title strong {
	display: block;
	font-size: 8.5px;
	font-weight: 800;
	letter-spacing: .22em;
	color: var(--tac-text);
}
.tac-header__title small {
	display: block;
	font-family: 'JetBrains Mono', monospace;
	font-size: 6.5px;
	color: var(--tac-teal);
	letter-spacing: .1em;
	margin-top: 2px;
}
.tac-live {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 7.5px;
	color: #4ade80;
	font-weight: 700;
	letter-spacing: .1em;
}
.tac-live i {
	width: 5px; height: 5px;
	background: #4ade80;
	border-radius: 50%;
	box-shadow: 0 0 6px #4ade80;
	animation: tac-pulse 1.4s infinite;
}
@keyframes tac-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .3; }
}

/* Main viz area */
.tac-main {
	flex: 1;
	padding: 10px 10px 6px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: relative;
	z-index: 2;
	overflow: hidden;
}

.tac-viz {
	position: relative;
	aspect-ratio: 1 / 1;
	background: #000;
	border: 1px solid var(--tac-border);
	border-radius: 10px;
	overflow: hidden;
}
.tac-viz canvas {
	width: 100% !important;
	height: 100% !important;
	display: block;
}
.tac-viz__label {
	position: absolute;
	top: 6px; right: 6px;
	padding: 2px 6px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 6.5px;
	font-weight: 700;
	letter-spacing: .08em;
	background: var(--tac-teal);
	color: #000;
	border-radius: 3px;
	z-index: 3;
}
.tac-viz__scanline {
	position: absolute;
	left: 0; right: 0;
	height: 2px;
	background: var(--tac-teal);
	box-shadow: 0 0 12px var(--tac-teal);
	top: 0;
	animation: tac-scan 3.5s linear infinite;
	z-index: 2;
}
@keyframes tac-scan {
	0% { top: 0%; opacity: .9; }
	50% { opacity: .4; }
	100% { top: 100%; opacity: 0; }
}

/* Stats grid */
.tac-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 5px;
}
.tac-chip {
	padding: 6px 4px;
	background: var(--tac-glass);
	border: 1px solid var(--tac-border);
	border-radius: 7px;
	text-align: center;
}
.tac-chip label {
	display: block;
	font-family: 'JetBrains Mono', monospace;
	font-size: 6px;
	color: var(--tac-dim);
	letter-spacing: .08em;
	margin-bottom: 2px;
}
.tac-chip b {
	display: block;
	font-size: 10px;
	color: var(--tac-text);
	font-weight: 700;
}

/* Bottom nav */
.tac-bottom {
	display: flex;
	justify-content: space-around;
	align-items: center;
	padding: 8px 0 10px;
	background: rgba(10, 20, 30, .95);
	border-top: 1px solid var(--tac-border);
	backdrop-filter: blur(8px);
	position: relative;
	z-index: 2;
	flex-shrink: 0;
}
.tac-nav-item {
	background: none;
	border: none;
	color: var(--tac-dim);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 2px 6px;
	transition: color .2s;
}
.tac-nav-item span {
	font-family: 'JetBrains Mono', monospace;
	font-size: 7px;
	font-weight: 700;
	letter-spacing: .06em;
}
.tac-nav-item.is-active {
	color: var(--tac-teal);
}
.tac-nav-item:hover:not(.is-active) { color: var(--tac-text); }
