/*
 * Band Name Generator — mobile-first styles.
 * Colours come from CSS custom properties so a theme can restyle everything;
 * the defaults match the "Great Name for a Band" theme.
 */

.bng-app,
.bng-profile,
.bng-links {
	--bng-accent: var(--gn-accent, #ff4d3d);
	--bng-accent-2: var(--gn-accent-2, #ffc23d);
	--bng-surface: var(--gn-surface, rgba(255, 255, 255, 0.05));
	--bng-border: var(--gn-border, rgba(255, 255, 255, 0.12));
	--bng-muted: var(--gn-muted, #a9a2b4);
	--bng-radius: var(--gn-radius, 16px);
	--bng-display: var(--gn-font-display, "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif);
	--bng-mono: var(--gn-font-mono, ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace);
}

/* ------------------------------------------------------------------ */
/* Generator                                                           */
/* ------------------------------------------------------------------ */

.bng-app {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
}

.bng-stage {
	position: relative;
	overflow: hidden;
	padding: 2rem 1.25rem 1.5rem;
	border-radius: var(--bng-radius);
	text-align: center;
	color: #fff;
	background:
		radial-gradient(120% 90% at 50% 0%, rgba(255, 77, 61, 0.35), transparent 60%),
		radial-gradient(80% 60% at 100% 100%, rgba(255, 194, 61, 0.18), transparent 60%),
		#16121c;
	border: 1px solid var(--bng-border);
}

.bng-stage::after { /* stage-light shimmer */
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, 0.025) 22px 23px);
	pointer-events: none;
}

.bng-stage__kicker {
	margin: 0 0 0.5rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--bng-accent-2);
}

.bng-stage__name {
	margin: 0 0 1.5rem;
	font-family: var(--bng-display);
	font-size: clamp(1.9rem, 8vw, 5.5rem);
	font-weight: 900;
	line-height: 0.95;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	overflow-wrap: break-word;
	hyphens: auto;
	color: #fff;
	text-shadow: 0 4px 30px rgba(255, 77, 61, 0.45);
}

.bng-reel {
	display: inline-block;
	min-width: 1ch;
	transition: transform 0.25s ease;
}

.bng-reel.is-spinning {
	opacity: 0.55;
	filter: blur(0.6px);
}

.bng-reel.is-landed {
	animation: bng-land 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes bng-land {
	0% { transform: scale(1.15); color: var(--bng-accent-2); }
	100% { transform: scale(1); }
}

.bng-actions {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 0.625rem;
}

.bng-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 48px; /* comfortable touch target */
	padding: 0.75rem 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.bng-btn:hover { background: rgba(255, 255, 255, 0.14); }
.bng-btn:active { transform: scale(0.97); }
.bng-btn:focus-visible { outline: 3px solid var(--bng-accent-2); outline-offset: 2px; }
.bng-btn[disabled] { opacity: 0.5; cursor: progress; }
.bng-btn[hidden] { display: none; }

.bng-btn--primary {
	border-color: transparent;
	background: var(--bng-accent);
	box-shadow: 0 8px 24px rgba(255, 77, 61, 0.35);
}

.bng-btn--primary:hover { background: #ff6a5c; }

.bng-app[data-state="loading"] .bng-btn--primary svg {
	animation: bng-rotate 1s linear infinite;
}

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

/* Status + skeleton while the profile is written */
.bng-status {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	color: var(--bng-muted);
	font-weight: 600;
}

.bng-app[data-state="loading"] .bng-status { display: flex; }

.bng-eq {
	display: inline-flex;
	align-items: flex-end;
	gap: 3px;
	height: 18px;
}

.bng-eq i {
	width: 4px;
	height: 100%;
	border-radius: 2px;
	background: var(--bng-accent);
	animation: bng-eq 0.9s ease-in-out infinite;
	transform-origin: bottom;
}

.bng-eq i:nth-child(2) { animation-delay: -0.6s; background: var(--bng-accent-2); }
.bng-eq i:nth-child(3) { animation-delay: -0.3s; }
.bng-eq i:nth-child(4) { animation-delay: -0.75s; background: var(--bng-accent-2); }
.bng-eq i:nth-child(5) { animation-delay: -0.15s; }

@keyframes bng-eq {
	0%, 100% { transform: scaleY(0.25); }
	50% { transform: scaleY(1); }
}

.bng-skeleton { display: none; gap: 0.75rem; }
.bng-app[data-state="loading"] .bng-skeleton { display: grid; }

.bng-skeleton > span,
.bng-skeleton__chips span {
	display: block;
	height: 0.9rem;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--bng-surface) 0%, rgba(255, 255, 255, 0.12) 50%, var(--bng-surface) 100%);
	background-size: 200% 100%;
	animation: bng-shimmer 1.4s ease-in-out infinite;
}

.bng-skeleton > span.short { width: 60%; }
.bng-skeleton__chips { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.bng-skeleton__chips span { height: 3.25rem; flex: 1; border-radius: 12px; }

@keyframes bng-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

.bng-result:empty,
.bng-extra:empty { display: none; }

.bng-app[data-state="done"] .bng-result {
	animation: bng-fade-up 0.5s ease both;
}

@keyframes bng-fade-up {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.bng-error {
	margin: 0;
	padding: 1rem 1.25rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 77, 61, 0.5);
	background: rgba(255, 77, 61, 0.12);
}

/* ------------------------------------------------------------------ */
/* Profile (generator result + every band post)                        */
/* ------------------------------------------------------------------ */

.bng-profile {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* let wide lyrics scroll instead of stretching the page */
	gap: 1.75rem;
}

.bng-profile > *,
.bng-app > * { min-width: 0; }

.bng-profile p { margin: 0 0 1em; }
.bng-profile p:last-child { margin-bottom: 0; }

.bng-meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.625rem;
	margin: 0;
}

.bng-meta__item {
	padding: 0.75rem 0.875rem;
	border-radius: 12px;
	background: var(--bng-surface);
	border: 1px solid var(--bng-border);
	min-width: 0;
}

.bng-meta dt {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bng-accent-2);
}

