/* =========================================
   SecretForge — style.css
   Matching QR Forge visual language
   ========================================= */

:root {
	--bg: #0d0f14;
	--bg-panel: #13161d;
	--bg-panel-alt: #181b24;
	--bg-input: #1c2030;
	--bg-input-hover: #222640;
	--border: #252a3a;
	--border-focus: #3b82f6;
	--text: #e8eaf2;
	--text-dim: #8890a8;
	--text-muted: #555e78;
	--accent: #6ee7b7;
	--accent-dim: rgba(0, 200, 150, 0.08);
	--accent2: #3b82f6;
	--accent2-dim: rgba(79, 142, 247, 0.12);
	--accent3: #f59e0b;
	--accent-red: #f87171;
	--accent-orange: #fb923c;
	--accent-yellow: #fbbf24;
	--accent-green: #34d399;
	--radius: 10px;
	--radius-sm: 6px;
	--transition: 0.18s ease;
	--font-display: "Syne", sans-serif;
	--font-body: "DM Sans", sans-serif;
	--font-mono: "JetBrains Mono", monospace;
	--shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

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

html {
	scroll-behavior: smooth;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-display);
	font-size: 15px;
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ---- Background Effects ---- */

.bg-grid {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
	position: fixed;
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
	filter: blur(120px);
	opacity: 0.14;
}
.bg-glow--1 {
	width: 600px;
	height: 600px;
	background: var(--accent);
	top: -200px;
	right: -150px;
}
.bg-glow--2 {
	width: 500px;
	height: 500px;
	background: var(--accent2);
	bottom: 20%;
	left: -200px;
}

/* ── Header ─────────────────────────────── */
.header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(10, 10, 10, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
}

.header-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 28px;
	height: 58px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -0.02em;
	color: var(--text);
}

.header-nav {
	display: flex;
	align-items: center;
	gap: 14px;
}
.header-nav a {
	text-decoration: none;
	margin-left: 15px;
}

.nav-tag {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}
.nav__logo-bracket {
	color: var(--accent);
}

.btn-header {
	background: var(--accent);
	color: #0a0a0a;
	border: none;
	border-radius: var(--radius-sm);
	padding: 7px 16px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition:
		background 0.15s,
		transform 0.1s;
}
.btn-header:hover {
	background: var(--accent-dark);
	transform: translateY(-1px);
}
.btn-header:active {
	transform: scale(0.97);
}

/* ── Main ────────────────────────────────── */
.main {
	flex: 1;
	padding: 32px 24px;
}
.container {
	max-width: 1200px;
	margin: 0 auto;
}

/* ── Tabs ────────────────────────────────── */
.tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--border);
	padding-bottom: 0;
}
.tab {
	background: none;
	border: none;
	color: var(--text-dim);
	cursor: pointer;
	padding: 10px 20px;
	font-family: var(--font-display);
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: var(--transition);
	white-space: nowrap;
}
.tab:hover {
	color: var(--text);
}
.tab.active {
	color: var(--accent);
	border-bottom-color: var(--accent);
}
.tab-num {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 600;
	color: var(--text-muted);
	letter-spacing: 0.5px;
}
.tab.active .tab-num {
	color: var(--accent);
	opacity: 0.7;
}

/* ── Workspace ───────────────────────────── */
.workspace {
	display: grid;
	grid-template-columns: 420px 1fr;
	gap: 20px;
	align-items: start;
}

/* ── Panels ──────────────────────────────── */
.panel {
	background: var(--bg-panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	z-index: 1;
}
.panel-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 20px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--border);
}

/* ── Tab Content ─────────────────────────── */
.tab-content {
	display: none;
}
.tab-content.active {
	display: block;
}

/* ── Field Groups ────────────────────────── */
.field-group {
	margin-bottom: 20px;
}
.field-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--text-dim);
	margin-bottom: 8px;
}
.field-value {
	font-family: var(--font-mono);
	color: var(--accent);
	font-size: 13px;
	text-transform: none;
	letter-spacing: 0;
}

