/* ═══════════════════════════════════════════════════════
   ScriptForge — splash.css
   Заставка / главное меню при запуске
════════════════════════════════════════════════════════ */

#splash-screen {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: var(--bg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	animation: splashIn 0.4s ease both;
}
#splash-screen.hidden {
	animation: splashOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
	pointer-events: none;
}

@keyframes splashIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes splashOut {
	from { opacity: 1; transform: scale(1); }
	to   { opacity: 0; transform: scale(1.03); }
}

/* Декоративная сетка */
.splash-grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(91, 141, 239, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(91, 141, 239, 0.04) 1px, transparent 1px);
	background-size: 60px 60px;
	mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 100%);
}

/* Радиальные свечения */
.splash-glow-1 {
	position: absolute;
	width: 600px;
	height: 600px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(91, 141, 239, 0.12) 0%, transparent 70%);
	top: -100px;
	left: 50%;
	transform: translateX(-50%);
	animation: glowPulse 4s ease-in-out infinite;
}
.splash-glow-2 {
	position: absolute;
	width: 400px;
	height: 400px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(160, 91, 239, 0.09) 0%, transparent 70%);
	bottom: -80px;
	right: 10%;
	animation: glowPulse2 5s ease-in-out infinite reverse;
}

@keyframes glowPulse {
	0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
	50%       { opacity: 1;   transform: translateX(-50%) scale(1.1); }
}
@keyframes glowPulse2 {
	0%, 100% { opacity: 0.6; }
	50%       { opacity: 1; }
}

/* Контент */
.splash-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	max-width: 540px;
	width: 100%;
	padding: 0 24px;
}

.splash-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.splash-logo-icon {
	font-size: 28px;
	color: var(--accent);
	animation: spin-slow 8s linear infinite;
	filter: drop-shadow(0 0 12px var(--accent-glow));
}
.splash-logo-text {
	font-family: var(--font-head);
	font-weight: 800;
	font-size: 28px;
	letter-spacing: -1px;
	background: linear-gradient(135deg, var(--text-1) 30%, var(--accent) 80%, var(--accent-2));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.splash-tagline {
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 2px;
	color: var(--text-3);
	text-transform: uppercase;
	margin-bottom: 44px;
	animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* Карточка */
.splash-card {
	width: 100%;
	background: rgba(17, 17, 19, 0.85);
	border: 1px solid var(--border-md);
	border-radius: var(--radius-xl);
	backdrop-filter: blur(20px);
	overflow: hidden;
	box-shadow:
		0 40px 80px rgba(0, 0, 0, 0.5),
		0 0 0 1px rgba(255, 255, 255, 0.04) inset,
		0 1px 0 rgba(255, 255, 255, 0.08) inset;
	animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.splash-card-header {
	padding: 24px 24px 16px;
	border-bottom: 1px solid var(--border);
}
.splash-card-title {
	font-family: var(--font-head);
	font-size: 13px;
	font-weight: 600;
	color: var(--text-2);
	letter-spacing: 0.2px;
	margin-bottom: 16px;
}

/* Кнопка создания */
.splash-create-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 20px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	border: none;
	border-radius: var(--radius);
	color: white;
	font-family: var(--font-head);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.2px;
	cursor: pointer;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 4px 20px rgba(91, 141, 239, 0.35);
}
.splash-create-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 32px rgba(91, 141, 239, 0.5);
	filter: brightness(1.08);
}
.splash-create-btn:active { transform: translateY(0); }

.splash-create-icon {
	width: 20px;
	height: 20px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 300;
	flex-shrink: 0;
}

/* Список недавних */
.splash-recents { padding: 0; }
.splash-recent-empty {
	padding: 24px;
	text-align: center;
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-3);
	letter-spacing: 0.5px;
}
.splash-recent-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 24px;
	cursor: pointer;
	transition: background var(--trans);
	border-bottom: 1px solid var(--border);
}
.splash-recent-item:last-child { border-bottom: none; }
.splash-recent-item:hover { background: var(--bg-hover); }
.splash-recent-item:hover .splash-recent-arrow {
	opacity: 1;
	transform: translateX(0);
}
.splash-recent-icon {
	width: 36px;
	height: 36px;
	background: var(--bg-active);
	border: 1px solid var(--border);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	flex-shrink: 0;
}
.splash-recent-info { flex: 1; min-width: 0; }
.splash-recent-title {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--text-1);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 3px;
}
.splash-recent-meta {
	font-size: 11px;
	font-family: var(--font-mono);
	color: var(--text-3);
}
.splash-recent-badge {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 9.5px;
	font-family: var(--font-mono);
	letter-spacing: 0.5px;
	margin-left: 8px;
	background: var(--violet-dim);
	color: var(--violet);
}
.splash-recent-arrow {
	color: var(--text-3);
	opacity: 0;
	transform: translateX(-4px);
	transition: all var(--trans);
	font-size: 16px;
	flex-shrink: 0;
}

/* Footer */
.splash-footer {
	position: relative;
	z-index: 2;
	margin-top: 24px;
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--text-3);
	letter-spacing: 1px;
	opacity: 0.5;
	animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

/* ─── Mobile adjustments ─── */
@media (max-width: 640px) {
	.splash-content {
		padding: 0 16px;
		max-width: 100%;
	}
	.splash-logo-text { font-size: 24px; }
	.splash-logo-icon { font-size: 22px; }
	.splash-card { border-radius: var(--radius-lg); }
	.splash-recent-item { padding: 12px 16px; }
	.splash-card-header { padding: 18px 16px 14px; }
	.splash-footer { margin-top: 16px; }
	.splash-tagline { margin-bottom: 28px; letter-spacing: 1.5px; }
}
