
body {
    margin: 0;
    padding: 0;
    background: #000 url('http://warzironz.com/img/background.png') center/cover no-repeat fixed;
    font-family: "Kanit", sans-serif;
    color: #fff;
}

/* --- กล่องรวม 2 ฝั่ง --- */
.rank-container {
    width: 95%;
    max-width: 1400px;
    margin: 100px auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

/* --- กล่องแต่ละฝั่ง --- */
.rank-box {
    flex: 1;
    min-width: 600px;
    background: rgba(0,0,0,0.65);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

/* --- หัวข้อ --- */
.rank-title {
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 6px;
}

.rank-title::after {
    content: "";
    width: 150px;
    height: 3px;
    background: #ff2b2b;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* --- ตาราง --- */
.rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 17px;
}

.rank-table th {
    background: #111;
    padding: 12px;
    border-bottom: 2px solid #550000;
}

.rank-table td {
    padding: 12px;
    border-bottom: 1px solid #330000;
}

/* --- สีค่าชื่อเสียง --- */
.neg {
    color: #ff2424;
    font-weight: 600;
}

.pos {
    color: #3aff3a;
    font-weight: 600;
}

/* --- จัดกลางค่าชื่อเสียง --- */
.rank-table td:nth-child(1),
.rank-table td:nth-child(3) {
    text-align: center;
}


/* กล่องตารางหลัก */
.rank-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 17px;
    text-align: left;
}

/* ส่วนหัว */
.rank-table th {
    background: #111;
    padding: 14px 12px;
    border-bottom: 2px solid #550000;
    border-right: 1px solid #2b0000;
    font-weight: 600;
}

.rank-table th:last-child {
    border-right: 0;
}

/* ข้อมูล */
.rank-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #330000;
    border-right: 1px solid #2b0000;
}

.rank-table td:last-child {
    border-right: 0;
}

/* จัดกลางคอลัมน์ที่ต้องจัด */
.rank-table td:nth-child(1),
.rank-table td:nth-child(3),
.rank-table th:nth-child(1),
.rank-table th:nth-child(3) {
    text-align: center;
}

/* สี Reputation */
.neg { color: #ff3a3a; font-weight: 600; }
.pos { color: #33ff33; font-weight: 600; }

/* เพิ่มไฮไลท์เลื่อนเมาส์ */
.rank-table tr:hover td {
    background: rgba(255,255,255,0.05);
}


/* เอฟเฟกต์คลื่นเมื่อ hover แถว */
.rank-table tr {
    transition: 0.25s ease;
}

.rank-table tr:hover td {
    background: rgba(255, 50, 50, 0.08); /* เฉดแดงเบาๆ */
    transform: translateX(6px);
    transition: 0.35s cubic-bezier(.25,.46,.45,.94);
}

/* เอฟเฟกต์เฉพาะคอลัมน์ชื่อ */
.rank-table td:nth-child(2) {
    transition: 0.25s ease;
}

.rank-table tr:hover td:nth-child(2) {
    color: #ff4c4c;
    text-shadow: 0 0 8px rgba(255, 60, 60, 0.65);
}

/* เอฟเฟกต์เป็นคลื่นจริง ๆ ไล่ดีเลย์ตามแต่ละช่อง */
.rank-table td {
    position: relative;
}

/* ดีเลย์ในแต่ละช่องให้เกิด Wave */
.rank-table td:nth-child(1) { transition-delay: 0s; }
.rank-table td:nth-child(2) { transition-delay: 0.05s; }
.rank-table td:nth-child(3) { transition-delay: 0.10s; }


/* ไอคอนเหรียญ / มงกุฎ */
.rank-medal {
    width: 26px;
    height: 26px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
}

/* อันดับ 1 – ทอง */
.rank-first {
    color: gold;
    text-shadow: 0 0 10px rgba(255,215,0,0.85);
}

/* อันดับ 2 – เงิน */
.rank-second {
    color: silver;
    text-shadow: 0 0 8px rgba(220,220,220,0.7);
}

/* อันดับ 3 – ทองแดง */
.rank-third {
    color: #d97c00;
    text-shadow: 0 0 8px rgba(255,165,0,0.7);
}


/* ===========================
   🥇 Luxury Background For Top 1–3
   =========================== */

.rank-bg-1 {  /* GOLD */
    background: linear-gradient(90deg, #6a4a00, #e3c34a, #6a4a00);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0,0,0,0.8);
}

.rank-bg-2 {  /* SILVER */
    background: linear-gradient(90deg, #5a5a5a, #dcdcdc, #5a5a5a);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0,0,0,0.8);
}

.rank-bg-3 {  /* BRONZE */
    background: linear-gradient(90deg, #663300, #c97a38, #663300);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0,0,0,0.8);
}

/* พื้นหลังเฉพาะช่อง "ชื่อ" */
.rank-name {
    padding-left: 12px !important;
    border-radius: 6px;
}

/* ให้อันดับ 1–3 โดดเด่นขึ้น */
.rank-table td.rank-bg-1,
.rank-table td.rank-bg-2,
.rank-table td.rank-bg-3 {
    border-radius: 6px;
}
