/* ================= BASE ================= */

html,
body {
    margin: 0;
    padding: 0;
    background: #111;
    color: #fff;
    overflow-x: hidden;
}

/* ================= MAP SECTION ================= */

.map-section {
    margin-top: 80px;
    padding: 20px 40px;
}

.left-panel {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.map-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
}

.map-image {
    width: 100%;
    display: block;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

#mapMarkers {
    position: absolute;
    inset: 0;
}

.map-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff1e00;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 30, 0, 0.9);
}

.special-marker {
    background: gold;
    box-shadow: 0 0 8px gold;
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* ================= MODERN SEARCH CLEAN ================= */

.search-box-left {
    position: relative;
    margin-bottom: 20px;
}

.search-box-left input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border-radius: 50px;
    font-size: 16px;

    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);

    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;

    transition: all 0.3s ease;
}

.search-box-left input:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.search-box-left input:focus {
    outline: none;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid #ff1e00;
}

.search-box-left input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.form-control,
.form-control:hover,
.form-control:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    text-align: center;
    /* 👈 เพิ่มบรรทัดนี้ */
}

.search-box-left input:-webkit-autofill,
.search-box-left input:-webkit-autofill:hover,
.search-box-left input:-webkit-autofill:focus,
.search-box-left input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.05) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* ================= PANEL TITLE LEFT LINE ================= */

.panel-title {
    position: relative;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    padding-left: 18px;
    margin-bottom: 20px;
}

/* เส้นแดงด้านซ้าย */
.panel-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: #ff1e00;
    border-radius: 4px;
}

/* ================= RESULT LIST ================= */

.result-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

/* modern card item */
.result-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    font-size: 15px;
}

/* hover */
.result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 30, 0, 0.4);
    transform: translateX(6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* active click */
.result-item:active {
    transform: scale(0.98);
}

/* scrollbar */
.result-list::-webkit-scrollbar {
    width: 6px;
}

.result-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* ================= POPUP ================= */

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    position: relative;
    background: #0f0d0d;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #fff;
}

/* ================= POPUP INFO CENTER ================= */

.popup-info {
    text-align: center;
    margin-bottom: 30px;
}

.info-block {
    margin-bottom: 25px;
}

.info-label {
    font-size: 13px;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 6px;
}

.info-value {
    font-size: 28px;
    font-weight: bold;
}

/* ================= REWARD SECTION ================= */

.reward-title {
    text-align: center;
    font-size: 20px;
    margin-bottom: 15px;
}

/* ================= REWARD TABLE ================= */

.reward-table-wrapper {
    max-height: 260px;
    overflow-y: auto;
    border-radius: 10px;
    background: #1c1c1c;
    padding: 10px;
}

.reward-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.reward-table th:nth-child(1),
.reward-table td:nth-child(1) {
    width: 20%;
}

.reward-table th:nth-child(2),
.reward-table td:nth-child(2) {
    width: 50%;
}

.reward-table th:nth-child(3),
.reward-table td:nth-child(3) {
    width: 30%;
}

.reward-table th {
    background: #313131;
    color: #ccc;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.reward-table td {
    padding: 18px;
    text-align: center;
    border-bottom: 1px solid #444;
    vertical-align: middle;
    font-size: 14px;
}

.reward-table img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.reward-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}


/* ================= SCROLL BAR ================= */

.reward-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.reward-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

.result-id {
    color: #ff1e00;
    font-weight: 600;
    margin-right: 8px;
}