/* ── Slider ──────────────────────────────── */
.slider {
	width: 100%;
	-webkit-appearance: none;
	appearance: none;
	height: 4px;
	border-radius: 2px;
	background: var(--bg-input);
	outline: none;
	cursor: pointer;
}
.slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--accent);
	cursor: pointer;
	box-shadow: 0 0 8px rgba(110, 231, 183, 0.4);
	transition: var(--transition);
}
.slider::-webkit-slider-thumb:hover {
	transform: scale(1.2);
}
.slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--accent);
	cursor: pointer;
	border: none;
}
.range-hints {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--text-muted);
	margin-top: 4px;
	font-family: var(--font-mono);
}

/* ── Checkboxes ──────────────────────────── */
.checkbox-grid {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.check-item {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	color: var(--text-dim);
	padding: 7px 10px;
	border-radius: var(--radius-sm);
	transition: var(--transition);
}
.check-item:hover {
	background: var(--bg-input);
	color: var(--text);
}
.check-item input[type="checkbox"] {
	display: none;
}
.checkmark {
	width: 16px;
	height: 16px;
	border: 1.5px solid var(--border);
	border-radius: 4px;
	flex-shrink: 0;
	transition: var(--transition);
	display: flex;
	align-items: center;
	justify-content: center;
}
.check-item input:checked ~ .checkmark {
	background: var(--accent);
	border-color: var(--accent);
}
.check-item input:checked ~ .checkmark::after {
	content: "";
	width: 9px;
	height: 5px;
	border-left: 2px solid #0d0f14;
	border-bottom: 2px solid #0d0f14;
	transform: rotate(-45deg) translateY(-1px);
	display: block;
}
.check-item input:checked + .checkmark + span {
	color: var(--text);
}

/* ── Text Input ──────────────────────────── */
.text-input {
	width: 100%;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 13px;
	padding: 9px 12px;
	outline: none;
	transition: var(--transition);
}
.text-input:focus {
	border-color: var(--border-focus);
	background: var(--bg-input-hover);
}
.text-input::placeholder {
	color: var(--text-muted);
}

.text-area {
	width: 100%;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 13px;
	padding: 10px 12px;
	outline: none;
	resize: vertical;
	transition: var(--transition);
}
.text-area:focus {
	border-color: var(--border-focus);
}
.text-area::placeholder {
	color: var(--text-muted);
}

.num-input {
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 13px;
	padding: 7px 10px;
	outline: none;
	width: 60px;
	text-align: center;
	transition: var(--transition);
}
.num-input:focus {
	border-color: var(--border-focus);
}

/* ── Rows ────────────────────────────────── */
.row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.mini-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}
.mini-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
}
.mini-field label {
	font-size: 10px;
	color: var(--text-muted);
	text-align: center;
}

/* ── Radio Items ─────────────────────────── */
.radio-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.radio-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 10px 12px;
	cursor: pointer;
	transition: var(--transition);
}
.radio-item:hover {
	border-color: var(--accent2);
}
.radio-item.active-radio {
	border-color: var(--accent);
	background: rgba(110, 231, 183, 0.06);
}
.radio-item input[type="radio"] {
	display: none;
}
.radio-dot {
	width: 14px;
	height: 14px;
	border: 2px solid var(--border);
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 3px;
	transition: var(--transition);
}
.radio-item.active-radio .radio-dot {
	border-color: var(--accent);
	background: var(--accent);
	box-shadow: 0 0 8px rgba(110, 231, 183, 0.4);
}
.radio-item strong {
	font-size: 13px;
	font-weight: 600;
	display: block;
}
.radio-item small {
	font-size: 11px;
	color: var(--text-muted);
}

/* ── Radio Pills ─────────────────────────── */
.radio-pills-row,
.sep-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.radio-pill {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: 100px;
	padding: 5px 14px;
	font-size: 13px;
	cursor: pointer;
	transition: var(--transition);
	color: var(--text-dim);
}
.radio-pill:hover {
	border-color: var(--accent2);
	color: var(--text);
}
.radio-pill input[type="radio"] {
	display: none;
}
.radio-pill:has(input:checked) {
	border-color: var(--accent);
	background: rgba(110, 231, 183, 0.08);
	color: var(--accent);
}