.bng-meta dd {
	margin: 0.2rem 0 0;
	font-weight: 700;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.bng-section__title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.875rem;
	font-family: var(--bng-display);
	font-size: 1.25rem;
	font-weight: 900;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	line-height: 1.1;
}

.bng-section__title::before {
	content: "";
	flex: none;
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: var(--bng-accent);
	box-shadow: 0 0 12px var(--bng-accent);
}

/* Lyrics: a real <pre>, monospace so chords line up over the words; scroll sideways rather than wrap. */
.bng-lyrics,
.gn-content .bng-lyrics {
	margin: 0;
	padding: 1rem;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--bng-border);
	color: inherit;
	font-family: var(--bng-mono);
	font-size: 0.875rem;
	line-height: 1.6;
	white-space: pre;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	tab-size: 4;
}

.bng-lyrics:focus-visible { outline: 2px solid var(--bng-accent-2); }

.bng-l--chords,
.bng-chord { color: var(--bng-accent-2); font-weight: 700; }

.bng-l--tag {
	color: var(--bng-accent);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bng-quote {
	position: relative;
	margin: 0;
	padding: 1.25rem 1.25rem 1.25rem 1.5rem;
	border-left: 4px solid var(--bng-accent);
	border-radius: 0 12px 12px 0;
	background: var(--bng-surface);
	font-style: italic;
}

.bng-quote::before {
	content: "“";
	position: absolute;
	top: -0.6rem;
	right: 0.75rem;
	font-family: Georgia, serif;
	font-size: 4rem;
	line-height: 1;
	color: var(--bng-accent);
	opacity: 0.5;
}

/* Album-cover links */
.bng-links {
	margin-top: 2rem;
}

.bng-links__title {
	margin: 0 0 0.75rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bng-muted);
}

.bng-app .bng-links { margin-top: 0; }

.bng-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bng-chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0.4rem 1rem;
	border: 1px solid var(--bng-border);
	border-radius: 999px;
	background: var(--bng-surface);
	color: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.bng-chip:hover,
.bng-chip:focus-visible {
	border-color: var(--bng-accent);
	color: var(--bng-accent);
}

/* ------------------------------------------------------------------ */
/* Larger screens                                                      */
/* ------------------------------------------------------------------ */

@media (min-width: 600px) {
	.bng-stage { padding: 3rem 2rem 2rem; }

	.bng-actions {
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
	}

	.bng-lyrics,
	.gn-content .bng-lyrics { font-size: 0.95rem; padding: 1.25rem 1.5rem; }
	.bng-section__title { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	.bng-app *,
	.bng-app *::before,
	.bng-app *::after {
		animation: none !important;
		transition: none !important;
	}
}
