/* Login page — page-specific styles */

body {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	overflow-x: hidden;
}

/* Container */
.login-container {
	position: relative;
	z-index: 1;
	width: 420px;
	max-width: calc(100vw - 32px);
	background: rgba(12, 12, 20, 0.85);
	border: 1px solid rgba(0, 255, 100, 0.1);
	border-radius: 20px;
	backdrop-filter: blur(40px);
	-webkit-backdrop-filter: blur(40px);
	box-shadow:
		0 0 0 1px rgba(0, 255, 100, 0.05),
		0 4px 24px rgba(0, 0, 0, 0.4),
		0 24px 80px rgba(0, 0, 0, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.04);
	overflow: hidden;
}
.login-container::before {
	content: '';
	position: absolute;
	top: 0; left: 10%; right: 10%;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(0, 255, 100, 0.4), transparent);
}

/* Status bar */
.status-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 24px;
	background: rgba(0, 0, 0, 0.3);
	border-bottom: 1px solid rgba(0, 255, 100, 0.06);
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 1.5px;
	color: rgba(0, 255, 100, 0.4);
	animation: fadeSlideIn 0.6s ease both;
}
.status-dot {
	width: 6px; height: 6px;
	background: var(--green);
	border-radius: 50%;
	box-shadow: 0 0 8px rgba(0, 255, 100, 0.6);
	animation: statusPulse 2s ease-in-out infinite;
}
.status-text { flex: 1; }
.status-proto {
	padding: 2px 6px;
	background: rgba(0, 255, 100, 0.08);
	border: 1px solid rgba(0, 255, 100, 0.12);
	border-radius: 4px;
	font-size: 9px;
}

/* Logo */
.logo {
	text-align: center;
	padding: 36px 40px 0;
	animation: fadeSlideIn 0.6s ease both;
}
.logo-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px; height: 64px;
	margin-bottom: 16px;
	color: var(--green);
	opacity: 0.7;
	animation: iconFloat 4s ease-in-out infinite;
}
@keyframes iconFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}
.logo h1 {
	font-family: var(--mono);
	font-size: 30px;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 0 20px rgba(0, 255, 100, 0.3), 0 0 60px rgba(0, 255, 100, 0.1);
	letter-spacing: 4px;
}
.logo .dot {
	display: inline-block;
	width: 8px; height: 8px;
	background: var(--green);
	border-radius: 50%;
	margin-left: 6px;
	animation: statusPulse 2s ease-in-out infinite;
	box-shadow: 0 0 12px rgba(0, 255, 100, 0.5);
	vertical-align: middle;
}
.logo .subtitle {
	font-family: var(--mono);
	font-size: 10px;
	color: rgba(0, 255, 100, 0.5);
	letter-spacing: 6px;
	text-transform: uppercase;
	margin-top: 10px;
}

