/* TikTok Unfollowers Tracker — scoped styles.
   Everything is namespaced under #tkut-app so it won't fight the host theme. */

#tkut-app {
	--tkut-ink: #0e1116;
	--tkut-text: #1c2530;
	--tkut-muted: #64727f;
	--tkut-surface: #ffffff;
	--tkut-bg: #f3f5f8;
	--tkut-border: #e4e9ef;
	--tkut-accent: #00d2c2;
	--tkut-accent-2: #ff2e74;
	--tkut-success: #128a52;
	--tkut-danger: #e11d48;
	--tkut-radius: 16px;
	--tkut-shadow: 0 1px 2px rgba(16, 23, 33, .04), 0 12px 32px -12px rgba(16, 23, 33, .18);

	max-width: 780px;
	margin: 0 auto;
	padding: 4px;
	color: var(--tkut-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-align: left;
}

#tkut-app *,
#tkut-app *::before,
#tkut-app *::after {
	box-sizing: border-box;
}

#tkut-app .tkut-card {
	background: var(--tkut-surface);
	border: 1px solid var(--tkut-border);
	border-radius: var(--tkut-radius);
	box-shadow: var(--tkut-shadow);
	padding: 28px;
	margin-bottom: 18px;
}

/* ---- Intro ---- */
#tkut-app .tkut-badge {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--tkut-ink);
	background: linear-gradient(135deg, rgba(0, 210, 194, .16), rgba(255, 46, 116, .16));
	border: 1px solid var(--tkut-border);
	padding: 6px 12px;
	border-radius: 999px;
	margin-bottom: 14px;
}

#tkut-app .tkut-title {
	font-size: clamp(26px, 5vw, 34px);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--tkut-ink);
	margin: 0 0 8px;
}

#tkut-app .tkut-sub {
	color: var(--tkut-muted);
	margin: 0 0 22px;
	font-size: 16px;
}

#tkut-app .tkut-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

#tkut-app .tkut-steps li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

#tkut-app .tkut-steps li span {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 14px;
	color: #fff;
	background: linear-gradient(135deg, var(--tkut-accent), var(--tkut-accent-2));
}

#tkut-app .tkut-steps li strong {
	display: block;
	color: var(--tkut-ink);
	font-size: 15px;
}

#tkut-app .tkut-steps li p {
	margin: 2px 0 0;
	font-size: 14px;
	color: var(--tkut-muted);
}

#tkut-app .tkut-steps em {
	font-style: normal;
	font-weight: 600;
	color: var(--tkut-text);
}

/* ---- Dropzone ---- */
#tkut-app .tkut-dropzone {
	border: 2px dashed var(--tkut-border);
	background: var(--tkut-bg);
	cursor: pointer;
	text-align: center;
	transition: border-color .18s ease, background .18s ease, transform .18s ease;
	outline: none;
}

#tkut-app .tkut-dropzone:hover,
#tkut-app .tkut-dropzone:focus-visible,
#tkut-app .tkut-dropzone.is-drag {
	border-color: var(--tkut-accent);
	background: #eefcfa;
}

#tkut-app .tkut-dropzone.is-drag {
	transform: scale(1.005);
}

#tkut-app .tkut-drop-icon {
	font-size: 40px;
	line-height: 1;
	background: linear-gradient(135deg, var(--tkut-accent), var(--tkut-accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	margin-bottom: 8px;
}

#tkut-app .tkut-drop-main {
	font-weight: 700;
	font-size: 17px;
	color: var(--tkut-ink);
	margin: 0 0 2px;
}

#tkut-app .tkut-drop-sub {
	margin: 0 0 10px;
	color: var(--tkut-muted);
}

#tkut-app .tkut-link {
	color: var(--tkut-accent-2);
	font-weight: 600;
	text-decoration: underline;
}

#tkut-app .tkut-drop-note {
	font-size: 12.5px;
	color: var(--tkut-muted);
	margin: 0;
}

#tkut-app .tkut-drop-note code {
	background: #fff;
	border: 1px solid var(--tkut-border);
	border-radius: 5px;
	padding: 1px 5px;
	font-size: 12px;
}

/* ---- Status / errors ---- */
#tkut-app .tkut-status {
	border-radius: var(--tkut-radius);
	padding: 16px 18px;
	margin-bottom: 18px;
	font-size: 14.5px;
	border: 1px solid var(--tkut-border);
	background: var(--tkut-surface);
}

#tkut-app .tkut-status.is-loading {
	color: var(--tkut-text);
}

#tkut-app .tkut-status.is-error {
	border-color: #f6cdd6;
	background: #fff5f7;
	color: #9f1239;
}

#tkut-app .tkut-status .tkut-spinner {
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 2px solid var(--tkut-border);
	border-top-color: var(--tkut-accent);
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: -2px;
	animation: tkut-spin .7s linear infinite;
}

@keyframes tkut-spin {
	to { transform: rotate(360deg); }
}

