/* Reset and Base Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	/* Casino Color Palette */
	/* deprecated brand colors removed to reduce palette size */
	--attention: #22d3ee; /* จุดสนใจ/อินเทอร์แอคทีฟ */
	--accent-strong: #0ea5e9;
	--highlight: #f59e0b;
	--warning: #ff5900;

	/* Dark Theme */
	--bg-primary: #0a0a0a; /* เพิ่มสำหรับ login page */
	--bg-dark: #0a0a0a;
	--bg-secondary: #1a1a1a;
	--bg-card: #1b1b1b70;
	--bg-glass: rgba(255, 255, 255, 0.06);
	--bg-lighter: #2a2a2a;
	--surface-1: #111318;
	--surface-2: #151a22;
	--color-border: rgb(0 229 255 / 45%);
	--color-light: #fbfbfb;
	--color-gray: #c1c1c1;
	--color-dark: #ffffff;
	--color-primary: #22d3ee;

	/* Text Colors */
	--text-primary: #ffffff;
	--text-secondary: rgba(255, 255, 255, 0.6);
	--text-muted: rgba(255, 255, 255, 0.6);
	--text-highlight: #ff5900;	
	--text-accent: #22d3ee;
	--text-accent-hover: #0ea5e9;
	--text-on-light: #0b0f14;
	--text-link-color: #89dde8;
	--text-warning: #ff5900;
	--text-sub: #dfdfdf;

	/* Sizing */
	--header-height: 65px;
	--footer-height: 80px;
	/* Gradients */
	--gradient-primary: linear-gradient(
		135deg,
		var(--attention),
		var(--accent-strong)
	);
	--gradient-gold: linear-gradient(
		135deg,
		var(--attention),
		var(--accent-strong)
	);
	--gradient-hero: linear-gradient(135deg, #0a0a0a, #1a1a1a, #0a363b);
	--gradient-card: linear-gradient(145deg, #262626, #1a1a1a);

	/* Semantic */
	--success: #22c55e;
	--warning: #f59e0b;
	--danger: #ef4444;

	/* Focus ring */
	--focus-ring: rgba(34, 211, 238, 0.55);

	/* Radii & Shadows */
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-btn:50px;
	--shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.25);

	/* Typography scale */
    --fs-h1: clamp(20px, 3vw, 28px);
    --fs-h2: clamp(18px, 3vw, 24px);
    --fs-h3: clamp(14px, 2.5vw, 16px);
	--fs-credit: clamp(22px, 5vw, 30px);
	--fs-small: clamp(12px, 2vw, 14px);
	--fs-body: 16px;
	--lh-body: 1.65;
}

html {
	scroll-behavior: smooth;
	background-color: var(--bg-primary);
}

body::before {
	content: '';
	background: 
		radial-gradient(circle at 30% 20%, rgba(34,211,238,.15) 0%, transparent 30%),
		radial-gradient(circle at 70% 80%, rgba(14,165,233,.12) 0%, transparent 30%);
	animation: float 20s ease-in-out infinite;
	pointer-events: none;
}

body {
	font-family: "Anuphan", sans-serif;
	line-height: var(--lh-body);
	color: var(--text-primary);
	
	overflow-x: hidden;
	min-height: 100vh;
}
main{
	height: 100dvh;
}
button{
	font-family: "Anuphan", sans-serif;
}

h1 {
	font-size: var(--fs-h1);
	line-height: 1.2;
	color: var(--text-accent);
	font-weight: 600;
    margin-bottom: 8px;
}
h2 {
	font-size: var(--fs-h2);
	line-height: 1.3;
}
h3 {
	font-size: var(--fs-h3);
	line-height: 1.35;
}

p, li {
	font-size: var(--fs-body);
}

/* Link Styles */
a {
	color: var(--text-link-color);
	text-decoration: none;
	transition: all 0.3s ease;
}

a:hover {
	color: var(--attention);
	text-decoration: underline;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 10px;
}

/* ========================================
   Bootstrap Replacement Classes for member/register
======================================== */

