body{
font-family: Arial, sans-serif;
margin: 0;
color: #ffffff;

background: url("img/index.jpg");
background-size: cover;
background-position: center;
background-attachment: fixed;

min-height: 100vh;
}

/* NAVBAR */
.navbar{
position: fixed;
top: 0;
width: 100%;
display: flex;
justify-content: center;
gap: 15px;
padding: 12px;
background: rgba(255,255,255,0.15);
backdrop-filter: blur(10px);
z-index: 1000;
}

/* BUTTON */
.navbar button{
padding: 10px 18px;
border: none;
border-radius: 8px;
cursor: pointer;
color: #fff;
font-weight: 500;
transition: all 0.3s ease;
}

.navbar button:hover{
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* COLORS */
.contact-btn{ background:#007bff; }
.faq-btn{ background:#4e73df; }
.service-btn{ background:#6f42c1; }
.about-btn{ background:#17a2b8; }
.login-btn{ background:#28a745; }

/* HERO */
.hero{
text-align: center;
margin-top: 180px;
}

.hero img{
width: 860px;
max-width: 90%;
animation: float 4s ease-in-out infinite;
}

@keyframes float{
0%{transform:translateY(0)}
50%{transform:translateY(-10px)}
100%{transform:translateY(0)}
}

/* TOP */
.top-products{
text-align: center;
margin-top: 20px;
}

.top-products h3{
font-size: 24px;
font-weight: bold;
color: #FFD700;
-webkit-text-stroke: 1px #000;
text-shadow:
0 0 5px #000,
0 0 10px #000,
0 0 20px gold;

background: rgba(0,0,0,0.8);
padding: 10px 20px;
border-radius: 12px;
display: inline-block;
}

/* 🔥 PODIUM */
.podium{
display:flex;
justify-content:center;
align-items:flex-end;
gap:20px;
margin-top:20px;
}

/* 🔥 กล่องอันดับ */
.rank-box{
position: relative;
background: rgba(0,0,0,0.6);
padding: 24px 16px 16px; /* 🔥 ดันลงทั้งชุด */
border-radius: 12px;
width: 120px;
height: 200px; /* 🔥 สูงขึ้นอีก */

text-align: center;

display:flex;
flex-direction:column;
align-items:center;
justify-content:space-between;

gap:10px;
overflow:visible;
transition: 0.3s;
flex: 0 0 auto;
}

/* hover */
.rank-box:hover{
transform: scale(1.05);
}

/* 🥇 */
.rank-box.first{
transform: translateY(-25px); 
box-shadow: 0 0 25px gold;
z-index:2;
}

/* 👑 มงอันดับ 1 */
.rank-box.first::before{
content:"👑";
position:absolute;
top:-5px; /* 🔥 ลงมาแล้ว */
font-size:24px;
color: gold;
animation: crownFloat 2s ease-in-out infinite;
}

/* 🥈 */
.rank-box.second{
opacity: 0.95;
transform: translateY(-10px);
}

/* 👑 มงอันดับ 2 */
.rank-box.second::before{
content:"👑";
position:absolute;
top:-5px;
font-size:22px;
color: silver;
}

/* 🥉 */
.rank-box.third{
opacity: 0.9;
transform: translateY(-10px);
}

/* 👑 มงอันดับ 3 */
.rank-box.third::before{
content:"👑";
position:absolute;
top:-5px;
font-size:22px;
color: #cd7f32;
}

/* 🔥 avatar */
.avatar{
width:85px !important;
height:85px !important;

min-width:85px;
min-height:85px;

max-width:85px;
max-height:85px;

margin-top:8px; /* 🔥 ลง */

border-radius:50%;
object-fit:cover;

border:2px solid #fff;
background:#222;

display:block;

flex: 0 0 85px;

aspect-ratio:1/1;
overflow:hidden;
}

/* 🥇 */
.avatar.big{
border:3px solid gold;
box-shadow: 
0 0 15px gold,
0 0 30px gold,
0 0 45px rgba(255,215,0,0.7);
}

/* 🥈 เงิน (เพิ่มความขาวให้มันเรือง) */
.rank-box.second .avatar{
border:3px solid #e0e0e0;
box-shadow: 
0 0 10px #ffffff,
0 0 20px #e0e0e0,
0 0 35px #c0c0c0,
0 0 50px rgba(255,255,255,0.8);
}

/* 🥉 ทองแดง (ดันโทนส้มให้เด่น) */
.rank-box.third .avatar{
border:3px solid #cd7f32;
box-shadow: 
0 0 10px #ffb36b,
0 0 20px #cd7f32,
0 0 35px #b87333,
0 0 50px rgba(255,140,60,0.8);
}

/* animation มง */
@keyframes crownFloat{
0%{transform:translateY(0)}
50%{transform:translateY(-5px)}
100%{transform:translateY(0)}
}

/* ชื่อ */
.rank-name{
margin-top:10px; /* 🔥 ลง */
font-weight:bold;
font-size:14px;
color:#fff;
text-shadow:0 0 5px #000;
}

/* เหรียญ */
.rank-medal{
font-size:22px;
margin-top:auto;
}

/* OVERLAY */
.overlay{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.55);
display: none;
z-index: 999;
}

/* POPUP */
.popup{
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
background: rgba(255,255,255,0.1);
backdrop-filter: blur(20px);
padding: 30px;
width: 340px;
border-radius: 15px;
box-shadow: 0 10px 40px rgba(0,0,0,0.4);
display: none;
z-index: 1000;
color:#fff;
}

.popup h2{
text-align: center;
margin-bottom: 20px;
}

.popup form{
display: flex;
flex-direction: column;
align-items: center;
}

.popup input{
width: 260px;
padding: 12px;
margin: 8px 0;
border-radius: 8px;
border: none;
background: rgba(255,255,255,0.2);
color: #fff;
outline: none;
}

.popup input::placeholder{
color: #ddd;
}

.login-submit{
width: 260px;
padding: 12px;
margin-top: 10px;
border: none;
border-radius: 8px;
background: linear-gradient(45deg,#4e73df,#6f42c1);
color: #fff;
font-size: 16px;
cursor: pointer;
transition: 0.3s;
}

.login-submit:hover{
transform: scale(1.03);
box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.register-text{
text-align: center;
margin-top: 12px;
}

.close{
position: absolute;
top: 10px;
right: 15px;
font-size: 22px;
cursor: pointer;
}

/* MOBILE */
@media (max-width:768px){

.hero img{
width:260px;
}

.navbar{
flex-wrap:wrap;
}

.popup{
width:90%;
}

.popup input,
.login-submit{
width:100%;
}

.podium{
flex-direction: column;
align-items: center;
}

.rank-box.first{
transform:none;
}
}