@charset "utf-8";
/* BaoPiu: trang chủ (login.htm) và Kiếm xu (NhanXu.html) dùng chung khung này.
   Máy tính (>= 880px): tranh images/main-login.jpg là nền, cột 836px đặt đè lên tranh
   (tọa độ cột = tọa độ tranh - 582). Logo 855-1145, băng rôn 590-1410 x 110-352,
   bảng tím 352-688, dải vàng + đảo 688-1140. Điện thoại: tranh được cắt thành từng mảnh. */

:root{
	--bp-brown:#5c2c00;
	--bp-stroke:#854010;
	--bp-cyan:#ccfefb;
	--bp-purple:#9861f0;
	--bp-orange:#fa9a2b;
	--bp-art:url(../images/main-login.jpg?v=home-2);
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body.bp{
	margin:0;
	min-width:320px;
	overflow-x:hidden;
	color:var(--bp-brown);
	font:14px/1.5 Tahoma,Arial,sans-serif;
	background:var(--bp-art) no-repeat center top,var(--bp-cyan);
}
/* Trang chủ: đáy vách đảo trong tranh bị cắt ngang ở y 1140, nên mờ dần vào màu trời. */
body.bp--home{background:linear-gradient(transparent 1030px,var(--bp-cyan) 1136px) no-repeat,var(--bp-art) no-repeat center top,var(--bp-cyan)}
/* Kiếm xu: bảng tím cao theo nội dung, đảo vẽ lại bằng .bp-base ngay dưới bảng; phần đảo
   trong tranh nền (ló ra hai bên bảng) mờ dần vào màu trời. */
body.bp--coins{background:linear-gradient(transparent 630px,var(--bp-cyan) 730px) no-repeat,var(--bp-art) no-repeat center top,var(--bp-cyan)}
.bp a{color:#7b3600}
.bp a:focus-visible,.bp button:focus-visible,.bp input:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 6px #663600}
.sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.bp-stroke{color:#fffbea;text-shadow:-1px -1px var(--bp-stroke),1px -1px var(--bp-stroke),-1px 1px var(--bp-stroke),1px 1px var(--bp-stroke),0 2px 1px var(--bp-stroke)}

.bp-stage{position:relative;width:836px;margin:0 auto}

/* ---- Thanh trên: hai nút mỗi bên logo, tài khoản ở góc phải ---- */
.bp-top{position:relative;z-index:5;height:114px}
.bp-nav{position:absolute;left:8px;right:8px;top:44px;display:flex;gap:8px}
.bp-nav a:nth-child(2){margin-right:auto}
.bp-pill{display:block;width:122px;height:40px;border:2px solid #9a4a07;border-radius:20px;
	background:linear-gradient(#ffe27a 0%,#fbbf2a 45%,#ec8c0b 100%);
	box-shadow:inset 0 2px 0 rgba(255,255,255,.65),inset 0 -3px 0 rgba(150,60,0,.3),0 3px 0 #7a3a04,0 5px 10px rgba(0,0,0,.25);
	color:#fffbea;font:bold 16px/36px Arial,sans-serif;text-align:center;text-decoration:none;white-space:nowrap;
	text-shadow:-1px -1px var(--bp-stroke),1px -1px var(--bp-stroke),-1px 1px var(--bp-stroke),1px 1px var(--bp-stroke),0 2px 1px var(--bp-stroke);
	transition:filter .12s,transform .12s}
.bp .bp-pill{color:#fffbea;text-decoration:none}
.bp-pill:hover,.bp-pill:focus-visible{filter:brightness(1.1);transform:translateY(-1px)}
.bp-pill:active{transform:translateY(1px)}
.bp-pill--play{border-color:#9b1d43;background:linear-gradient(#ffb3c7 0%,#ff6f95 45%,#e23d68 100%);
	box-shadow:inset 0 2px 0 rgba(255,255,255,.6),inset 0 -3px 0 rgba(120,0,40,.3),0 3px 0 #7d1434,0 5px 10px rgba(0,0,0,.25);
	text-shadow:-1px -1px #8a1538,1px -1px #8a1538,-1px 1px #8a1538,1px 1px #8a1538,0 2px 1px #8a1538}
.bp-pill[aria-current=page]{border-color:#2f6a08;background:linear-gradient(#e2ff8c 0%,#8fd52a 45%,#4f9c0e 100%);
	box-shadow:inset 0 2px 0 rgba(255,255,255,.6),inset 0 -3px 0 rgba(30,80,0,.3),0 3px 0 #2c5c05,0 0 0 3px #fff8c8,0 5px 10px rgba(0,0,0,.25);
	text-shadow:-1px -1px #2f6408,1px -1px #2f6408,-1px 1px #2f6408,1px 1px #2f6408,0 2px 1px #2f6408}
.bp-user{position:absolute;top:6px;right:8px;display:flex;align-items:center;gap:8px;max-width:257px;height:30px;padding:0 4px 0 12px;
	border:2px solid #e9a63a;border-radius:15px;background:rgba(255,248,214,.94);box-shadow:0 2px 6px rgba(0,0,0,.2);font:bold 13px/26px Arial,sans-serif}
.bp-user__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6a3300}
.bp-user__logout{flex:none;height:22px;padding:0 10px;border:1px solid #b35803;border-radius:11px;background:linear-gradient(#ffe27a,#f2a20f);
	color:#5c2c00;font:bold 12px/20px Arial,sans-serif;cursor:pointer}
.bp-user__logout:hover{filter:brightness(1.08)}

/* ---- Băng rôn (vẽ sẵn trong nền) và logo ---- */
.bp-hero{position:relative;height:238px}
.bp-logo{position:absolute;left:273px;top:-112px;width:290px;height:116px;border-radius:30px}

/* ---- Khu giữa: đúng vùng bảng tím 820x336 ---- */
.bp-main{position:relative;z-index:2;margin:0 8px;min-height:336px}
.bp-base{position:relative;width:960px;height:452px;margin:0 0 0 -62px;pointer-events:none;
	background:var(--bp-art) no-repeat -520px -688px;
	-webkit-mask-image:linear-gradient(#000 76%,transparent 99%);mask-image:linear-gradient(#000 76%,transparent 99%)}
@media (min-width:880px){.bp--home .bp-base{background:none}}

/* Nút cánh gà vẽ sẵn (images/dang-ky-nhanh.png: 2 trạng thái 289x72), chữ là chữ thật. */
.bp-btn{display:block;width:289px;max-width:100%;height:72px;margin:0 auto;padding:14px 36px 0;border:0;border-radius:0;
	background:url(../images/dang-ky-nhanh.png?v=gunny-buttons-2) no-repeat center 0;background-size:289px 144px;
	color:#fff5b4;font:bold 22px/58px Arial,sans-serif;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;
	text-shadow:-2px -2px #633300,2px -2px #633300,-2px 2px #633300,2px 2px #633300,0 3px #633300}
.bp .bp-btn{color:#fff5b4;text-decoration:none}
.bp-btn:hover,.bp-btn:focus-visible{background-position:center -72px;color:#fffbdc}
.bp-btn:active{transform:translateY(1px)}
.bp-btn:disabled{filter:grayscale(.7);cursor:wait}

/* ---- Trang chủ, chưa đăng nhập: ô nhập đặt đè lên khung "Đăng nhập" vẽ sẵn ---- */
.bp-login{position:absolute;inset:0}
.bp-login__title,.bp-login label span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.bp-login form{margin:0}
.bp-field{position:absolute;left:540px;width:178px}
.bp-field--u{top:83px}
.bp-field--p{top:112px}
.bp-field input{display:block;width:100%;height:24px;margin:0;padding:0 6px;border:1px solid #d38b2a;border-radius:4px;background:#fff;
	color:#3b1d00;font:14px/22px Tahoma,Arial,sans-serif}
.bp-login .bp-btn--submit{position:absolute;left:436px;top:152px}
.bp-login__msg{position:absolute;left:400px;top:228px;width:376px;margin:0;text-align:center;font-size:13px;line-height:18px}
.bp-login__error{min-height:18px;margin:0 0 4px;color:#8b0c00;font-weight:bold}
.bp-login__msg p{margin:0}
.bp-register{position:absolute;left:46px;top:32px;text-align:center}
.bp-register p{display:none}

/* ---- Trang chủ, đã đăng nhập: bảng tím vẽ bằng CSS phủ khung đăng nhập vẽ sẵn ---- */
.bp-panel{background:radial-gradient(circle,rgba(255,255,255,.12) .8px,transparent 1.2px) 0 0/4px 4px,var(--bp-purple)}
.bp-account{position:absolute;inset:0;display:flex;gap:16px;padding:18px}
.home-start{position:relative;flex:0 0 533px;height:300px;border-radius:20px;overflow:hidden;container-type:inline-size;
	box-shadow:0 0 0 3px #ffd36b,0 0 0 6px #96480e,0 6px 14px rgba(0,0,0,.35)}
.home-start img{display:block;width:100%;height:100%;object-fit:cover}
/* Chỉ nút "Chạm để bắt đầu" vào game: nút thật đè lên viên thuốc vẽ sẵn (tâm 50%, 87,4%). */
.home-start-btn{position:absolute;left:50%;top:87.4%;width:40%;height:17%;transform:translate(-50%,-50%);
	border:3px solid #b35803;border-radius:999px;background:linear-gradient(#fff07a 0%,#fbd335 35%,#f2a60c 70%,#e08403 100%);
	box-shadow:inset 0 3px 0 rgba(255,255,255,.6),inset 0 -4px 0 rgba(160,70,0,.35),0 3px 0 #8a4200,0 6px 14px rgba(0,0,0,.45);
	display:flex;align-items:center;justify-content:center;color:#fffbea;font:bold clamp(15px,4cqw,22px)/1 Arial,sans-serif;
	text-decoration:none;white-space:nowrap;
	text-shadow:-1px -1px #854010,1px -1px #854010,-1px 1px #854010,1px 1px #854010,0 2px 2px #854010;
	transition:transform .12s,filter .12s;animation:home-start-pulse 1.8s ease-in-out infinite}
.bp .home-start-btn{color:#fffbea;text-decoration:none}
.home-start-btn:hover,.home-start-btn:focus-visible{filter:brightness(1.1);transform:translate(-50%,-50%) scale(1.05)}
.home-start-btn:active{transform:translate(-50%,-50%) scale(.97)}
@keyframes home-start-pulse{0%,100%{box-shadow:inset 0 3px 0 rgba(255,255,255,.6),inset 0 -4px 0 rgba(160,70,0,.35),0 3px 0 #8a4200,0 6px 14px rgba(0,0,0,.45)}
	50%{box-shadow:inset 0 3px 0 rgba(255,255,255,.6),inset 0 -4px 0 rgba(160,70,0,.35),0 3px 0 #8a4200,0 0 18px 6px rgba(255,226,110,.85)}}
@media (prefers-reduced-motion:reduce){.home-start-btn{animation:none}}

/* Thẻ cam như khung "Đăng nhập" vẽ sẵn: nền cam, viền đứt nét sáng. */
.bp-card{position:relative;background:var(--bp-orange);border-radius:22px;box-shadow:0 0 0 3px #ffd36b,0 0 0 6px #96480e,0 5px 10px rgba(0,0,0,.25)}
.bp-card::before{content:"";position:absolute;inset:6px;border:2px dashed #ffe7a6;border-radius:17px;pointer-events:none}
.account-side{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:16px 14px 14px;text-align:center}
.account-side h2{margin:0;font:bold 19px/1.2 Arial,sans-serif}
.account-who{margin:6px 0 0;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.account-who strong{display:block;font-size:17px;color:#4a2100}
.account-who span{display:block;color:#5c2c00;font-size:13px}
.account-coins{margin:6px 0 0;width:100%;padding:6px 4px;border-radius:12px;background:rgba(255,241,190,.92);box-shadow:inset 0 0 0 2px #ffd36b}
.account-coins small{display:block;font-size:12px;color:#6b3a07}
.account-coins b{font:bold 24px/1.15 Arial,sans-serif;color:#7b3600}
.account-side .home-rewards{display:block;width:170px;height:44px;margin:8px 0 0;border:2px solid #b35803;border-radius:22px;
	background:linear-gradient(#fbdc50 0%,#f7bb0c 38%,#e28e03 72%,#d57202 100%);
	box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset 0 -3px 0 rgba(160,70,0,.35),0 3px 0 #8a4200;
	color:#fffbea;font:bold 19px/40px Arial,sans-serif;text-decoration:none;
	text-shadow:-1px -1px #854010,1px -1px #854010,-1px 1px #854010,1px 1px #854010,0 2px 1px #854010}
.bp .account-side .home-rewards{color:#fffbea;text-decoration:none}
.account-side .home-rewards:hover,.account-side .home-rewards:focus-visible{filter:brightness(1.08)}
.account-side #reward-amount{margin:4px 0 0;font-size:12px;line-height:1.3;color:#4a2100}
#account-error:empty{display:none}
#account-error{margin:4px 0 0;color:#8b0c00;font-size:12px;font-weight:bold}

/* ---- Hướng dẫn và chân trang ---- */
.bp-guide{position:relative;z-index:2;margin:-8px 8px 0;padding:0}
.bp-guide h2{margin:0 0 12px;text-align:center;font:bold 24px/1.2 Arial,sans-serif}
.bp-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0;padding:0;list-style:none}
.bp-steps li{padding:14px 14px 16px;background:#fff3c4;border:2px solid #e3a73b;border-radius:18px;box-shadow:inset 0 0 0 2px #fffbe6,0 3px #9352142e}
.bp-steps b{display:flex;align-items:center;gap:8px;font-size:15px;line-height:1.3;color:#6d3000}
.bp-steps b::before{content:counter(list-item);flex:none;display:grid;place-items:center;width:28px;height:28px;border:2px solid #d68813;border-radius:50%;background:#ffcc42;color:#7a3a04;font-size:14px}
.bp-steps p{margin:8px 0 0;font-size:13px;line-height:1.55;color:#5c2c00}
.bp-footer{position:relative;z-index:2;padding:26px 16px 30px;text-align:center;font-size:13px;line-height:1.6;color:#3f2a14}
.bp-footer p{margin:0}
.bp-footer nav{margin-top:4px}
.bp-footer nav a{margin:0 8px;color:#6d3000;font-weight:bold}

/* ---- Hộp đăng ký (auth/register.aspx trong khung) ---- */
.bp-dialog{width:min(400px,calc(100vw - 24px));padding:0;border:0;border-radius:22px;background:var(--bp-orange);box-shadow:0 0 0 3px #ffd36b,0 0 0 6px #96480e,0 12px 40px rgba(0,0,0,.45);overflow:hidden}
.bp-dialog::backdrop{background:rgba(30,10,60,.55)}
.bp-dialog__bar{display:flex;align-items:center;justify-content:space-between;padding:10px 12px 8px 18px}
.bp-dialog__bar h2{margin:0;font:bold 18px/1.2 Arial,sans-serif}
.bp-dialog__close{width:34px;height:34px;border:2px solid #9a4a07;border-radius:50%;background:linear-gradient(#ffe27a,#ec8c0b);color:#5c2c00;font:bold 18px/1 Arial,sans-serif;cursor:pointer}
.bp-dialog iframe{display:block;width:100%;height:min(400px,calc(100vh - 110px));border:0;background:#fff}

/* ================= Điện thoại / màn hẹp ================= */
@media (max-width:879px){
	body.bp{background:linear-gradient(#25aefe 0,#5cc7ff 360px,#a9f0ff 560px,var(--bp-cyan) 720px) no-repeat,var(--bp-cyan)}
	.bp-stage{width:auto;max-width:640px;padding:0 16px}
	.bp-top{height:auto;display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:10px 0 12px}
	.bp-nav{position:static;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
	.bp-nav a:nth-child(2){margin-right:0}
	.bp-pill{width:auto;height:38px;font-size:14px;line-height:34px;padding:0 2px;overflow:hidden;text-overflow:clip}
	.bp-user{position:static;order:-1;align-self:flex-end;max-width:100%}
	/* Logo + băng rôn cắt từ tranh, tràn hết bề ngang. */
	.bp-hero{height:auto;margin:0 -16px;aspect-ratio:520/352;background:var(--bp-art) no-repeat 50% 0/384.6% auto}
	.bp-logo{left:22%;top:0;width:56%;height:33%}
	.bp-main{margin:14px 0 0;min-height:0}
	.bp-login,.bp-account{position:relative;inset:auto}
	.bp-login{padding:20px 18px 22px;margin:4px 0 0;background:var(--bp-orange);border-radius:22px;box-shadow:0 0 0 3px #ffd36b,0 0 0 6px #96480e,0 5px 10px rgba(0,0,0,.25)}
	.bp-login::before{content:"";position:absolute;inset:6px;border:2px dashed #ffe7a6;border-radius:17px;pointer-events:none}
	.bp-login form{position:relative}
	.bp-login__title{position:static;width:auto;height:auto;clip:auto;overflow:visible;margin:0 0 10px;text-align:center;font:bold 26px/1.2 Arial,sans-serif;color:#fff3a4;
		text-shadow:-2px -2px #a24a08,2px -2px #a24a08,-2px 2px #a24a08,2px 2px #a24a08,0 3px #863304}
	.bp-field,.bp-login .bp-btn--submit,.bp-login__msg,.bp-register{position:static}
	.bp-field{display:block;width:auto;margin:0 0 10px}
	.bp-login label span{position:static;width:auto;height:auto;clip:auto;overflow:visible;display:block;margin:0 0 3px;color:#fffbea;font:bold 14px/1.3 Arial,sans-serif;
		text-shadow:-1px -1px #854010,1px -1px #854010,-1px 1px #854010,1px 1px #854010}
	.bp-field input{height:42px;font-size:16px;border:2px solid #c7781c;border-radius:10px}
	.bp-login .bp-btn--submit{margin-top:6px}
	.bp-login__msg{width:auto;margin-top:8px}
	.bp-register{margin:22px 0 0}
	.bp-register p{display:block;margin:2px 0 0;color:#4a2100;font-size:13px;font-weight:bold;text-align:center}
	.bp-account{flex-direction:column;gap:16px;padding:14px;border-radius:22px}
	.home-start{flex:none;width:100%;height:auto;aspect-ratio:16/9}
	.account-side{gap:4px;padding:18px 16px 16px}
	.bp-base{width:auto;height:auto;margin:-6px -16px 0;aspect-ratio:960/452;background-position:50% 100%;background-size:208.34% auto}
	.bp-guide{margin:-10px 0 0}
	.bp-steps{grid-template-columns:1fr 1fr;gap:10px}
	.bp-steps li{padding:12px}
}
@media (min-width:520px) and (max-width:879px){
	.bp-hero{aspect-ratio:auto;height:352px;background-size:auto;background-position:50% 0}
	.bp-logo{left:calc(50% - 145px);width:290px;height:116px}
}
@media (max-width:420px){
	.bp-steps{grid-template-columns:1fr}
	.bp-pill{font-size:13px}
}
