#home h1 {
	display: block !important;
	width: 100% !important;
	margin: 96px 0 0 0 !important;
	text-align: center;
	font-size: 72px;
	letter-spacing: 6px;
	background: linear-gradient(180deg, #fff6a8 0%, #ffd700 45%, #ff8a1f 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	filter: drop-shadow(0 4px 0 #7a3b00) drop-shadow(0 0 22px rgba(255, 190, 0, .35));
}
#home .tagline {
	text-align: center;
	margin-top: 2px;
	font-size: 18px;
	letter-spacing: 7px;
	text-transform: uppercase;
	color: #78abf7;
}
#home .tagline b { color: #ff4d55; font-weight: normal; }
#home .start-prompt {
	position: absolute;
	left: 0; right: 0;
	bottom: 36px;
	text-align: center;
	font-size: 18px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: #fff200;
	animation: startBlink 1.1s steps(2, jump-none) infinite;
	pointer-events: none;
}
@keyframes startBlink { 0% { opacity: 1; } 100% { opacity: .15; } }
@keyframes ballBob { 50% { transform: translate(-50%, -10px) rotate(8deg); } }
body {
    background-color: #000000; /* Warna merah latar luar */
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#home, #panel {
    background-color: #000000;
    position: relative;
    width: 670px;
    height: 810px;
}
#home {
    height: 690px;
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 50% 18%, rgba(255, 77, 85, .22), transparent 55%),
        linear-gradient(rgba(25, 63, 255, .07) 1px, transparent 1px) 0 0 / 100% 40px,
        linear-gradient(90deg, rgba(25, 63, 255, .07) 1px, transparent 1px) 0 0 / 40px 100%,
        #000;
    box-shadow: inset 0 0 0 2px rgba(25, 63, 255, .45), inset 0 0 60px rgba(25, 63, 255, .12);
}
#home h3 { 
	position: absolute;
	margin: auto;
	left: 0px;
	right: 0px;
	bottom: 15px;
	text-align: center;
}
#home h3 em { 
	font-size: inherit;
	font-style: inherit;
	color: #fff200;
}
#canvas-home-title-pacman { 
	display: none !important;
}
#img-home-title-pacman { 
	background-color: transparent;
	position: absolute;
	top: 16px;
	left: 50%;
	transform: translateX(-50%);
	height: 76px;
	width: 76px;
	display: none;
	object-fit: contain;
	filter: drop-shadow(0 0 18px rgba(255, 77, 85, .55));
	animation: ballBob 2.2s ease-in-out infinite;
}
#canvas-panel-title-pacman { 
	background-color: #000;
	position: absolute;
	top: 6px;
	left: 47px;
	height: 32px;
	width: 38px;
}

#presentation { 
	position: absolute;
	margin: auto;
	padding: 0px;
	left: 0px;
	right: 0px;
	top: 260px;
	width: 700px;
	height: 340px;
}
#presentation-titles { 
	position: absolute;
	width: 500px;
	height: 40px;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	letter-spacing: 3px;
	font-size: 28px;
	text-transform: uppercase;
	color: #fff;
	text-align: center;
}
#img-presentation-blinky, #img-presentation-pinky, #img-presentation-inky, #img-presentation-clyde {
	position: absolute;
	width: 80px;
	height: 80px;
	left: 80px;
	object-fit: contain;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
}
#img-presentation-blinky { 
	top: 55px;
}
#img-presentation-pinky { 
	top: 145px;
}
#img-presentation-inky { 
	top: 235px;
}
#img-presentation-clyde { 
	top: 325px;
}
#presentation-character-blinky, #presentation-character-pinky, #presentation-character-inky, #presentation-character-clyde, 
#presentation-name-blinky, #presentation-name-pinky, #presentation-name-inky, #presentation-name-clyde { 
	position: absolute;
	width: 220px;
	height: 40px;
	left: 180px;
	letter-spacing: 2px;
	font-size: 26px;
	text-transform: uppercase;
}
#presentation-name-blinky, #presentation-name-pinky, #presentation-name-inky, #presentation-name-clyde { 
	left: 420px;
	width: 220px;
}
#presentation-character-blinky, #presentation-name-blinky { 
	top: 60px;
	color: #ed1b24;
}
#presentation-character-pinky, #presentation-name-pinky { 
	top: 150px;
	color: #feaec9;
}
#presentation-character-inky, #presentation-name-inky { 
	top: 240px;
	color: #4adecb;
}
#presentation-character-clyde, #presentation-name-clyde { 
	top: 330px;
	color: #f99c00;
}