/* Spacing utilities */
.mt-1 {
	margin-top: 0.5rem !important;
}
.mt-2 {
	margin-top: 1rem !important;
}
.mt-3 {
	margin-top: 1.5rem !important;
}
.mt-4 {
	margin-top: 2rem !important;
}
.mb-0 {
	margin-bottom: 0 !important;
}
.mb-1 {
	margin-bottom: 0.5rem !important;
}
.mb-2 {
	margin-bottom: 1rem !important;
}
.mb-3 {
	margin-bottom: 1.5rem !important;
}
.mb-4 {
	margin-bottom: 2rem !important;
}
.mr-1 {
	margin-right: 0.25rem !important;
}
.mr-2 {
	margin-right: 0.5rem !important;
}
.ml-2 {
	margin-left: 0.5rem !important;
}
.ml-3 {
	margin-left: 1rem !important;
}
.m-0{
	margin: 0 !important;
}
.pb-0 {
	padding-bottom: 0 !important;
}
.p-10{
	padding: 0.625em !important;
}

.l-15px {
	left: 15px;
}

/* Text utilities */
.text-warning {
	color: #ff5900 !important;
}
.text-info{
	color: var(--attention)!important;
}
.text-white {
	color: #fff !important;
}
.text-green {
	color: rgb(47, 255, 50);
}
.text-red {
	color: var(--danger);
}
.text-gray {
	color: var(--color-gray);
}
.text-accent {
	color: var(--text-accent);
}
.text-secondary {
	color: var(--text-secondary);
}
.text-muted{
	color: var(--text-muted);
}

.text-center {
	text-align: center;
}
.text-left {
	text-align: left !important;
}

.text-small {
	font-size: 14px;
}
.text-large {
	font-size: larger;
}
/* font */
.font-500{
	font-weight: 500;
}
.font-700{
	font-weight: 700;
}

/* Header Styles */
.header {
	position: sticky;
	top: 0;
	width: 100%;
	background: rgba(10, 10, 10, 0.95);
	backdrop-filter: blur(20px);
	border-bottom: 1px solid var(--color-border);
	box-shadow: 0 4px 20px rgb(0 218 255 / 8%);
	z-index: 1100;
	transition: all 0.3s ease;
}
.header.scrolled {
	background: rgba(10, 10, 10, 0.98);
	border-bottom-color: rgba(251, 191, 36, 0.6);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-block: 10px;
	height: var(--header-height);
}
.header-buttons {
	display: flex;
	gap: 1rem;
	align-items: end;
	font-size: 0.8em;
}
.logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--text-primary);
}
.logo-icon {
	font-size: 2rem;
	color: var(--text-secondary);
}
.nav {
	display: flex;
	gap: 0.5em;
	font-size: 0.9em;
}