/* ── Presets ─────────────────────────────── */
.preset-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.preset-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	cursor: pointer;
	transition: var(--transition);
	text-align: left;
	width: 100%;
	color: var(--text);
}
.preset-btn:hover {
	border-color: var(--accent2);
	background: var(--bg-input-hover);
}
.preset-btn.active {
	border-color: var(--accent);
	background: rgba(110, 231, 183, 0.07);
}
.preset-icon {
	font-size: 20px;
}
.preset-btn strong {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
}
.preset-btn small {
	font-size: 11.5px;
	color: var(--text-muted);
}

/* ── Generate Button ─────────────────────── */
.btn-generate {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, rgba(110, 231, 183, 0.15), rgba(59, 130, 246, 0.15));
	border: 1px solid var(--accent);
	border-radius: var(--radius-sm);
	color: var(--accent);
	font-family: var(--font-display);
	font-size: 14.5px;
	font-weight: 600;
	padding: 12px;
	cursor: pointer;
	transition: var(--transition);
	margin-top: 8px;
}
.btn-generate:hover {
	background: linear-gradient(135deg, rgba(110, 231, 183, 0.25), rgba(59, 130, 246, 0.25));
	box-shadow: 0 0 20px rgba(110, 231, 183, 0.15);
	transform: translateY(-1px);
}
.btn-generate:active {
	transform: translateY(0);
}

/* ── Output Panel ────────────────────────── */
.output-panel {
	position: sticky;
	top: 80px;
}
.output-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--border);
}
.output-actions {
	display: flex;
	gap: 6px;
}
.icon-btn {
	display: flex;
	align-items: center;
	gap: 5px;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text-dim);
	font-size: 12.5px;
	padding: 6px 12px;
	cursor: pointer;
	transition: var(--transition);
	font-family: var(--font-display);
}
.icon-btn:hover {
	border-color: var(--accent2);
	color: var(--text);
}

/* ── Strength Badge ──────────────────────── */
.strength-badge-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.strength-badge {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 4px 12px;
	border-radius: 100px;
	background: var(--bg-input);
	border: 1px solid var(--border);
	font-size: 12.5px;
	font-weight: 600;
	transition: var(--transition);
}
.badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--text-muted);
	transition: var(--transition);
}
.strength-badge.weak {
	border-color: var(--accent-red);
}
.strength-badge.weak .badge-dot {
	background: var(--accent-red);
	box-shadow: 0 0 6px var(--accent-red);
}
.strength-badge.fair {
	border-color: var(--accent-orange);
}
.strength-badge.fair .badge-dot {
	background: var(--accent-orange);
	box-shadow: 0 0 6px var(--accent-orange);
}
.strength-badge.good {
	border-color: var(--accent-yellow);
}
.strength-badge.good .badge-dot {
	background: var(--accent-yellow);
	box-shadow: 0 0 6px var(--accent-yellow);
}
.strength-badge.strong {
	border-color: var(--accent-green);
}
.strength-badge.strong .badge-dot {
	background: var(--accent-green);
	box-shadow: 0 0 6px var(--accent-green);
}
.strength-badge.very-strong {
	border-color: var(--accent);
}
.strength-badge.very-strong .badge-dot {
	background: var(--accent);
	box-shadow: 0 0 8px var(--accent);
}
.entropy-info {
	font-size: 12px;
	color: var(--text-muted);
	font-family: var(--font-mono);
}

/* ── Output Box ──────────────────────────── */
.output-box {
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	min-height: 120px;
	position: relative;
	overflow: hidden;
	transition: var(--transition);
}
.output-box:has(.output-text:not([style*="display:none"])) {
	border-color: rgba(110, 231, 183, 0.3);
}
.output-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 32px;
	color: var(--text-muted);
	font-size: 13px;
	text-align: center;
}
.output-text {
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--accent);
	padding: 16px;
	white-space: pre-wrap;
	word-break: break-all;
	line-height: 1.8;
	animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── History ─────────────────────────────── */
.history-wrap {
	margin-top: 20px;
}
.history-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.text-btn {
	background: none;
	border: none;
	color: var(--text-muted);
	font-size: 12px;
	cursor: pointer;
	transition: var(--transition);
	font-family: var(--font-display);
}
.text-btn:hover {
	color: var(--accent-red);
}
.history-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 180px;
	overflow-y: auto;
}
.history-list::-webkit-scrollbar {
	width: 4px;
}
.history-list::-webkit-scrollbar-track {
	background: transparent;
}
.history-list::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 2px;
}
.history-empty {
	font-size: 12px;
	color: var(--text-muted);
	padding: 8px 0;
	text-align: center;
}
.history-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 10px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
}
.history-item:hover {
	border-color: var(--accent2);
}
.history-val {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-dim);
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.history-type {
	font-size: 10px;
	color: var(--text-muted);
	background: var(--bg-input);
	padding: 2px 7px;
	border-radius: 100px;
	white-space: nowrap;
}