#trailer { 
	position: absolute;
	margin: auto;
	padding: 0px;
	left: 0px;
	right: 0px;
	bottom: 60px;
	width: 600px;
	height: 120px;
	gap: 90px;
	background-color: transparent;

}


#img-trailer-pacman, #img-trailer-blinky, #img-trailer-pinky, #img-trailer-inky, #img-trailer-clyde { 
	width: 70px;
	height: 70px;
	object-fit: contain;
}

/* ── Game panel polish ── */
#panel {
	width: 600px;
	height: 690px;
	border-radius: 24px;
	background:
		radial-gradient(ellipse at 50% 0%, rgba(25, 63, 255, .18), transparent 55%),
		linear-gradient(rgba(25, 63, 255, .05) 1px, transparent 1px) 0 0 / 100% 40px,
		linear-gradient(90deg, rgba(25, 63, 255, .05) 1px, transparent 1px) 0 0 / 40px 100%,
		#000;
	box-shadow: inset 0 0 0 2px rgba(25, 63, 255, .45), inset 0 0 60px rgba(25, 63, 255, .12);
}
#panel h1 {
	background: linear-gradient(180deg, #fff6a8 0%, #ffd700 50%, #ff8a1f 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	filter: drop-shadow(0 2px 0 #7a3b00);
}
#score h2, #highscore h2 { color: #ff4d55; font-size: 14px; letter-spacing: 3px; }
#score span, #highscore span { color: #fff200; text-shadow: 0 0 10px rgba(255, 242, 0, .45); font-size: 18px; }
#highscore h2 { color: #78abf7; }

#board {
	margin: 0 auto;
	background: radial-gradient(ellipse at 50% 50%, rgba(25, 63, 255, .07), transparent 70%);
}
#canvas-board { filter: drop-shadow(0 0 5px rgba(25, 63, 255, .85)); }

/* header icon: real Pacmon logo (Pokeball) instead of the old drawn yellow pac */
#panel #canvas-panel-title-pacman { display: none !important; }
#panel #panel-logo {
	display: inline-block;
	vertical-align: middle;
	width: 40px;
	height: 40px;
	margin: 5px 12px 0 12px;
	object-fit: contain;
	filter: drop-shadow(0 0 8px rgba(255, 77, 85, .45));
}

/* help link: sit between lives and fruits instead of floating over the maze */
#panel .help-button { top: 680px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); height: auto; }

#message { left: 205px; text-shadow: 0 0 10px rgba(255, 242, 0, .5); }

/* ── Game over card ── */
#message.red {
	top: 50%;
	left: 50%;
	width: 340px;
	height: auto;
	transform: translate(-50%, -50%);
	padding: 24px 24px 18px;
	z-index: 200;
	color: #fff;
	text-shadow: none;
	background: rgba(4, 6, 18, .92);
	border: 2px solid #ff4d55;
	border-radius: 18px;
	box-shadow: 0 0 0 6px rgba(255, 77, 85, .12), 0 20px 60px rgba(0, 0, 0, .8), 0 0 40px rgba(255, 77, 85, .35);
	animation: goIn .45s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes goIn { from { opacity: 0; transform: translate(-50%, calc(-50% - 14px)) scale(.9); } }