/* Button utilities */
.btn {
	display: flex;
	gap: 0.5rem;
	padding: 0.7rem 1.5rem;
	border: none;
	border-radius: 50px;
	font-family: "Anuphan", sans-serif;
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	align-items: center;
	justify-content: center;
	text-align: center;
	height: 45px;
	min-height: 40px;
	max-width: 200px;
	min-width: 140px;
	&:hover {
		text-decoration: none;
		transform: translateY(-2px);
	}
}
.btn-primary {
	background: linear-gradient(135deg, var(--attention), #0ea5e9);
	color: var(--text-on-light);
	font-weight: 700;
    width:	 100%;
	position: relative;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
	&:hover {
		color: var(--text-primary);
		box-shadow: 0 6px 18px rgb(14 165 233 / 90%);
	}
	&.active{
		color: var(--text-primary);
		box-shadow: 0 6px 18px rgb(14 165 233 / 90%);
	}
}
.btn-normal {
	background: var(--color-light);
	color: var(--text-on-light);
}
.btn-secondary {
	background: var(--bg-glass);
	color: var(--text-primary);
	border: 1px solid var(--color-border);
}
.btn-secondary:hover {
	background: var(--bg-lighter);
}
.btn-white {
	background: #fff;
	color: #000;
	border: 1px solid #ddd;
}
.btn-white:hover {
	background: #f8f9fa;
}
.btn-cancel {
	background: var(--color-light);
	color: var(--text-on-light);
	border: 1px solid #8c5454 !important;
	max-width: fit-content !important;
  &:hover {
    background: var(--color-light);
	color: var(--text-warning);
  }
}
.btn-circle {
	max-width: 1em;
	min-width: unset;
	width: 1em!important;
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}
.btn-glass {
	background: rgba(255, 255, 255, 0.08);
	color: var(--text-primary);
	border: 1px solid rgba(255, 255, 255, 0.22);
	backdrop-filter: blur(10px);
}
.btn-lq-glass {
	/* Liquid Glass Button - Light */
	background: radial-gradient(55% 552% at 13% 15%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
	background-blend-mode: overlay;
	box-shadow: inset 15px 30px 5px -35px rgba(255, 255, 255, 0.5), inset 15px 19px 10px -20px var(--color-gray), inset -20px -15px 10px -19.8773px var(--color-gray), inset 0px 0px 0px 0.5px var(--color-gray), inset 0px 0px 200px rgba(0, 230, 255, 0.05);
	backdrop-filter: blur(5px);
	color: var(--color-light);
	border-radius: 50px;
	&:hover {
		color: var(--attention);
		box-shadow: inset 15px 30px 5px -35px rgba(255, 255, 255, 0.5), inset 15px 19px 10px -20px var(--color-primary), inset -20px -15px 10px -19.8773px var(--color-primary), inset 0px 0px 0px 1px var(--color-primary), inset 0px 0px 200px rgba(0, 230, 255, 0.05);
		/* #22d3ee */
	}
}
.btn-lq-glass-accent {
	background: radial-gradient(55% 552% at 13% 15%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
	background-blend-mode: overlay;
	box-shadow: inset 15px 30px 5px -35px rgba(255, 255, 255, 0.5), inset 15px 19px 10px -20px var(--color-primary), inset -20px -15px 10px -19.8773px var(--color-primary), inset 0px 0px 0px 0.5px var(--color-primary), inset 0px 0px 200px rgba(0, 230, 255, 0.05);
	backdrop-filter: blur(5px);
	color: var(--color-light);
	border-radius: 50px;
	&:hover {
		color: var(--attention);
		box-shadow: inset 15px 30px 5px -35px rgba(255, 255, 255, 0.5), inset 15px 19px 10px -20px var(--color-primary), inset -20px -15px 10px -19.8773px var(--color-primary), inset 0px 0px 0px 1px var(--color-primary), inset 0px 0px 200px rgba(0, 230, 255, 0.05);
		/* #22d3ee */
	}
}
.btn-glass:hover {
	background: rgba(255, 255, 255, 0.2);	
}
.btn-accent {
	background: var(--gradient-primary);
	color: var(--text-on-light);
	font-weight: 700;
}

/* Generic focus ring */
.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--focus-ring);
	border-radius: var(--radius-md);
}

.bg-danger {
    background: var(--danger);
    color: white;
}

.w-auto{
	width: auto;
}

.warning-section {
	background: rgba(255, 193, 7, 0.1);
	border: 2px solid rgba(255, 193, 7, 0.3);
	border-radius: var(--radius-md);
	/* padding: 15px; */
	padding: 0 10px;
	text-align: center;
}

.warning-section .warning-text {
	color: var(--text-highlight);
	font-size: 0.9em;
	line-height: 1.5;
}

/* ========================================
Menu 
======================================== */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	color: #ffffff;
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0;
}

/* Mobile Menu */
.mobile-menu {
	position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--color-border);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-bottom-right-radius: 55px;
    border-bottom-left-radius: 55px;
    z-index: 950;
}
.mobile-menu.active {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}
.mobile-nav {
	padding: 1rem;
}
.mobile-nav-link {
	display: block;
	color: var(--text-primary);
	text-decoration: none;
	padding: 0.5rem 1rem;
	font-weight: 500;
	transition: all 0.3s ease;
}
.mobile-nav-link:hover {
	color: var(--attention);
	padding-left: 10px;
}
.mobile-menu-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 949;
}
.mobile-menu-backdrop.active {
	opacity: 1;
	visibility: visible;
}
.nav-link {
	color: var(--text-secondary);
	text-decoration: none;
	font-weight: 500;
	position: relative;
	border-bottom: 2px solid transparent;
	border-radius: 10px;
    padding-inline: 1em;
    padding-block: 0.5em;
    transition: all 0.3s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
    text-decoration: none;
	transform: translateY(-5px);
    border-color: var(--color-primary);
}

