:root {
	--bg-color: #242424;
	--text-dark: #000000;
	--text-light: #ffffff;
	--curtain-border: #b62a17;
	--curtain-dark: #6d0019;
	--animation-duration: 1.2s;
	--animation-delay: 1s;
	--animation-ease: cubic-bezier(0.65, 0, 0.35, 1);
	--text-animation-duration: 1.5s;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

@font-face {
    font-family: 'SoplapollenDisplay';
    src: url('../fonts/SoplapollenDisplay.eot');
    src: url('../fonts/SoplapollenDisplay.eot?#iefix') format('embedded-opentype'),
        url('../fonts/SoplapollenDisplay.woff2') format('woff2'),
        url('../fonts/SoplapollenDisplay.woff') format('woff'),
        url('../fonts/SoplapollenDisplay.ttf') format('truetype'),
        url('../fonts/SoplapollenDisplay.svg#SoplapollenDisplay') format('svg');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

body {
	background: radial-gradient(circle, rgba(89, 89, 89, 1) 0%, rgba(36, 36, 36, 1) 100%);
	background-attachment: fixed;
	color: var(--text-light);
	font-family: Arial, Helvetica, sans-serif;
	height: 100dvh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.curtain-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: 9999;
	pointer-events: none;
	overflow: hidden;
}

.curtain-text-left {
	position: fixed;
	top: 50%;
	left: 0;
	width: 100vw;
	transform: translateY(-50%);
	z-index: 10002;
	text-align: center;
	font-family: 'SoplapollenDisplay', serif;
	color: var(--text-light);
	letter-spacing: 6px;
	-webkit-text-stroke: 7px var(--text-dark);
	text-stroke: 7px var(--text-dark);
	paint-order: stroke fill;
	font-size: clamp(50px, 10vw, 120px);
	line-height: 1.2;
	pointer-events: none;
	clip-path: inset(0 50% 0 0);
}

.curtain-text-right {
	position: fixed;
	top: 50%;
	left: 0;
	width: 100vw;
	transform: translateY(-50%);
	z-index: 10002;
	text-align: center;
	font-family: 'SoplapollenDisplay', serif;
	color: var(--text-light);
	letter-spacing: 6px;
	-webkit-text-stroke: 7px var(--text-dark);
	text-stroke: 7px var(--text-dark);
	paint-order: stroke fill;
	font-size: clamp(50px, 10vw, 120px);
	line-height: 1.2;
	pointer-events: none;
	clip-path: inset(0 0 0 50%);
}

.curtain-text-left {
	animation: var(--text-animation-duration) var(--animation-ease) var(--animation-delay) 1 forwards slideOutText;
}

.curtain-text-right {
	animation: var(--text-animation-duration) var(--animation-ease) var(--animation-delay) 1 forwards slideOutTextRight;
}

@keyframes slideOutText {
	from {
		transform: translateY(-50%) translateX(0);
	}
	to {
		transform: translateY(-50%) translateX(-100%);
	}
}

@keyframes slideOutTextRight {
	from {
		transform: translateY(-50%) translateX(0);
	}
	to {
		transform: translateY(-50%) translateX(100%);
	}
}

.curtain-left,
.curtain-right {
	position: fixed;
	width: 50vw;
	height: 100vh;
	top: 0;
	box-sizing: border-box;
	overflow: hidden;

	background:
		repeating-linear-gradient(
			90deg,
			var(--curtain-border) 0px,
			var(--curtain-border) 10%,
			var(--curtain-dark) 10%,
			var(--curtain-dark) 15%,
			var(--curtain-border) 15%,
			var(--curtain-border) 25%,
			var(--curtain-dark) 25%,
			var(--curtain-dark) 30%,
			var(--curtain-border) 30%,
			var(--curtain-border) 40%,
			var(--curtain-dark) 40%,
			var(--curtain-dark) 45%
		);

	filter: blur(0.2px);
}

.curtain-left {
	left: 0;
	animation: var(--animation-duration) var(--animation-ease) var(--animation-delay) 1 forwards slideOut;
	box-shadow: inset -15px 0 25px rgba(0, 0, 0, 0.4);
	filter: blur(0.6px);
	z-index: 10001;
}

.curtain-right {
	right: 0;
	animation: var(--animation-duration) var(--animation-ease) var(--animation-delay) 1 forwards slideOutRight;
	box-shadow: inset 15px 0 25px rgba(0, 0, 0, 0.4);
	filter: blur(0.6px);
	z-index: 10001;
}

@keyframes slideOut {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-100%);
	}
}