/* ── Info Card ───────────────────────────── */
.info-card {
	margin-top: 16px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: rgba(59, 130, 246, 0.06);
	border: 1px solid rgba(59, 130, 246, 0.2);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	font-size: 12.5px;
	color: var(--text-dim);
}
.info-icon {
	font-size: 16px;
	flex-shrink: 0;
}

/* ── Analyze ─────────────────────────────── */
.analyze-results {
	margin-top: 20px;
	animation: fadeIn 0.2s ease;
}
.strength-bar-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}
.strength-bar {
	flex: 1;
	height: 8px;
	background: var(--bg-input);
	border-radius: 4px;
	overflow: hidden;
}
.strength-fill {
	height: 100%;
	border-radius: 4px;
	transition:
		width 0.5s ease,
		background 0.3s ease;
	width: 0;
}
.strength-label {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.stat-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	margin-bottom: 12px;
}
.stat-item {
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 10px 12px;
}
.stat-item .stat-val {
	font-family: var(--font-mono);
	font-size: 18px;
	font-weight: 700;
	color: var(--accent);
}
.stat-item .stat-key {
	font-size: 11px;
	color: var(--text-muted);
	margin-top: 2px;
}
.check-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.check-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--text-dim);
}
.check-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}
.check-dot.pass {
	background: var(--accent-green);
}
.check-dot.fail {
	background: var(--accent-red);
}

/* ── Toast ───────────────────────────────── */
.toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(80px);
	background: var(--bg-panel);
	border: 1px solid var(--accent);
	color: var(--accent);
	border-radius: var(--radius-sm);
	padding: 10px 20px;
	font-size: 13.5px;
	font-weight: 500;
	z-index: 1000;
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
	white-space: nowrap;
}
.toast.show {
	transform: translateX(-50%) translateY(0);
}

/* ── Footer ──────────────────────────────── */
.footer {
	background: var(--surface-2);
	border-top: 1px solid var(--border);
	padding: 20px 16px;
	text-align: center;
	z-index: 10;
}

.footer-inner {
	max-width: var(--content-width);
	margin: 0 auto;
}
.footer-inner span {
	font-size: 12px;
	color: var(--text-muted);
}
.footer-inner a {
	color: var(--accent);
	text-decoration: none;
}
.footer-inner a:hover {
	text-decoration: underline;
}
.footer__logo {
	font-family: var(--font-mono);
	font-size: 1rem;
	color: var(--text);
	margin-bottom: 0.75rem;
}
.footer__logo a {
	color: var(--text);
	text-decoration: none;
	cursor: pointer;
}
.footer__logo a:hover {
	text-decoration: underline;
}

.cursor-glow {
	position: fixed;
	left: 0;
	top: 0;
	width: 260px;
	height: 260px;
	pointer-events: none;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0, 200, 150, 0.22) 0%, transparent 60%);
	filter: blur(18px);
	opacity: 0;
	transform: translate(-50%, -50%);
	transition: opacity 0.24s ease;
	mix-blend-mode: screen;
	z-index: 9999;
}

/* ── Scrollbar ───────────────────────────── */
::-webkit-scrollbar {
	width: 6px;
}
::-webkit-scrollbar-track {
	background: var(--bg);
}
::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 3px;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 900px) {
	.workspace {
		grid-template-columns: 1fr;
	}
	.output-panel {
		position: static;
	}
	.tabs {
		overflow-x: auto;
	}
	.tab {
		padding: 10px 14px;
	}
	.radio-grid {
		grid-template-columns: 1fr;
	}
	.mini-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 480px) {
	.header-inner {
		padding: 0 16px;
	}
	.main {
		padding: 20px 16px;
	}
	.panel {
		padding: 16px;
	}
	.row-2 {
		grid-template-columns: 1fr;
	}
}