/* Generic focus ring */
.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--focus-ring);
	border-radius: var(--radius-md);
}
.mobile-auth {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0rem;
    align-items: center;
}

/* ========================================
   Form Input Components
======================================== */
/* Note: .form-group styles are inherited from style.css */

.input-group {
	position: relative;
	display: flex;
	align-items: center;
}
  
.input-group i {
	position: absolute;
	left: 15px;
	color: var(--text-accent);
	z-index: 2;
}
  
.input-group input {
	width: 100%;
	padding: 12px 15px 12px 45px;
	border: 1px solid var(--color-border);
	border-radius: 50px;
	font-size: 0.8em;
	transition: all .3s ease;
	background: var(--bg-glass);
	color: var(--text-primary);
	backdrop-filter: blur(10px);
font-family: 'Anuphan', sans-serif;
}

.input-group input::placeholder {
	color: var(--text-muted);
}
  
.input-group input:focus {
	outline: none;
	border-color: var(--attention);
	background: var(--bg-glass);
}
  
.password-toggle {
	position: absolute;
	right: 15px;
	background: none;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: 5px;
	z-index: 2;
	transition: color .3s ease;
    display: flex;
    justify-content: center; /* Centers items horizontally */
    align-items: center; /* Centers items vertically */
}
  
.password-toggle:hover {
	color: var(--attention);
} 

/* ========================================
	Form Button Group
======================================== */
.form-btn-group {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-top: calc(var(--footer-height) * -1);
	padding-block: 20px;
	max-width: 500px;
    margin-inline: auto;
}

  /* Ensure action button groups are always clickable (sit above backdrops/overlays) */
#btn-group-step-1 .btn,
#btn-group-step-2 .btn,
#btn-group-step-3 .btn,
#btn-group-step-4 .btn {
    pointer-events: auto !important;
}

/* ========================================
   Semantic Form Structure
======================================== */
fieldset {
	border: none;
	padding: 20px 0;
	margin: 0 0 50px 0;
	/* margin: 0 0 20px 0; */
	position: relative;
}  
fieldset legend {
	font-size: 18px;
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 15px;
	padding:10px;
	/* padding-top: 1.2em; */
	position: relative;
}
  


/* Register page styles (merged from assets/register.css) */
.form-card {
	text-align: center;
}
.form-group {
	margin-bottom: 10px;
}
.form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.9);
	font-size: smaller;
}
.form-error-text {
	color: var(--text-warning);
	font-size: 0.8em;
	margin-left: 1em;
}

/* แสดงไอคอนเฉพาะเมื่อมีข้อความ */
.form-error-text:not(:empty)::before {
	content: "\f06a";  /* Font Awesome exclamation-circle */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	margin-right: 0.5em;
	color: var(--text-warning);
}



@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
    
    .mobile-menu {
        display: none !important;
    }
}

/* Mobile - stick buttons to bottom */
@media (max-width: 767px) {
	.form-btn-group {
		position: -webkit-sticky;
		position: sticky;
		justify-content: space-evenly;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 10px 20px;
		z-index: 10;
		backdrop-filter: blur(5px);
	}
}

@media (max-width: 768px) {
	.desktop-nav, .desktop-only {
		display: none;
	}
	.menu-toggle {
		display: block;
	}
	.btn {
		width: 100%;
		max-width: 300px;
		margin: 0.5rem 0;
	}
	.header-buttons {
		flex-direction: column;
		width: 100%;
		align-items: end;
	}
	.header-buttons .btn {
		width: 100%;
		max-width: 280px;
	}
}

/* iPad styles */
@media (min-width: 769px) and (max-width: 1024px) {
	.header-buttons {
		flex-direction: row;
		gap: 1rem;
	}
	.mobile-auth {
		flex-direction: row;
		justify-content: center;
		flex-wrap: wrap;
	}
	.mobile-auth .btn {
		width: auto;
		min-width: 140px;
		max-width: none;
	}
}

@media (max-width: 480px) {
	.container {
		padding: 0 10px;
	}
}