.curtain-right {
	animation-name: slideOutRight;
}

@keyframes slideOutRight {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(100%);
	}
}

.content-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-height: 0;
	width: 100%;
	box-sizing: border-box;
}

header {
	text-align: center;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
}

.site-title-img {
	display: block;
	height: 50px;
	width: auto;
	margin: 0 auto;
}

.gif-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	grid-template-rows: repeat(5, 1fr);
	gap: 0.75rem;
	padding: 0 1rem;
	flex: 1;
	min-height: 0;
	width: 100%;
	justify-items: center;
	align-items: center;
}

.gif-item {
	height: 100%;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gif-item img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
}

.clock-1 { grid-column: 2; grid-row: 1; }
.toaster-1 { grid-column: 4; grid-row: 1; }
.worm-1 { grid-column: 1; grid-row: 2; }

.worm-2 { grid-column: 2; grid-row: 3; }
.bell-1 { grid-column: 2; grid-row: 4; }

.jebus-container {
	grid-column: 3 / 6;
	grid-row: 2 / 5;
	position: relative;
	z-index: 10;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mouth-1 { grid-column: 6; grid-row: 1; }
.worm-2b { grid-column: 6; grid-row: 3; }
.toaster-2 { grid-column: 7; grid-row: 2; }

.toaster-3 { grid-column: 1; grid-row: 5; }
.mouth-2 { grid-column: 3; grid-row: 5; }
.bell-2 { grid-column: 7; grid-row: 4; }
.clock-2 { grid-column: 5; grid-row: 5; }
.toaster-4 { grid-column: 7; grid-row: 5; }

.clock-3,
.worm-3 {
	display: none;
}

.jebus-container img {
	width: auto;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
}

.audio-toggle-btn {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	position: relative;
	display: block;
}

.audio-toggle-btn img {
	display: block;
	width: auto;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
}

.audio-icon {
	position: absolute;
	bottom: 8px;
	left: 8px;
	width: 1.5rem;
	height: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: all 0.3s ease;
}

.audio-toggle-btn:hover .audio-icon {
	transform: scale(1.1);
}

.visit-counter-top {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
}

.soundcloud-link {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.soundcloud-logo {
	width: 32px;
	height: 32px;
	display: block;
	border-radius: 6px;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.soundcloud-logo:hover {
	transform: scale(1.12);
	opacity: 0.9;
}

/* ==================
   MP3 Player
   ================== */
.player-wrapper {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
}

.player-cover {
	position: relative;
	width: 86px;
	height: 86px;
	flex-shrink: 0;
	background: #1a1a1a;
	border: 2px solid;
	border-color: #888 #222 #222 #888;
	border-radius: 2px;
	overflow: hidden;
}

.player-cover img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.player-cover-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	color: #555;
	line-height: 1;
}

.mp3-player {
	width: 280px;
	margin: 0;
	background: linear-gradient(180deg, #4a4a4a 0%, #2e2e2e 100%);
	border: 2px solid;
	border-color: #888 #222 #222 #888;
	border-radius: 4px;
	box-shadow: 2px 2px 0 #000, inset 0 1px 0 rgba(255,255,255,0.1);
	font-family: Arial, Helvetica, sans-serif;
	user-select: none;
}

.player-titlebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: linear-gradient(90deg, #c45200 0%, #7a2e00 100%);
	padding: 2px 4px;
	border-radius: 2px 2px 0 0;
}

.player-title-text {
	font-size: 0.55rem;
	font-weight: bold;
	color: #fff;
	letter-spacing: 0.5px;
	text-shadow: 1px 1px 0 #000;
}

.player-title-btns {
	display: flex;
	gap: 2px;
	font-size: 0.5rem;
	color: #ccc;
	cursor: default;
}

.player-title-btns span {
	display: inline-block;
	width: 12px;
	height: 10px;
	background: #666;
	border: 1px solid;
	border-color: #aaa #333 #333 #aaa;
	text-align: center;
	line-height: 9px;
	font-size: 0.5rem;
	color: #fff;
}

.player-lcd {
	background: #0d1c0d;
	margin: 6px 6px 4px 6px;
	padding: 4px 6px;
	border: 2px solid;
	border-color: #111 #444 #444 #111;
	border-radius: 2px;
	overflow: hidden;
}

.player-track-scroll {
	overflow: hidden;
	white-space: nowrap;
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.62rem;
	color: #ff7700;
	text-shadow: 0 0 4px #ff9900;
	margin-bottom: 4px;
}

.player-track-scroll span {
	display: inline-block;
	animation: marquee 10s linear infinite;
}

@keyframes marquee {
	0%   { transform: translateX(100%); }
	100% { transform: translateX(-100%); }
}

.player-lcd-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.player-time {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.75rem;
	font-weight: bold;
	color: #ff7700;
	text-shadow: 0 0 5px #ff9900;
	letter-spacing: 1px;
}

.player-status {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.5rem;
	color: #cc5500;
	text-shadow: 0 0 3px #ff9900;
	letter-spacing: 1px;
}

.player-seekbar {
	position: relative;
	height: 8px;
	background: #111;
	margin: 0 6px 4px 6px;
	border: 1px solid;
	border-color: #111 #555 #555 #111;
	border-radius: 2px;
	cursor: pointer;
}

.player-seek-fill {
	position: absolute;
	top: 0; left: 0; bottom: 0;
	width: 0%;
	background: linear-gradient(90deg, #c45200, #ff7a1a);
	border-radius: 1px;
	pointer-events: none;
}

.player-seek-thumb {
	position: absolute;
	top: -2px;
	left: 0%;
	width: 6px;
	height: 12px;
	background: linear-gradient(180deg, #ccc 0%, #888 100%);
	border: 1px solid;
	border-color: #eee #555 #555 #eee;
	border-radius: 1px;
	transform: translateX(-50%);
	pointer-events: none;
}

.player-controls {
	display: flex;
	justify-content: center;
	gap: 3px;
	padding: 4px 6px;
}

.player-btn {
	background: linear-gradient(180deg, #888 0%, #555 100%);
	border: 2px solid;
	border-color: #aaa #333 #333 #aaa;
	color: #fff;
	font-size: 0.6rem;
	padding: 3px 7px;
	cursor: pointer;
	border-radius: 2px;
	min-width: 28px;
	text-align: center;
	box-shadow: 1px 1px 0 #000;
	line-height: 1;
}

.player-btn:active {
	border-color: #333 #aaa #aaa #333;
	background: linear-gradient(180deg, #444 0%, #666 100%);
	box-shadow: none;
	transform: translate(1px, 1px);
}

.player-btn-play {
	background: linear-gradient(180deg, #c45200 0%, #7a2e00 100%);
	border-color: #e06020 #4a1a00 #4a1a00 #e06020;
	padding: 3px 7px;
}

.player-btn-play:active {
	background: linear-gradient(180deg, #7a2e00 0%, #c45200 100%);
}

.player-vol-row {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 2px 8px 6px 8px;
}

.player-vol-label {
	font-size: 0.5rem;
	color: #aaa;
	font-weight: bold;
	letter-spacing: 1px;
	min-width: 20px;
	text-align: right;
}

#playerVolPct {
	text-align: left;
	min-width: 28px;
}

.player-vol-slider {
	flex: 1;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: #111;
	border: 1px solid;
	border-color: #111 #555 #555 #111;
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}

.player-vol-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 10px;
	height: 14px;
	background: linear-gradient(180deg, #ccc 0%, #777 100%);
	border: 1px solid;
	border-color: #eee #555 #555 #eee;
	border-radius: 1px;
	cursor: pointer;
}

.player-vol-slider::-moz-range-thumb {
	width: 10px;
	height: 14px;
	background: linear-gradient(180deg, #ccc 0%, #777 100%);
	border: 1px solid #777;
	border-radius: 1px;
	cursor: pointer;
}

/* ==================
   Playlist Modal (WMP-style)
   ================== */
.playlist-modal[hidden] { display: none; }

.playlist-modal {
	position: fixed;
	inset: 0;
	z-index: 11000;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Tahoma', 'Verdana', Arial, sans-serif;
}

.playlist-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.playlist-window {
	position: relative;
	width: min(520px, 92vw);
	max-height: 80vh;
	background: #d4d0c8;
	border: 2px solid;
	border-color: #fff #404040 #404040 #fff;
	box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	color: #000;
	user-select: none;
	animation: playlistPop 0.18s ease-out;
}

@keyframes playlistPop {
	from { transform: scale(0.92); opacity: 0; }
	to   { transform: scale(1);    opacity: 1; }
}

.playlist-titlebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: linear-gradient(180deg, #0a246a 0%, #3a6ea5 50%, #0a246a 100%);
	color: #fff;
	padding: 3px 4px 3px 6px;
	font-size: 0.75rem;
	font-weight: bold;
	text-shadow: 1px 1px 0 #000;
}

.playlist-close-btn {
	width: 18px;
	height: 16px;
	background: linear-gradient(180deg, #d4d0c8 0%, #a8a4a0 100%);
	border: 1px solid;
	border-color: #fff #000 #000 #fff;
	color: #000;
	font-size: 0.65rem;
	font-weight: bold;
	cursor: pointer;
	padding: 0;
	line-height: 0;
	text-shadow: none;
}

.playlist-close-btn:active {
	border-color: #000 #fff #fff #000;
}

.playlist-menubar {
	display: flex;
	gap: 14px;
	background: #ece9d8;
	padding: 3px 8px;
	font-size: 0.75rem;
	border-bottom: 1px solid #a0a0a0;
	color: #000;
}

.playlist-menubar span {
	cursor: default;
}

.playlist-menubar span:hover {
	background: #316ac5;
	color: #fff;
	padding: 0 4px;
	margin: 0 -4px;
}

.playlist-body {
	flex: 1;
	overflow: hidden;
	background: #fff;
	border: 2px inset #808080;
	margin: 6px;
	display: flex;
	flex-direction: column;
}

.playlist-header {
	display: grid;
	grid-template-columns: 36px 1fr 70px;
	gap: 6px;
	padding: 4px 8px;
	background: linear-gradient(180deg, #ece9d8 0%, #d4d0c8 100%);
	border-bottom: 1px solid #808080;
	font-size: 0.7rem;
	font-weight: bold;
	color: #000;
}

.col-num  { text-align: center; }
.col-dur  { text-align: right;  }

.playlist-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1;
	background: #fff;
}

.playlist-item {
	display: grid;
	grid-template-columns: 36px 1fr 70px;
	gap: 6px;
	padding: 4px 8px;
	font-size: 0.78rem;
	color: #000;
	cursor: pointer;
	border-bottom: 1px dotted #d4d0c8;
}

.playlist-item:nth-child(even) {
	background: #f4f1e6;
}

.playlist-item:hover {
	background: #d6e4f7;
}

.playlist-item.active {
	background: #316ac5;
	color: #fff;
	font-weight: bold;
}

.playlist-item .col-num {
	color: #666;
}

.playlist-item.active .col-num {
	color: #fff;
}

.playlist-item .col-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.playlist-item .col-title::before {
	content: "♪ ";
	color: #888;
	margin-right: 2px;
}

.playlist-item.active .col-title::before {
	content: "▶ ";
	color: #fff;
}

.playlist-statusbar {
	display: flex;
	justify-content: space-between;
	padding: 3px 8px;
	font-size: 0.7rem;
	background: #d4d0c8;
	border-top: 1px solid #808080;
	color: #000;
}

.site-footer {
	text-align: center;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
}

.visit-counter {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: #1a1a1a;
	border: 3px inset #555;
	border-radius: 3px;
	padding: 4px 8px;
	box-shadow:
		inset 0 2px 6px rgba(0,0,0,0.8),
		0 1px 0 rgba(255,255,255,0.15);
}

.counter-label {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 0.65rem;
	color: #aaa;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	white-space: nowrap;
}

.counter-digits {
	font-family: 'Courier New', Courier, monospace;
	font-size: 1.4rem;
	font-weight: bold;
	letter-spacing: 3px;
	color: #ff7700;
	text-shadow:
		0 0 6px #ff9900,
		0 0 12px rgba(255,140,0,0.4);
	background: #0a0a0a;
	padding: 2px 6px;
	border-radius: 2px;
	border: 1px solid #333;
	min-width: 7ch;
	display: inline-block;
	text-align: center;
}

@media (max-width: 576px) {
	.curtain-text-left,
	.curtain-text-right {
		font-size: clamp(30px, 14vw, 60px);
		line-height: 1.3;
		-webkit-text-stroke: 5px var(--text-dark);
		text-stroke: 5px var(--text-dark);
		top: calc(50% - 35px);
	}
	
	.site-title-img {
		height: 50px;
	}

	.curtain-left,
	.curtain-right {
		background: 
			repeating-linear-gradient(
				90deg,
				var(--curtain-border) 0px,
				var(--curtain-border) 20%,
				var(--curtain-dark) 20%,
				var(--curtain-dark) 30%,
				var(--curtain-border) 30%,
				var(--curtain-border) 50%,
				var(--curtain-dark) 50%,
				var(--curtain-dark) 60%
			);
	}
	
	.audio-toggle-btn img {
		width: 100%;
		height: auto;
		max-width: 150px;
	}
	
	.gif-grid {
		grid-template-columns: repeat(5, 1fr);
		grid-template-rows: repeat(4, 1fr);
		gap: 0.4rem;
		padding: 0;
	}

	.toaster-2 img,
	.toaster-3 img {
		max-width: 80%;
        height: auto;
	}

	.clock-1 img,
	.clock-2 img,
	.jebus-container img {
		max-width: 85%;
        height: auto;
	}

	.worm-1 img,
	.mouth-1 img {
		max-width: 90%;
		height: auto;
	}

	.toaster-1 img,
	.worm-2 img,
	.bell-1 img,
	.mouth-2 img {
		max-width: 95%;
        height: auto;
	}
	
	.clock-1 { grid-column: 1; grid-row: 1; }
	.toaster-1 { grid-column: 3; grid-row: 1; }
	.worm-1 { grid-column: 5; grid-row: 1; }
	
	.toaster-2 { grid-column: 1; grid-row: 2; }
	.worm-2 { grid-column: 1; grid-row: 3; }
	
	.jebus-container {
		grid-column: 2 / 5;
		grid-row: 2 / 4;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	
	.mouth-1 { grid-column: 5; grid-row: 2; }
	.toaster-3 { grid-column: 5; grid-row: 3; }
	
	.bell-1 { grid-column: 1; grid-row: 4; }
	.mouth-2 { grid-column: 3; grid-row: 4; }
	.clock-2 { grid-column: 5; grid-row: 4; }
	
	.toaster-4,
	.clock-3,
	.worm-3,
	.worm-2b,
	.bell-2 {
		display: none;
	}
	
	.site-footer {
		margin: 0;
		padding: 0;
	}

	.mp3-player {
		width: 240px;
	}

	.player-wrapper {
		align-items: flex-start;
	}

	.player-cover {
		width: 86px;
		height: 86px;
		aspect-ratio: auto;
		align-self: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.curtain-left,
	.curtain-right,
	.audio-toggle-btn {
		animation: none !important;
		transition: none !important;
	}
	
	.curtain-left {
		transform: translateX(-100%);
	}
	
	.curtain-right {
		transform: translateX(100%);
	}
}

@media print {
	.curtain-container,
	.audio-icon {
		display: none;
	}
	
	body {
		background: var(--text-light);
		color: var(--text-dark);
	}
}