:root{
	--bg: #f6f8fb;
	--ink: #222;
	--brand: #ff79c6; /* hồng mèo */
	--brand-2: #ffd1e6;
	--shadow: 0 10px 30px rgba(0,0,0,.12);
}


*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
	margin:0; font-family:'Nunito', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; color:var(--ink);
	background: #000; /* nền đen để ảnh nổi hơn khi full */
	display:flex; align-items:center; justify-content:center; padding:0;
}

#app{ width:100%; height:auto; }

.frame{
	position:relative; border-radius:0; overflow:hidden; background:#000; box-shadow:none; border:none; width:min(1100px, 100%);
	margin:0 auto; padding:0; text-align:center;
}

.frame .ribbon{ display:none; }

#photo{ display:block; width:100%; height:auto; max-height:85dvh; object-fit:contain; background:#000; margin:0 auto; }

.badge{ position:absolute; left:16px; top:16px; background:rgba(0,0,0,.45); color:#fff; backdrop-filter: blur(8px); border-radius:999px; padding:6px 12px; font-weight:800; box-shadow:none; }

.controls{ position:absolute; left:0; right:0; bottom:16px; display:flex; justify-content:center; }

/* Love overlay */
.love-overlay{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; background: linear-gradient(180deg, rgba(0,0,0,.0), rgba(0,0,0,.35)); padding-top: 24px;}
.love-text{ color:#fff; font-size:clamp(18px, 3.2vw, 28px); font-weight:800; text-shadow:0 4px 18px rgba(0,0,0,.4); margin-bottom: 24px; }
.love-actions{ display:flex; gap:12px; position:relative; margin-top: 12px; }
#yesBtn{ margin-top: 8px; }
#noBtn{ position:absolute; }

/* Caption dưới ảnh */
.caption{ max-width:min(1100px, 100%); margin:10px auto 0; display:flex; flex-direction:column; align-items:center; gap:10px; }
.caption-text{ color:#fff; opacity:.95; font-weight:800; font-size:clamp(14px, 2.6vw, 18px); text-align:center; }
.caption-actions{ display:flex; gap:12px; }

.btn{ border:none; cursor:pointer; border-radius:999px; padding:14px 18px; font-weight:800; box-shadow:var(--shadow); background:#fff; color:var(--ink); transition: transform .12s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.btn:active{ transform: translateY(0); }

.cat-btn{ position:relative; overflow:hidden; }
.cat-btn .paw{ font-size:20px; }
.cat-btn.primary{ background: linear-gradient(135deg, var(--brand), #ffa1d4); color:#fff; }
.cat-btn.primary .text{ margin-right:8px; }
.cat-btn.primary .cat-face{ font-size:14px; opacity:.95; }

/* viền mèo nhấp nháy */
.cat-btn.primary::after{
	content:""; position:absolute; inset:0; border-radius:999px; padding:2px; background: linear-gradient(90deg,#fff,#ffe0ef,#fff); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor; mask-composite: exclude; animation: shine 2s linear infinite;
}

@keyframes shine{ from{ filter:hue-rotate(0deg);} to{ filter:hue-rotate(360deg);} }

/* Trang cuối - Final Page */
.final-page-container{
	position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 40px 20px; text-align: center; z-index: 1000;
}

.final-content{
	max-width: 800px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 40px;
}

.final-text{
	color: #fff; font-size: clamp(16px, 2.5vw, 20px); line-height: 1.8; font-weight: 400;
	text-shadow: 0 2px 10px rgba(0,0,0,.3); opacity: 0.95;
	background: rgba(255,255,255,.1); padding: 30px; border-radius: 20px;
	backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.2);
	box-shadow: 0 8px 32px rgba(0,0,0,.1);
	animation: fadeInUp 1s ease-out;
}

.back-btn{
	background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
	color: #333; font-size: 18px; padding: 16px 32px; border-radius: 50px;
	box-shadow: 0 8px 25px rgba(255,154,158,.4);
	transition: all 0.3s ease; animation: fadeInUp 1s ease-out 0.3s both;
}

.back-btn:hover{
	transform: translateY(-3px); box-shadow: 0 12px 35px rgba(255,154,158,.6);
	background: linear-gradient(135deg, #ff8a95 0%, #fecfef 50%, #fecfef 100%);
}

.back-btn .cat-face{
	font-size: 16px; margin-left: 8px; opacity: 0.9;
}

@keyframes fadeInUp{
	from{ opacity: 0; transform: translateY(30px); }
	to{ opacity: 1; transform: translateY(0); }
}

@keyframes float{
	0%, 100%{ transform: translateY(0px); }
	50%{ transform: translateY(-10px); }
}

@keyframes bounce{
	0%, 100%{ transform: translateY(0px); }
	50%{ transform: translateY(-8px); }
}

@keyframes shimmer{
	0%{ transform: translateX(-100%) translateY(-100%) rotate(45deg); }
	100%{ transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes buttonShine{
	0%{ left: -100%; }
	100%{ left: 100%; }
}

@keyframes gradientShift{
	0%{ background-position: 0% 50%; }
	50%{ background-position: 100% 50%; }
	100%{ background-position: 0% 50%; }
}

@keyframes floatParticle{
	0%{ transform: translateY(100vh) translateX(0px); opacity: 0; }
	10%{ opacity: 1; }
	90%{ opacity: 1; }
	100%{ transform: translateY(-100px) translateX(100px); opacity: 0; }
}

/* Đảm bảo animation hoạt động */
.final-text, .back-btn{
	animation: fadeInUp 1s ease-out;
}

.back-btn{
	animation-delay: 0.3s;
	animation-fill-mode: both;
}

/* Responsive cho trang cuối */
@media (max-width: 768px){
	.final-page-container{ padding: 20px 15px; }
	.final-content{ gap: 30px; }
	.final-text{ padding: 20px; font-size: clamp(14px, 3vw, 18px); }
	.back-btn{ font-size: 16px; padding: 14px 28px; }
}

@media (max-width: 480px){
	.final-page-container{ padding: 15px 10px; }
	.final-content{ gap: 25px; }
	.final-text{ padding: 15px; font-size: clamp(13px, 2.8vw, 16px); line-height: 1.6; }
	.back-btn{ font-size: 14px; padding: 12px 24px; }
}

/* Responsive design cho mobile và tablet */
@media (max-width: 768px){
	.badge{ font-size:12px; }
	.btn{ padding:12px 16px; font-size: 14px; }
	.love-text{ font-size: clamp(16px, 4vw, 24px) !important; }
	.caption-text{ font-size: clamp(12px, 3vw, 16px) !important; }
	#photo{ max-height: 70dvh; }
	.controls{ bottom: 8px; }
	.love-actions{ gap: 8px; }
	.caption-actions{ gap: 8px; }
}

@media (max-width: 480px){
	.btn{ padding: 10px 12px; font-size: 12px; }
	.love-text{ font-size: clamp(14px, 3.5vw, 20px) !important; }
	.caption-text{ font-size: clamp(11px, 2.8vw, 14px) !important; }
	#photo{ max-height: 65dvh; }
	.controls{ bottom: 4px; }
	.love-actions{ gap: 6px; }
	.caption-actions{ gap: 6px; }
}

/* Location Banner Styles */
.location-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999; /* Giảm z-index để không che popup vị trí của trình duyệt */
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(10px);
	padding: 15px;
	animation: slideInDown 0.3s ease-out;
}

.location-banner-content {
	background: #fff3cd;
	border: 1px solid #ffeeba;
	color: #856404;
	border-radius: 15px;
	padding: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	max-width: 400px;
	margin: 0 auto;
	position: relative;
}

.location-banner-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	color: #856404;
	font-size: 18px;
	cursor: pointer;
	padding: 5px;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.location-banner-close:hover {
	background: rgba(133, 100, 4, 0.1);
	transform: scale(1.1);
}

.location-banner-header {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 10px;
	padding-right: 30px;
}

.location-banner-header i {
	color: #ff6b35;
	font-size: 18px;
}

.location-banner-text {
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 15px;
	color: #856404;
}

.location-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* Ẩn nút bỏ qua cho trang troll */
.location-banner-skip {
	display: none !important;
}

/* Hiển thị nút đóng cho trang troll */
.location-banner-close {
	display: flex !important;
	z-index: 1001 !important;
	pointer-events: auto !important;
}

.location-banner-btn {
	width: 100%;
	background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
	color: white;
	border: none;
	border-radius: 8px;
	padding: 12px 20px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.location-banner-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.location-banner-skip {
	background: transparent;
	color: #856404;
	border: 1px solid #ffeeba;
	border-radius: 8px;
	padding: 10px 15px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	min-width: 80px;
}

.location-banner-skip:hover {
	background: rgba(133, 100, 4, 0.1);
	border-color: #856404;
}

/* Mobile optimizations for location banner */
@media (max-width: 768px) {
	.location-banner {
		padding: 10px;
		/* Tối ưu cho mobile - banner nhỏ hơn để không che popup vị trí */
		max-height: 50vh;
		overflow-y: auto;
	}
	
	.location-banner-content {
		padding: 15px;
		border-radius: 12px;
		/* Giảm kích thước banner trên mobile */
		max-width: 350px;
	}
	
	.location-banner-header {
		font-size: 15px;
		margin-bottom: 8px;
	}
	
	.location-banner-text {
		font-size: 13px;
		margin-bottom: 12px;
	}
	
	.location-banner-actions {
		flex-direction: column;
		gap: 8px;
	}
	
	.location-banner-btn {
		width: 100%;
		padding: 14px 20px;
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.location-banner {
		padding: 8px;
	}
	
	.location-banner-content {
		padding: 12px;
	}
	
	.location-banner-header {
		font-size: 14px;
	}
	
	.location-banner-text {
		font-size: 12px;
	}
	
	.location-banner-close {
		top: 8px;
		right: 8px;
		width: 25px;
		height: 25px;
		font-size: 14px;
	}
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
	.location-banner-btn,
	.location-banner-skip {
		min-height: 44px; /* iOS recommended touch target size */
	}
	
	.location-banner-close {
		min-width: 44px;
		min-height: 44px;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.location-banner-content {
		border: 2px solid #000;
		background: #fff;
		color: #000;
	}
	
	.location-banner-btn {
		background: #000;
		color: #fff;
		border: 2px solid #000;
	}
	
	.location-banner-skip {
		border: 2px solid #000;
		color: #000;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.location-banner {
		animation: none;
	}
	
	.location-banner-btn:hover,
	.location-banner-skip:hover,
	.location-banner-close:hover {
		transform: none;
	}
}

@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