/* ========================================
   LOGIN PAGE STYLES (ใช้ CSS ร่วมกับ register)
======================================== */
.form-page-buttons {
    /* min-height: calc(100dvh - var(--header-height)) ; */
    /* background: var(--bg-primary); */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
    overflow: hidden;
    padding-bottom: var(--footer-height);
}

.form-page-buttons::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: 
    radial-gradient(circle at 30% 0%, rgb(34 211 238 / 38%) 0%, #00000000 30%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
}

.form-header h1 {
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.login-form {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

/* Responsive Design */

@media (max-width: 768px) {
	.flex-grow-1-mobile{
		flex-grow: 1;
	}
    .form-page-buttons {
      	min-height: calc(100dvh - var(--header-height)) ;
    }
  }
  @media screen and (min-width: 1200px) {
 .form-page-buttons {
       min-height: calc(80dvh - var(--header-height)) ;
    }

 .form-btn-group {
  margin-top: calc(var(--footer-height) * -2);
 }
}

/* ========================================
Register Page Styles
======================================== */
.register-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
}
#registerStatus {
	max-width: 150px;
	max-height: 150px;
	opacity: 0.8;
}
#btnStatus {
	display: flex;
	gap: 5px;
	justify-content: center;
	align-items: flex-end
}
  
/* Center register images - unique to member system */
fieldset img {
    display: block !important;
    margin: 0 auto !important;
}

input[type="radio"][id^="myCheckbox"] {
        display: none;
}

label img {
	height: 50px;
	width: 50px;
	transition-duration: 0.2s;
	transform-origin: 50% 50%;
}

:checked + label {
	border-color: #ddd;
}

:checked + label:after {
	content: "✓";
	background-color: var(--attention);
	color: white;
	transform: scale(1);
	font-weight: bold;
	position: absolute;
	margin-top: -20px;
	width: 27px;
	border-radius: 50%;
	margin-left: 5px;
	text-align: center;
}

:checked + label img {
	transform: scale(0.9);
	/* box-shadow: 0 0 5px #333; */
	z-index: -1;
}

.form-control {
	max-width: 350px;
}

/* รูปภาพใต้ legend แต่ละขั้นตอน - จางลง 50% */
fieldset legend + img {
	opacity: 0.5;
}

/* หรือใช้ selector ที่เฉพาะเจาะจงมากขึ้น */
#phoneField legend + img,
#optField legend + img,
#passField legend + img {
	opacity: 0.8;
	transition: opacity 0.3s ease;
}

ul {
	list-style-type: none;
}

li {
	display: inline-block;
}

/* เพิ่ม CSS สำหรับขั้นตอนที่ 4 เมื่อสมัครไม่สำเร็จ */
.register-steps, .progressbar {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: var(--space-6);
	list-style: none;
	padding: 0;
	position: relative;
	gap: 2rem;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
	counter-reset: step-counter;
	margin: 1rem auto;
}

.register-step, .progressbar li {
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 3px solid var(--color-border);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 600;
    transition: all 0.4s ease;
    z-index: 2;
    flex-direction: column;
    font-size: var(--fs-xs);
}
  
.progress-step-num {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    display: block;
}
  
.step-label {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.1;
    display: block;
}
  
/* Active state - circuit powered on */
.register-step.active, .progressbar li.active {
    background: var(--gradient-primary);
    color: var(--text-primary);
    border-color: var(--attention);
    box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.3), 0 0 30px rgba(34, 211, 238, 0.5);
    animation: circuit-pulse 2s infinite;
}
  
.progressbar li.active .progress-step-num {
    color: var(--text-primary);
}
  