#message.red .go-submit { margin-top: 14px; }
#message.red .go-wallet {
	margin-bottom: 10px;
	padding: 6px 12px;
	font-size: 16px;
	letter-spacing: 2px;
	color: #4adecb;
	background: rgba(74, 222, 203, .1);
	border-radius: 8px;
}
#message.red .go-link {
	margin-top: 10px;
	padding: 6px;
	font-size: 15px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #78abf7;
	background: none;
	border: 0;
	cursor: pointer;
	text-decoration: underline;
}
#message.red .go-submit input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 20px;
	letter-spacing: 2px;
	text-align: center;
	text-transform: none;
	color: #fff200;
	background: #000;
	border: 2px solid #193fff;
	border-radius: 10px;
	outline: none;
	-webkit-user-select: text;
	user-select: text;
}
#message.red .go-submit input:focus { border-color: #fff200; box-shadow: 0 0 14px rgba(255, 242, 0, .35); }
#message.red .go-btn {
	width: 100%;
	margin-top: 10px;
	padding: 10px 12px;
	font-size: 20px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: #1a1500;
	background: linear-gradient(180deg, #ffe44d, #ffd700);
	border: 0;
	border-radius: 10px;
	box-shadow: 0 4px 0 #a88a00;
	cursor: pointer;
}
#message.red .go-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #a88a00; }
#message.red .go-btn:disabled { opacity: .6; cursor: default; }