/* Terminal */
.bot-terminal {
	margin: 28px 24px 0;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(0, 255, 100, 0.08);
	border-radius: 12px;
	overflow: hidden;
	animation: fadeSlideIn 0.6s ease both;
}
.term-header {
	display: flex; align-items: center; gap: 6px;
	padding: 8px 14px; border-bottom: 1px solid rgba(0,255,100,0.04);
	font-family: var(--mono); font-size: 9px; color: var(--text-dim);
	letter-spacing: 1px;
}
.term-dot { width: 8px; height: 8px; border-radius: 50%; }
.term-dot-r { background: #ff5f57; }
.term-dot-y { background: #ffbd2e; }
.term-dot-g { background: #28c840; }
.term-title { margin-left: auto; opacity: 0.5; }
.term-body {
	min-height: 68px; padding: 14px 18px;
	font-family: var(--mono); font-size: 12px; color: var(--text);
}
.bot-line {
	opacity: 0;
	overflow: hidden;
	transform: translateX(-4px);
	transition: opacity 0.2s, transform 0.2s;
	word-break: break-word;
}
.bot-line.visible { opacity: 1; transform: translateX(0); }
.bot-line .prompt {
	color: rgba(0, 212, 255, 0.5);
	margin-right: 8px;
	user-select: none;
}
.bot-cursor {
	display: inline-block;
	width: 7px; height: 15px;
	background: rgba(0, 255, 100, 0.7);
	vertical-align: text-bottom;
	animation: blink 1s step-end infinite;
	border-radius: 1px;
}
@keyframes blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

/* Form */
form { padding: 24px 24px 0; }
.form-group { animation: fadeSlideIn 0.6s ease both; }

/* Password toggle */
.pass-toggle {
	position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; border-radius: 6px;
	background: transparent; border: none; cursor: pointer;
	color: var(--text-dim); transition: color 0.2s;
}
.pass-toggle:hover { color: var(--green); }
#passInput { padding-right: 86px; }

/* Caps lock badge */
.caps-badge {
	position: absolute; right: 46px; top: 50%; transform: translateY(-50%);
	padding: 3px 6px;
	background: rgba(255, 189, 46, 0.12);
	border: 1px solid rgba(255, 189, 46, 0.35);
	border-radius: 4px;
	color: #ffbd2e;
	font-family: var(--mono);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 1px;
	pointer-events: none;
	animation: fadeSlideIn 0.2s ease;
}

/* Trust this device */
.trust-row {
	display: flex; align-items: center; gap: 10px;
	margin: -2px 0 16px;
	padding: 2px;
	cursor: pointer;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--text-dim);
	letter-spacing: 0.5px;
	user-select: none;
	animation: fadeSlideIn 0.6s ease both;
}
.trust-row input { position: absolute; opacity: 0; pointer-events: none; }
.trust-check {
	flex-shrink: 0;
	display: inline-flex; align-items: center; justify-content: center;
	width: 16px; height: 16px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(0, 255, 100, 0.2);
	border-radius: 4px;
	color: transparent;
	transition: all 0.2s ease;
}
.trust-check svg { transition: transform 0.15s ease; transform: scale(0.6); }
.trust-row:hover .trust-check { border-color: rgba(0, 255, 100, 0.4); }
.trust-row input:focus-visible ~ .trust-check { outline: 2px solid var(--green); outline-offset: 2px; }
.trust-row input:checked ~ .trust-check {
	background: rgba(0, 255, 100, 0.15);
	border-color: rgba(0, 255, 100, 0.5);
	color: var(--green);
}
.trust-row input:checked ~ .trust-check svg { transform: scale(1); }
.trust-sub { color: rgba(255, 255, 255, 0.2); margin-left: 2px; }

/* Login button */
.btn-login {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 15px 20px;
	background: linear-gradient(135deg, rgba(0, 255, 100, 0.12), rgba(0, 255, 100, 0.04));
	border: 1px solid rgba(0, 255, 100, 0.2);
	border-radius: 12px;
	color: var(--green);
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.35s ease;
	margin-top: 6px;
	overflow: hidden;
	animation: fadeSlideIn 0.6s ease both;
}
.btn-login::before {
	content: '';
	position: absolute;
	top: 0; left: -100%;
	width: 100%; height: 100%;
	background: linear-gradient(90deg, transparent, rgba(0, 255, 100, 0.08), transparent);
	transition: left 0.5s ease;
}
.btn-login:hover::before { left: 100%; }
.btn-login:hover {
	background: linear-gradient(135deg, rgba(0, 255, 100, 0.2), rgba(0, 255, 100, 0.08));
	border-color: rgba(0, 255, 100, 0.4);
	box-shadow: 0 0 30px rgba(0, 255, 100, 0.1), 0 0 60px rgba(0, 255, 100, 0.05);
	transform: translateY(-1px);
}
.btn-login:active {
	transform: translateY(0);
	box-shadow: 0 0 15px rgba(0, 255, 100, 0.08);
}
.btn-login:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn-arrow { transition: transform 0.3s ease; }
.btn-login:hover .btn-arrow { transform: translateX(3px); }
.btn-login.loading { pointer-events: none; opacity: 0.7; }
.btn-loader svg { animation: spin 0.8s linear infinite; }

.login-container .footer-meta { animation: fadeSlideIn 0.6s ease both; }

/* Light theme */
[data-theme="light"] .login-container {
	background: rgba(255, 255, 255, 0.9);
	border-color: rgba(0, 80, 40, 0.1);
	box-shadow: 0 0 0 1px rgba(0,80,40,0.05), 0 4px 24px rgba(0,0,0,0.06), 0 24px 80px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}
[data-theme="light"] .login-container::before { background: linear-gradient(90deg, transparent, rgba(0,168,67,0.3), transparent); }
[data-theme="light"] .status-bar { background: rgba(0,0,0,0.02); border-bottom-color: rgba(0,80,40,0.06); color: rgba(0,120,60,0.4); }
[data-theme="light"] .status-dot { background: #00a843; box-shadow: 0 0 6px rgba(0,168,67,0.5); }
[data-theme="light"] .status-proto { background: rgba(0,168,67,0.06); border-color: rgba(0,168,67,0.1); }
[data-theme="light"] .logo-icon { color: #00a843; }
[data-theme="light"] .logo h1 { color: #1a1a2e; text-shadow: none; }
[data-theme="light"] .logo .subtitle { color: rgba(0,168,67,0.6); }
[data-theme="light"] .logo .dot { background: #00a843; box-shadow: 0 0 8px rgba(0,168,67,0.4); }
[data-theme="light"] .term-header { border-bottom-color: rgba(0,80,40,0.04); }
[data-theme="light"] .bot-terminal { background: rgba(0,80,40,0.03); border-color: rgba(0,80,40,0.08); }
[data-theme="light"] .bot-line .prompt { color: rgba(0,150,200,0.4); }
[data-theme="light"] .bot-cursor { background: rgba(0,120,60,0.5); }
[data-theme="light"] .pass-toggle:hover { color: #00a843; }
[data-theme="light"] .caps-badge {
	background: rgba(200, 130, 0, 0.08);
	border-color: rgba(200, 130, 0, 0.3);
	color: #b07b00;
}
[data-theme="light"] .trust-check { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 168, 67, 0.2); }
[data-theme="light"] .trust-row:hover .trust-check { border-color: rgba(0, 168, 67, 0.45); }
[data-theme="light"] .trust-row input:checked ~ .trust-check { background: rgba(0, 168, 67, 0.12); border-color: rgba(0, 168, 67, 0.55); color: #00a843; }
[data-theme="light"] .trust-sub { color: rgba(0, 0, 0, 0.3); }
[data-theme="light"] .btn-login {
	background: linear-gradient(135deg, rgba(0,168,67,0.1), rgba(0,168,67,0.03));
	border-color: rgba(0,168,67,0.2);
	color: #00a843;
}
[data-theme="light"] .btn-login::before { background: linear-gradient(90deg, transparent, rgba(0,168,67,0.06), transparent); }
[data-theme="light"] .btn-login:hover {
	background: linear-gradient(135deg, rgba(0,168,67,0.16), rgba(0,168,67,0.06));
	border-color: rgba(0,168,67,0.35);
	box-shadow: 0 0 20px rgba(0,168,67,0.08);
}
[data-theme="light"] .btn-login:focus-visible { outline-color: #00a843; }

/* Responsive */
@media (max-width: 480px) {
	.login-container { border-radius: 16px; }
	.status-bar { padding: 8px 18px; }
	.logo { padding: 28px 24px 0; }
	.logo-icon { width: 52px; height: 52px; }
	.logo-icon svg { width: 40px; height: 40px; }
	.logo h1 { font-size: 24px; letter-spacing: 3px; }
	.logo .subtitle { font-size: 9px; letter-spacing: 4px; }
	.bot-terminal { margin: 20px 18px 0; }
	.term-body { font-size: 11px; padding: 12px 14px; }
	form { padding: 20px 18px 0; }
	.form-group input { padding: 12px 14px 12px 40px; font-size: 13px; }
	.btn-login { padding: 13px 16px; font-size: 12px; letter-spacing: 2px; }
}
@media (max-width: 360px) {
	.logo h1 { font-size: 20px; }
	.status-bar { font-size: 9px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.status-dot,
	.logo .dot,
	.logo-icon,
	.bot-cursor,
	.btn-login::before,
	.btn-loader svg { animation: none !important; }
	.status-bar,
	.logo,
	.bot-terminal,
	.form-group,
	.trust-row,
	.btn-login,
	.footer-meta { animation: none !important; opacity: 1 !important; transform: none !important; }
	.bot-line { opacity: 1; transform: none; }
	.btn-login:hover { transform: none; }
}