.progressbar li.active .step-label {
    color: var(--text-primary);
}
.progressbar li.warning {
	background: var(--warning-color, #ffc107);
	color: var(--text-dark, #212529);
	border-color: var(--warning-color, #ffc107);
	box-shadow: 0 0 0 5px rgba(255, 193, 7, 0.3);
}

.progressbar li.warning .progress-step-num {
	color: var(--text-dark, #212529);
	background: var(--warning-color, #ffc107);
	border-color: var(--warning-color, #ffc107);
}

.progressbar li.warning .step-label {
	color: var(--text-dark, #212529);
	font-weight: 600;
}

@media (max-width: 768px) {
	.progressbar {
		flex-direction: row;
		max-width: 100%;
		gap: 0.5rem;
		overflow: visible;
		justify-content: space-around;
		/* padding: 20px 10px; */		
	}
}

/* ========================================
Custom Alert System - Lightweight replacement for SweetAlert 
======================================== */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.custom-alert {
    background: var(--bg-glass);
    border: 1px solid var(--color-border);
    border-radius: 15px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}
  
.custom-alert-overlay.show .custom-alert {
    transform: scale(1);
}
  
.custom-alert h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}
  
.custom-alert p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
  
.custom-alert-buttons {
	display: flex;
    gap: 10px;
	justify-content: center;
}
  
.custom-alert-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Anuphan', sans-serif;
    font-weight: 500;
    width: 100%;
    max-width: 150px;
    transition: all 0.3s ease;
}
  
.custom-alert-btn.primary {
    background: var(--gradient-primary);
    color: var(--text-on-light);
}
.custom-alert-btn.success {
    background: #10b981;
    color: var(--text-on-light);
}
.custom-alert-btn.warning {
    background: var(--warning);
    color: var(--text-on-light);
}
.custom-alert-btn.dander {
    background: var(--warning);
    color: var(--text-on-light);
}

  
.custom-alert-btn.secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--color-border);
}
  
.custom-alert-btn:hover {
    transform: translateY(-2px);
}
  
/* Custom Alert Types */
.custom-alert.success {
    border-color: #10b981;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}
  
.custom-alert.success h3 {
    color: #10b981;
}
  
.custom-alert.error {
    border-color: #ef4444;
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.2);
}
  
.custom-alert.error h3 {
    color: #ef4444;
}
  
.custom-alert.warning {
    border-color: #f59e0b;
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.2);
}
  
.custom-alert.warning h3 {
    color: #f59e0b;
}
  
.custom-alert.info {
	border-color: var(--color-primary);
	box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}
  
.custom-alert.info h3 {
    color: var(--color-primary);
}
  
/* Toast notifications */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--color-border);
          border-radius: 10px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    z-index: 10000;
    backdrop-filter: blur(10px);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.custom-toast.show {
    transform: translateX(0);
}

.custom-toast.success {
	border-left: 4px solid var(--success);
}

.custom-toast.error {
    border-left: 4px solid var(--danger);
}
  
.custom-toast.warning {
    border-left: 4px solid var(--warning);
}  

/* ========================================
	Bank Selection
======================================== */
.bank-logo-item {
	display: inline-block;
	margin: 5px;
	transition: all 0.3s ease;
}
  
.bank-logo-item label {
	position: relative;
	display: block;
	cursor: pointer;
	transition: all 0.3s ease;
}
  
.bank-logo-item img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 2px solid transparent;
	transition: all 0.3s ease;
	filter: grayscale(20%);
}
  
.bank-logo-item .check-icon {
	position: absolute !important;
	top: -8px !important;
	right: -8px !important;
	background: var(--success) !important;
	color: white !important;
	border-radius: 50% !important;
	width: 20px !important;
	height: 20px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 10px !important;
	opacity: 0 !important;
	transform: scale(0) !important;
	transition: all 0.3s ease !important;
	z-index: 10 !important;
}
  
.bank-logo-item.active img {
	border-color: var(--attention);
	filter: grayscale(0%);
	transform: scale(1.1);
	box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}
  
.bank-logo-item.active .check-icon {
	opacity: 1 !important;
	transform: scale(1) !important;
}
  
  /* Prevent any other checkmarks from appearing */
.bank-logo-item:not(.active) .check-icon {
	opacity: 0 !important;
	transform: scale(0) !important;
	pointer-events: none !important;
}
  
  /* Ensure only one checkmark per bank item */
.bank-logo-item .check-icon {
	content: none !important;
}
  
.bank-logo-item .check-icon:before, .bank-logo-item .check-icon:after {
	content: none !important;
	display: none !important;
}
  
/* ========================================
Bank Selection Dropdown
======================================== */
.bank-dropdown-input {
	margin-bottom: 0;
	position: relative;
	z-index: 1001;
	min-height: 44px;
	box-sizing: border-box;
}
  
/* Ensure dropdown doesn't overlap with next form-group */
.form-group:has(.bank-dropdown-input) {
	position: relative;
}
  