/* ---- Summary cards ---- */
#tkut-app .tkut-summary {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}

#tkut-app .tkut-stat {
	background: var(--tkut-surface);
	border: 1px solid var(--tkut-border);
	border-radius: 14px;
	padding: 16px;
	text-align: center;
}

#tkut-app .tkut-stat b {
	display: block;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--tkut-ink);
	line-height: 1.1;
}

#tkut-app .tkut-stat small {
	display: block;
	margin-top: 4px;
	font-size: 12.5px;
	color: var(--tkut-muted);
}

#tkut-app .tkut-stat.is-alert b { color: var(--tkut-danger); }

/* ---- Diff (snapshot comparison) ---- */
#tkut-app .tkut-diff {
	border: 1px solid var(--tkut-border);
	border-radius: 14px;
	padding: 16px 18px;
	margin-bottom: 16px;
	background: linear-gradient(135deg, rgba(0, 210, 194, .06), rgba(255, 46, 116, .06));
	font-size: 14.5px;
}

#tkut-app .tkut-diff h4 {
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--tkut-ink);
}

#tkut-app .tkut-diff .tkut-diff-row { margin: 4px 0; }
#tkut-app .tkut-diff .tkut-down { color: var(--tkut-danger); font-weight: 600; }
#tkut-app .tkut-diff .tkut-up { color: var(--tkut-success); font-weight: 600; }

/* ---- Tabs ---- */
#tkut-app .tkut-tabs {
	display: flex;
	gap: 6px;
	background: var(--tkut-bg);
	border: 1px solid var(--tkut-border);
	border-radius: 12px;
	padding: 5px;
	margin-bottom: 14px;
}

#tkut-app .tkut-tab {
	flex: 1;
	border: 0;
	background: transparent;
	padding: 9px 8px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--tkut-muted);
	cursor: pointer;
	font-family: inherit;
	transition: background .15s ease, color .15s ease;
}

#tkut-app .tkut-tab.is-active {
	background: var(--tkut-surface);
	color: var(--tkut-ink);
	box-shadow: 0 1px 3px rgba(16, 23, 33, .1);
}

/* ---- Toolbar ---- */
#tkut-app .tkut-toolbar {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
}

#tkut-app .tkut-search {
	flex: 1;
	border: 1px solid var(--tkut-border);
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 14.5px;
	font-family: inherit;
	color: var(--tkut-text);
	background: var(--tkut-surface);
}

#tkut-app .tkut-search:focus {
	outline: none;
	border-color: var(--tkut-accent);
	box-shadow: 0 0 0 3px rgba(0, 210, 194, .15);
}

#tkut-app .tkut-btn-ghost {
	border: 1px solid var(--tkut-border);
	background: var(--tkut-surface);
	color: var(--tkut-text);
	font-weight: 600;
	font-size: 13.5px;
	font-family: inherit;
	padding: 10px 14px;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
	white-space: nowrap;
}

#tkut-app .tkut-btn-ghost:hover {
	border-color: var(--tkut-accent-2);
	color: var(--tkut-accent-2);
}

/* ---- List ---- */
#tkut-app .tkut-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--tkut-border);
	border-radius: 12px;
	overflow: hidden;
	max-height: 460px;
	overflow-y: auto;
}

#tkut-app .tkut-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 15px;
	border-bottom: 1px solid var(--tkut-border);
}

#tkut-app .tkut-list li:last-child { border-bottom: 0; }
#tkut-app .tkut-list li:nth-child(even) { background: #fafbfc; }

#tkut-app .tkut-uname {
	font-weight: 600;
	color: var(--tkut-ink);
	word-break: break-all;
}

#tkut-app .tkut-open {
	font-size: 13px;
	font-weight: 600;
	color: var(--tkut-accent-2);
	text-decoration: none;
	white-space: nowrap;
}

#tkut-app .tkut-open:hover { text-decoration: underline; }

#tkut-app .tkut-empty {
	text-align: center;
	color: var(--tkut-muted);
	padding: 28px 0;
	font-size: 15px;
}

/* ---- Snapshot + reset ---- */
#tkut-app .tkut-snapshot {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 16px;
}

#tkut-app .tkut-snap-note {
	font-size: 13px;
	color: var(--tkut-muted);
}

#tkut-app .tkut-reset {
	display: block;
	width: 100%;
	margin-top: 14px;
}

#tkut-app .tkut-footnote {
	text-align: center;
	font-size: 11.5px;
	color: var(--tkut-muted);
	margin: 6px 0 0;
}

/* ---- Responsive ---- */
@media (max-width: 540px) {
	#tkut-app .tkut-card { padding: 20px; }
	#tkut-app .tkut-summary { grid-template-columns: 1fr; }
	#tkut-app .tkut-tab { font-size: 12px; padding: 9px 4px; }
	#tkut-app .tkut-toolbar { flex-direction: column; }
}