/* ── Mobile (touch) ── */
@media (pointer: coarse) {
	html, body { min-height: 100dvh; }
	/* centre the screen; leave room for the D-pad only while playing */
	body { justify-content: center; padding: 0; box-sizing: border-box; }
	body.playing { padding-bottom: 160px; }
	/* D-pad only on the playing screen (not on home or behind the game over card) */
	#mobile-dpad { display: none; }
	body.playing #mobile-dpad { display: block; }
	body.playing.gameover #mobile-dpad { display: none; }
	body.playing.gameover { padding-bottom: 0; }
	/* mute button is useful on phones too */
	.sound { display: block !important; }
	#home .sound { bottom: 6px; right: 14px; }
	#panel .sound { top: 14px; right: 12px; }
	.sound img { height: 34px; }
	/* bigger touch targets on the home screen */
	.home-btn { font-size: 17px; padding: 8px 4px; }
	#home-wallet { top: 12px; right: 16px; }
	#home-lb { bottom: 12px; left: 18px; }
	#home-guest { bottom: 8px; font-size: 14px; }
}
@media (pointer: coarse) and (orientation: landscape) {
	body.playing { padding-bottom: 0; }
	#mobile-dpad { background: none; height: 100%; top: 0; pointer-events: none; }
	#mobile-dpad-inner { position: absolute; left: 18px; bottom: 14px; margin: 0; pointer-events: auto; }
	#mobile-pause { pointer-events: auto; right: 18px; top: auto; bottom: 24px; transform: none; }
}
/* submit form inside the overlay (used when a score is resumed in the wallet app browser) */
.pm-box .go-submit { margin-top: 14px; }
.pm-box .go-wallet { margin-bottom: 10px; padding: 6px 12px; font-size: 16px; letter-spacing: 2px; text-align: center; color: #4adecb; background: rgba(74, 222, 203, .1); border-radius: 8px; }
.pm-box .go-submit input { width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 20px; letter-spacing: 2px; text-align: center; color: #fff200; background: #000; border: 2px solid #193fff; border-radius: 10px; outline: none; -webkit-user-select: text; user-select: text; }
.pm-box .go-submit input:focus { border-color: #fff200; }
.pm-box .go-btn { width: 100%; margin-top: 10px; padding: 12px; font-size: 20px; letter-spacing: 3px; text-transform: uppercase; color: #1a1500; background: linear-gradient(180deg, #ffe44d, #ffd700); border: 0; border-radius: 10px; box-shadow: 0 4px 0 #a88a00; cursor: pointer; }
.pm-box .go-btn:disabled { opacity: .6; cursor: default; }
.pm-box .go-status { min-height: 20px; margin-top: 8px; text-align: center; font-size: 14px; letter-spacing: 1px; color: #78abf7; }
.pm-box .go-status.err { color: #ff4d55; }
.pm-box .go-ok { padding: 12px; text-align: center; font-size: 18px; letter-spacing: 2px; color: #4adecb; background: rgba(74, 222, 203, .1); border-radius: 10px; }
.pm-box .go-link { display: block; margin: 10px auto 0; padding: 6px; font-size: 15px; letter-spacing: 2px; text-transform: uppercase; color: #78abf7; background: none; border: 0; text-decoration: underline; cursor: pointer; }
.pm-box { touch-action: pan-y; -webkit-overflow-scrolling: touch; }

/* ── Game loading cover ── */
#game-loader {
	position: fixed;
	inset: 0;
	z-index: 3000000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 22px;
	background: radial-gradient(ellipse at 50% 40%, rgba(255, 77, 85, .16), transparent 60%), #000;
	transition: opacity .45s ease;
}
#game-loader.hide { opacity: 0; pointer-events: none; }
#game-loader .gl-ball { width: 64px; height: 64px; object-fit: contain; animation: glBob 1s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(255, 77, 85, .5)); }
#game-loader .gl-text { font-size: 18px; letter-spacing: 6px; text-transform: uppercase; color: #fff200; }
#game-loader .gl-bar { width: min(220px, 60vw); height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
#game-loader .gl-bar i { display: block; height: 100%; width: 40%; border-radius: 99px; background: linear-gradient(90deg, #ff4d55, #ffd700); animation: glSlide 1.1s ease-in-out infinite; }
@keyframes glBob { 50% { transform: translateY(-10px) rotate(10deg); } }
@keyframes glSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ── Home buttons ── */
.home-btn {
	display: none;
	position: absolute;
	bottom: 8px;
	left: 20px;
	font-size: 14px;
	letter-spacing: .5px;
	cursor: pointer;
	color: #78abf7;
}
.home-btn.on { display: block; }
.home-btn:hover { color: #fff200; }
#home-guest { bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 13px; color: #6b7aa8; text-decoration: underline; }
.pm-btn.pm-guest { margin-top: 4px; color: #78abf7; border-color: rgba(120, 171, 247, .45); font-size: 16px; }
#home-wallet { bottom: auto; top: 14px; left: auto; right: 20px; font-size: 14px; color: #4adecb; }

/* ── Overlay: leaderboard / wallet picker ── */
#pm-overlay {
	position: fixed;
	inset: 0;
	z-index: 2000000;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 4, .82);
	backdrop-filter: blur(4px);
}
.pm-box {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: 92vh;
	overflow-y: auto;
	padding: 26px 22px 20px;
	background: #050814;
	border: 2px solid #193fff;
	border-radius: 18px;
	box-shadow: 0 0 0 6px rgba(25, 63, 255, .12), 0 24px 70px rgba(0, 0, 0, .8), inset 0 0 40px rgba(25, 63, 255, .1);
}
.pm-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; font-size: 22px; line-height: 1; color: #fff; background: rgba(255, 255, 255, .08); border: 0; border-radius: 50%; cursor: pointer; }
.pm-title { margin: 0 0 16px; text-align: center; font-size: 30px; letter-spacing: 5px; text-transform: uppercase; color: #fff200; text-shadow: 0 3px 0 #7a3b00, 0 0 20px rgba(255, 200, 0, .35); }
.pm-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.pm-tab { flex: 1; padding: 8px 4px; font-size: 16px; letter-spacing: 2px; text-transform: uppercase; color: #78abf7; background: rgba(255, 255, 255, .05); border: 1px solid rgba(25, 63, 255, .5); border-radius: 8px; cursor: pointer; }
.pm-tab.on { color: #1a1500; background: #ffd700; border-color: #ffd700; }
.pm-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px; background: rgba(255, 255, 255, .05); border-radius: 10px; }
.pm-row.me { background: rgba(74, 222, 203, .14); box-shadow: inset 0 0 0 1px rgba(74, 222, 203, .5); }
.pm-rank { width: 30px; text-align: center; font-size: 20px; color: #78abf7; }
.pm-rank.r1 { color: #ffd700; } .pm-rank.r2 { color: #cfd4de; } .pm-rank.r3 { color: #e59a52; }
.pm-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; overflow: hidden; }
.pm-name b { font-weight: normal; font-size: 18px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-name i { font-style: normal; font-size: 12px; color: #78abf7; }
.pm-score { font-size: 20px; color: #fff200; }
.pm-lvl { width: 34px; text-align: right; font-size: 14px; color: #ff4d55; }
.pm-note { padding: 14px 0; text-align: center; font-size: 15px; letter-spacing: 1px; color: #78abf7; }
.pm-foot { margin-top: 10px; text-align: center; font-size: 12px; letter-spacing: 1px; color: #6b7aa8; }
.pm-btn { display: block; width: 100%; margin-bottom: 10px; padding: 12px; font-size: 20px; letter-spacing: 3px; text-transform: uppercase; color: #fff; background: rgba(255, 255, 255, .05); border: 2px solid #193fff; border-radius: 10px; cursor: pointer; }
.pm-btn:hover { border-color: #fff200; color: #fff200; }
#message.red .go-status { min-height: 20px; margin-top: 8px; font-size: 14px; letter-spacing: 1px; color: #78abf7; text-transform: none; }
#message.red .go-status.err { color: #ff4d55; }
#message.red .go-ok { padding: 12px; font-size: 18px; letter-spacing: 2px; color: #4adecb; background: rgba(74, 222, 203, .1); border-radius: 10px; }
#message.red .go-title {
	font-size: 42px;
	letter-spacing: 5px;
	line-height: 1.1;
	margin-bottom: 18px;
	color: #ff4d55;
	text-shadow: 0 3px 0 #6b0a10, 0 0 24px rgba(255, 77, 85, .6);
}
#message.red .go-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 14px;
	margin-bottom: 8px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .06);
	font-size: 20px;
	letter-spacing: 3px;
}
#message.red .go-row span { color: #78abf7; }
#message.red .go-row b { color: #fff200; font-weight: normal; }
#message.red .go-hint {
	margin-top: 16px;
	font-size: 15px;
	letter-spacing: 3px;
	color: #fff;
	animation: startBlink 1.1s steps(2, jump-none) infinite;
}

/* ── Home redesign: presentation list ── */
#presentation {
	top: 250px !important;
	width: 100%;
	height: 330px;
	left: 0; right: 0;
	background:
		linear-gradient(90deg, rgba(237, 27, 36, .16), rgba(237, 27, 36, 0)) 0 36px / 100% 64px no-repeat,
		linear-gradient(90deg, rgba(254, 174, 201, .16), rgba(254, 174, 201, 0)) 0 110px / 100% 64px no-repeat,
		linear-gradient(90deg, rgba(74, 222, 203, .16), rgba(74, 222, 203, 0)) 0 184px / 100% 64px no-repeat,
		linear-gradient(90deg, rgba(249, 156, 0, .16), rgba(249, 156, 0, 0)) 0 258px / 100% 64px no-repeat;
}
#presentation-titles {
	width: 100%;
	top: 4px;
	font-size: 20px;
	letter-spacing: 6px;
	color: #78abf7;
}
#img-presentation-blinky, #img-presentation-pinky, #img-presentation-inky, #img-presentation-clyde {
	left: 70px;
	width: 56px;
	height: 56px;
}
#img-presentation-blinky { top: 40px; }
#img-presentation-pinky  { top: 114px; }
#img-presentation-inky   { top: 188px; }
#img-presentation-clyde  { top: 262px; }

#presentation-character-blinky, #presentation-character-pinky, #presentation-character-inky, #presentation-character-clyde,
#presentation-name-blinky, #presentation-name-pinky, #presentation-name-inky, #presentation-name-clyde {
	height: 36px;
	line-height: 36px;
	font-size: 28px;
	letter-spacing: 3px;
	white-space: nowrap;
}
#presentation-character-blinky, #presentation-character-pinky, #presentation-character-inky, #presentation-character-clyde {
	left: 170px;
	width: 220px;
}
#presentation-name-blinky, #presentation-name-pinky, #presentation-name-inky, #presentation-name-clyde {
	left: 380px;
	width: 260px;
	font-size: 22px;
	letter-spacing: 2px;
	opacity: .9;
}
#presentation-character-blinky, #presentation-name-blinky { top: 50px; }
#presentation-character-pinky,  #presentation-name-pinky  { top: 124px; }
#presentation-character-inky,   #presentation-name-inky   { top: 198px; }
#presentation-character-clyde,  #presentation-name-clyde  { top: 272px; }

#trailer { bottom: 34px; }

@media screen and (min-height:1200px), screen and (min-device-height : 1200px) {

}

@media screen and (max-width:1024px), screen and (min-device-width : 768px) and (max-device-width : 1024px) { 
	#canvas-panel-title-pacman { 
		left: 49px;
		width: 42px;
	}
}