/* Ensure consistent sizing for bank selection */
.bank-dropdown-input,
.bank-dropdown-input input,
.bank-dropdown-input-display {
	box-sizing: border-box;
}
  
.bank-dropdown-input input {
	font-family: 'Anuphan', sans-serif;
	width: 100%;
	padding: 0.8rem 1rem 0.8rem 2.5rem;
	border: 1px solid var(--color-border);
	border-radius: 50px;
	font-size: 0.8rem;
	background: var(--bg-card);
	cursor: pointer;
	position: relative;
	color: var(--text-primary);
	height: 44px;
	box-sizing: border-box;
}

.bank-dropdown-input input:focus {
	outline: none;
	border-color: var(--attention);
	box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.1);
}

.bank-dropdown-input i {
	position: absolute;
	right: 0.8rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.9rem;
	color: var(--text-accent);
	pointer-events: none;
}

/* Custom Input Display for Selected Bank */
.bank-dropdown-input-display {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 0.5rem;
	display: none;
	align-items: center;
	cursor: pointer;
	background: var(--bg-card);
	border-radius: 50px;
	border: 1px solid var(--color-border);
	box-sizing: border-box;
	min-height: 44px;
}

.bank-dropdown-input-display.show {
	display: flex;
}

.bank-dropdown-input-display-logo {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	margin-right: 0.8rem;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
	border: 2px solid var(--color-border);
}

.bank-dropdown-input-display-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.bank-dropdown-input-display-info {
	flex: 1;
	text-align: left;
}
  
.bank-dropdown-input-display-name {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-primary);
	line-height: 1.2;
}
  
.bank-dropdown-input-display-type {
	font-size: 0.7rem;
	color: var(--text-muted);
	line-height: 1.2;
}
  
/* Dropdown List (Hidden by default) */
.bank-dropdown-list {
	border: 1px solid var(--color-border);
	border-radius: 20px;
	overflow: hidden;
	background: var(--bg-card);
	max-height: 300px;
	overflow-y: auto;
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	z-index: 1000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(10px);
	transition: all 0.3s ease;
	pointer-events: auto;
}
  
.bank-dropdown-list.show {
	display: block;
	animation: dropdownFadeIn 0.3s ease;
	/* border: 1px solid var(--attention); */
}
  
/* Add spacing after the entire bank selection section */
.form-group:has(.bank-dropdown-input) {
	margin-bottom: 10px;
}
  
/* Ensure next form-group has proper spacing */
.form-group:has(.bank-dropdown-input) + .form-group {
	margin-top: 1rem;
}
  
@keyframes dropdownFadeIn {
	from {
	  opacity: 0;
	  transform: translateY(-10px);
	}
	to {
	  opacity: 1;
	  transform: translateY(0);
	}
}

.bank-dropdown-item {
	display: flex;
	align-items: center;
	padding: 0.5rem;
	cursor: pointer;
	border-bottom: 1px solid var(--color-border);
	transition: background-color 0.2s ease;
	background: var(--bg-card);
}

.bank-dropdown-item:first-child {
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.bank-dropdown-item:last-child {
	border-bottom: none;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
}

.bank-dropdown-item:hover {
	background: var(--bg-lighter);
}

.bank-dropdown-item.selected {
	background: rgba(34, 211, 238, 0.1);
	border-left: 3px solid var(--attention);
}

/* Bank Logo Circle */
.bank-dropdown-logo {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	margin-right: 0.8rem;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
	border: 2px solid var(--color-border);
}

.bank-dropdown-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

/* Bank Info */
.bank-dropdown-info {
	flex: 1;
	min-width: 0;
	justify-items: flex-start;
}

.bank-dropdown-name {
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 0.2rem;
	color: var(--text-primary);
	line-height: 1.2;
}

.bank-dropdown-type {
	font-size: 0.7rem;
	color: var(--text-muted);
	line-height: 1.2;
}

/* Overlay to close dropdown when clicking outside */
.bank-dropdown-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999;
	display: none;
	background: transparent;
}

.bank-dropdown-overlay.show {
	display: block;
}
  
/* Inline styles moved from register view */
/* reCAPTCHA removed for development */

/* reCAPTCHA removed for development */
ul {
	list-style-type: none;
}

