@charset "utf-8";

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

/* ── Stylle Constants ── */
:root {
	--bg: #0f0f13;
	--surface: #1a1a22;
	--slide-gap: 24px;
	--accent: #4AC4CB;
	--accent-2: #DCBE64;
	--text: #f0eeff;
	--muted: #7a788a;
	--track-bg: #2a2a38;
	--thumb-size: 18px;
	--radius: 14px;
}

body {
	background: #053786;
	color: #FDFAC2;
	font-family: "Avenir", Helvetica, Verdana, Arial, sans-serif;
	font-size: calc(12px + 0.6vw);
	/*min-height: 100vh;*/

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	gap: 36px;
}

/* ── VIEWPORT ── */
.viewer-wrap {
	width: 90vw;
	height: auto;
	max-width: 450px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.viewport {
	width: 100%;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface);
    box-shadow: 0 2.0vmin 3.0vmin 1.5vmin rgba(255,255,150,0.5);
	position: relative;
	background-color: var(--track-bg);
}

.back-button {
	position: absolute;
	top: 1vh;
	left: 1vw;
	background: var(--surface);
	padding: 8px;
	border: none;
	cursor: pointer;
	border-radius: 10%;
	z-index: 1;
	background-color: var(--track-bg);
}

.back-button img {
	height: calc(8px + 1.0vw + 1.0vh);
	width: auto;
}

.back-button:hover {
	background-color: var(--accent);
}

.slide-number {
	position: absolute;
	top: 1vh;
	right: 1vw;
	font-size: calc(0.75vw + 0.75vh);
	letter-spacing: 0.1em;
	color: #FDFAC2;
	z-index: 1;
	background-color: var(--track-bg);
}


/* ── TRACK ── */
.track {
	display: flex;
	gap: var(--slide-gap);
	padding: var(--slide-gap);
	/* width set by JS */
	transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
	margin-bottom: 0.5vh;
	background-color: var(--track-bg);
}

/* ── SLIDES ── */
.slide {
	flex: 0 0 auto;
	/* width set by JS */
	/*aspect-ratio: 16 / 9;*/
	height: 60vh;
	border-radius: calc(var(--radius) - 6px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 32px;
	text-align: center;
	position: relative;
	overflow: hidden;
	user-select: none;
}

.slide-image {
	height: 100%;
	width: auto;
	border-radius: 12px;
	position: relative;
	z-index: 1;
}

.slide-title {
	position: absolute;
	bottom: 1.0vh;
	align-self: center;
	text-align: center;
	font-size: 1.25rem;
	color: #FDFAC2;
	width: 100%;
	line-height: 1.1;
	z-index: 1;
}

.slide::before {
	content: '';
	position: absolute;
	inset: 0;
	background: inherit;
	filter: brightness(0.6);
	z-index: 0;
}

/* ── CONTROLS ROW ── */
.controls {
    display: flex;
    align-items: center;
    gap: 16px;
	width: 90vw;
	max-width: 450px;
}

.btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.12);
    background: var(--surface);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:active { transform: scale(0.92); }
.btn:disabled { opacity: 0.3; cursor: default; }

/* ── RANGE SLIDER ── */
.slider-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.track-bar {
   	position: absolute;
    inset: 0;
    height: 4px;
    margin: auto;
    border-radius: 2px;
    background: var(--track-bg);
    pointer-events: none;
}

.track-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    width: 0%;
    transition: width 0.3s ease;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: var(--thumb-size);
    height: var(--thumb-size);
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 3px var(--accent), 0 2px 8px rgba(0,0,0,0.5);
    cursor: grab;
    transition: transform 0.15s, box-shadow 0.15s;
}

input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.25);
    box-shadow: 0 0 0 4px var(--accent-2), 0 2px 12px rgba(0,0,0,0.6);
}

input[type="range"]::-moz-range-thumb {
    width: var(--thumb-size);
    height: var(--thumb-size);
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 0 0 3px var(--accent), 0 2px 8px rgba(0,0,0,0.5);
    cursor: grab;
}

/* ── COUNTER ── */
.counter {
	font-size: calc(8.0px + 0.75vh);
	color: var(--muted);
	min-width: 44px;
	text-align: center;
    flex-shrink: 0;
}

@media (max-width: 480px) {
	.slide-desc { display: none; }
}