li {
	display: inline-block;
}


/* ========================================
   footer
======================================== */
.footer-info {
	text-align: center;
    display: flex;
    width: 100%;
    height: fit-content;
    justify-content: space-between;
    text-align: center;
    font-size: 0.7em;
    flex-wrap: wrap;
    max-width: 700px;
    padding: 20px;
    margin-inline: auto;
}
.footer-box{
	margin-top: 10px;
	display: flex;
}
.footer-box p{
	font-size: 0.7em;
}
.footer-badge{
	flex-direction: row;
	gap: 15px;
}

.footer-hr{
    margin: 10px;
	border-color: #00edff26;
	width: 100%;
    height: 1px;
}

.badge-item {
	display: flex;
	align-items: center;
	gap: 5px;
	color: var(--text-muted);
}
.badge-item i {
	color: var(--attention);
	font-size: 12px;
}

@media (max-width: 480px) {
	.footer-info {
		flex-direction: column;
	}
	.footer-box{
		display: block;
	}
	.footer-badge{
		display: flex;
		justify-content: center;
	}
}

/* modal */
.custom-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: none;
	z-index: 10000;
	align-items: center;
	justify-content: center;
}

.custom-modal.active {
	display: flex;
}

.custom-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(5px);
}

.custom-modal-content {
	position: relative;
	background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
	border: 1px solid rgba(34, 211, 238, 0.25);
	border-radius: 15px;
	padding: 1.25rem 1rem;
	max-width: 360px;
	width: calc(100% - 32px);
	backdrop-filter: blur(20px);
	animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
	from {
		opacity: 0;
		transform: translateY(50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.custom-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.custom-modal-header h3 {
	color: #ffffff;
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
}

.custom-modal-close {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.75);
	font-size: 1.2rem;
	cursor: pointer;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	transition: background 0.2s ease, color 0.2s ease;
}

.custom-modal-close:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.08);
}

.custom-modal-body {
	display: grid;
	gap: 0rem;
}
/* new css */
/* ใข้ group flex */
.group-title{
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}
/* ใช้ box ที่ขนาดเล็กกว่า เช่นหน้าเกมฟรี */
.d-second{
	width: 200px;
} 
/* ตาราง หน้าชวนเพื่อน */
.btn-view-friend{
	background: var(--bg-glass);
	color: var(--text-primary);
	border: 1px solid var(--color-border);
	width: max-content;
	transition: all 0.3s ease;
	margin: 20px auto;
	text-decoration: none;
}
.btn-view-friend:hover{
	background: var(--attention);
	color: var(--text-on-light);
	transform: translateY(-2px);
}
.box-col-small{
	display: flex;
	flex-direction:column;
	justify-content: center;
	align-items: center;
}
table {
    width: 100%;
    border:none;
    border-collapse: collapse; /* ทำให้เส้นขอบติดกัน */
}
th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-accent);
    background-color: var(--bg-card);
    border-bottom: 2px solid var(--bg-card);
    white-space: nowrap; 
}
td {
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-size: 14px;
    border-bottom: 1px solid var(--bg-card);
    white-space: nowrap;
}
tr:nth-child(even) {
    background-color:var(--bg-lighter);
}
tr:hover {
    background-color: var(--bg-card);
}
td a {
    text-align: center;
    display: block;
}
/* ตาราง หน้าชวนเพื่อน */
.cursor-pointer{
	cursor: pointer;
}
/* ปุ่มอัพโหลด */
.btn-upload{
	display: inline-flex;
    align-items: center;
    justify-content: center;
	width: 100%;
    max-width: 300px;
    border: 1px solid var(--attention);
    padding: 5px 5px;
    border-radius: var(--radius-btn);
    margin-top: 1em;
	cursor: pointer;
	font-size: var(--fs-h3);
}
.btn-upload:hover{
	transform: translateY(-5px);
	box-shadow: 1px 1px 6px var(--attention);
}
.btn-upload label{
	margin: 0!important;
}
#carouselExampleCaptions{
	position: relative;
	width: 100%;
}
.carousel-inner{
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.carousel-inner::-webkit-scrollbar {
	display: none;
}
.carousel-item{
	flex: 0 0 15em;
}