<style>
/* CSS Inti Chatbot */
#kaitou-chat-button,#kaitou-chat-window,#kaitou-chat-header,#kaitou-chat-input-area,#kaitou-toast-notification{font-family:'Arial',sans-serif}#kaitou-chat-button{position:fixed;bottom:65px;right:25px;background-color:#ff4f4f;color:#fff;width:60px;height:60px;border-radius:50%;border:none;box-shadow:0 4px 10px rgba(0,0,0,.2),0 0 15px rgba(255,79,79,.5);font-size:28px;display:flex;justify-content:center;align-items:center;cursor:pointer;z-index:9998;transition:transform .3s ease,box-shadow .3s ease;animation:pulse-red 2s infinite}@keyframes pulse-red{0%{box-shadow:0 4px 10px rgba(0,0,0,.2),0 0 15px rgba(255,79,79,.5)}50%{box-shadow:0 4px 15px rgba(0,0,0,.3),0 0 25px rgba(255,79,79,1)}100%{box-shadow:0 4px 10px rgba(0,0,0,.2),0 0 15px rgba(255,79,79,.5)}}#kaitou-chat-button:hover{transform:scale(1.15) rotate(15deg);box-shadow:0 6px 20px rgba(0,0,0,.4),0 0 30px rgba(255,100,100,1)}#kaitou-chat-window{position:fixed;bottom:100px;right:25px;width:350px;max-width:90%;height:500px;background:#fff;border-radius:15px;box-shadow:0 5px 20px rgba(0,0,0,.2);display:flex;flex-direction:column;overflow:hidden;z-index:9999;transform-origin:bottom right;transform:scale(0);opacity:0;visibility:hidden;transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .3s ease,visibility .3s,background-color .3s ease,color .3s ease}#kaitou-chat-window:fullscreen{width:100vw;height:100vh;max-width:100%;border-radius:0}#kaitou-chat-window.visible{transform:scale(1);opacity:1;visibility:visible}#kaitou-chat-window.shake{animation:shake-window .5s cubic-bezier(.36,.07,.19,.97) both}@keyframes shake-window{10%,90%{transform:scale(1) translate3d(-1px,0,0)}20%,80%{transform:scale(1) translate3d(2px,0,0)}30%,50%,70%{transform:scale(1) translate3d(-4px,0,0)}40%,60%{transform:scale(1) translate3d(4px,0,0)}}#kaitou-chat-header{background:#333;color:#fff;padding:15px;font-weight:700;display:flex;justify-content:space-between;align-items:center;position:relative;overflow:hidden;flex-shrink:0;transition:background-color .3s ease,color .3s ease}#kaitou-chat-header::after{content:'';position:absolute;top:0;left:0;width:100%;height:2px;background:linear-gradient(90deg,transparent,rgba(255,79,79,.8),transparent);animation:scan-animation 3s linear infinite}@keyframes scan-animation{0%{transform:translateY(-10px)}100%{transform:translateY(60px)}}#kaitou-header-controls{display:flex;align-items:center;gap:10px}#kaitou-header-controls .header-btn{cursor:pointer;font-size:20px;z-index:1;user-select:none}
#kaitou-coin-balance { display: flex; align-items: center; gap: 5px; font-size: 16px; font-weight: bold; user-select: none; cursor:pointer; }
#kaitou-chat-body-container{flex-grow:1;position:relative;overflow:hidden}
#kaitou-chat-body-container::before {content:'';position:absolute;top:0;left:0;width:100%;height:40%;background:linear-gradient(to bottom,rgba(0,0,0,0.3),transparent);z-index:5;pointer-events:none;}
#kaitou-3d-viewer{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;--poster-color:transparent;background-color:#f0f0f0; transition: all .3s ease;}
#kaitou-chat-messages {position:absolute;bottom:0;left:0;width:100%;height:100%;pointer-events:none;display:flex;flex-direction:column;justify-content:flex-end;}
#kaitou-chat-scroll-area {width:100%;max-height:75%;overflow-y:auto;padding:15px;display:flex;flex-direction:column;gap:12px;pointer-events:auto;box-sizing:border-box;}
.chat-message{padding:10px 15px;border-radius:20px;max-width:80%;line-height:1.4;position:relative;z-index:11;flex-shrink:0}.user-message{background-color:#0072C6;color:#fff;align-self:flex-end;border-bottom-right-radius:5px;margin-right:5px}.bot-message{background-color:rgba(240,240,240,.85);color:#333;align-self:flex-start;border-bottom-left-radius:5px; transition: background-color .3s ease,color .3s ease;}.bot-message .typing-cursor{display:inline-block;width:8px;height:1.2em;background-color:#ff4f4f;margin-left:4px;animation:blink-cursor .7s infinite}@keyframes blink-cursor{0%,100%{opacity:1}50%{opacity:0}}#kaitou-chat-input-area{display:flex;flex-direction:column;border-top:1px solid #f0f0f0;padding:10px;flex-shrink:0;background:#fff;z-index:12; transition: background-color .3s ease, border-top-color .3s ease;}
#kaitou-media-indicator {display: none;align-items: center;justify-content: space-between;padding: 8px 12px;margin-bottom: 8px;background-color: #e9f5ff;border: 1px solid #b3d7ff;border-radius: 20px;font-size: 13px;color: #005a9e; transition: background-color .3s ease,color .3s ease, border-color .3s ease;}
#kaitou-media-indicator-text {white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
#kaitou-remove-media-btn {background: none;border: none;font-size: 20px;color: #005a9e;cursor: pointer;line-height: 1;margin-left: 10px;padding: 0 4px;}
#kaitou-input-wrapper {display: flex;width: 100%;align-items: center;}
#kaitou-chat-input{flex-grow:1;border:none;padding:10px;border-radius:20px;background:#f0f0f0;outline:none; transition: background-color .3s ease,color .3s ease;}#kaitou-send-btn{background:#ff4f4f;color:#fff;border:none;padding:0 15px;margin-left:10px;border-radius:20px;cursor:pointer;font-weight:700;transition:transform .1s ease}#kaitou-send-btn:active{transform:scale(.95)}#kaitou-toast-notification{position:fixed;bottom:100px;right:25px;background-color:#2c3e50;color:#fff;padding:15px 20px;border-radius:10px;box-shadow:0 4px 15px rgba(0,0,0,.2);z-index:10000;display:flex;align-items:center;gap:15px;transform:translateY(20px);opacity:0;visibility:hidden;transition:transform .5s cubic-bezier(.68,-.55,.27,1.55),opacity .4s ease;cursor:pointer}#kaitou-toast-notification.visible{transform:translateY(0);opacity:1;visibility:visible;animation:digital-glitch 1.5s 1}@keyframes digital-glitch{0%,100%{transform:translateY(0)}10%{transform:translate(-2px,2px)}20%{transform:translate(2px,-2px)}30%{transform:translate(-2px,-2px);text-shadow:-1px 0 red,1px 0 cyan}40%{transform:translate(2px,2px);text-shadow:none}80%{transform:translateY(0)}85%{transform:translateX(5px)}90%{transform:translateX(-5px)}95%{transform:translateX(2px)}}#kaitou-toast-text strong{color:#ff4f4f;text-shadow:0 0 5px #ff4f4f}#kaitou-toast-close{background:0 0;border:none;color:#fff;font-size:24px;line-height:1;cursor:pointer;opacity:.7}#kaitou-toast-close:hover{opacity:1}
.video-container-base{position:relative;width:200px;background-color:#000;border-radius:10px;overflow:hidden;border:2px solid #ff4f4f;cursor:pointer}
.user-message .video-container-base{margin-bottom:10px}
.video-thumbnail-img{display:block;width:100%;height:auto}
.video-play-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:48px;color:rgba(255,255,255,.8);background-color:rgba(0,0,0,.4);border-radius:50%;width:60px;height:60px;display:flex;justify-content:center;align-items:center;pointer-events:none;transition:transform .2s ease}
.video-container-base:hover .video-play-icon{transform:translate(-50%,-50%) scale(1.1)}
.upload-progress-container{height:10px;width:100%;background-color:rgba(255,255,255,.3);border-radius:5px;margin-top:8px;overflow:hidden}
.upload-progress-bar{width:0;height:100%;background-color:#4caf50;transition:width .2s linear}
.kaitou-dark-mode #kaitou-chat-window { background-color: #1E1E1E; }
.kaitou-dark-mode #kaitou-chat-header { background-color: #111; color: #f0f0f0; }
.kaitou-dark-mode #kaitou-3d-viewer { background-color: #2a2a2a; }
.kaitou-dark-mode .bot-message { background-color: rgba(60, 60, 60, 0.85); color: #e0e0e0; }
.kaitou-dark-mode #kaitou-chat-input-area { background-color: #1E1E1E; border-top-color: #333; }
.kaitou-dark-mode #kaitou-chat-input { background-color: #333; color: #e0e0e0; }
.kaitou-dark-mode #kaitou-chat-input::placeholder { color: #888; }
.kaitou-dark-mode #kaitou-media-indicator { background-color: #2c3e50; color: #bdc3c7; border-color: #34495e; }
.kaitou-dark-mode #kaitou-remove-media-btn { color: #bdc3c7; }
#kaitou-animation-controls, #kaitou-mission-panel { position: absolute; top: 55px; left: 0; width: 100%; background-color: rgba(255, 255, 255, 0.98); z-index: 17; box-sizing: border-box; border-bottom: 1px solid #e0e0e0; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transform: translateY(-20px); opacity: 0; visibility: hidden; transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s; max-height: 180px; overflow-y: auto; }
#kaitou-animation-controls.visible, #kaitou-mission-panel.visible { transform: translateY(0); opacity: 1; visibility: visible; }
#kaitou-animation-controls { padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
#kaitou-animation-controls button { background-color: #f0f0f0; border: 1px solid #ddd; color: #333; padding: 6px 12px; border-radius: 15px; cursor: pointer; font-size: 12px; transition: background-color 0.2s ease, transform 0.1s ease; }
#kaitou-animation-controls button:hover { background-color: #e0e0e0; }
#kaitou-animation-controls button:active { transform: scale(0.95); }
.kaitou-dark-mode #kaitou-animation-controls { background-color: rgba(40, 40, 40, 0.98); border-bottom-color: #333; }
.kaitou-dark-mode #kaitou-animation-controls button { background-color: #3a3a3a; border-color: #555; color: #e0e0e0; }
.kaitou-dark-mode #kaitou-animation-controls button:hover { background-color: #4f4f4f; }
#kaitou-mission-panel { padding: 15px; display: flex; flex-direction: column; gap: 10px; }
#mission-panel-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 5px; }
#mission-header-left { display: flex; flex-direction: column; align-items: flex-start; }
#mission-panel-title { font-weight: bold; font-size: 14px; color: #333; }
#mission-reset-countdown { font-size: 11px; color: #777; margin-top: 2px; }
#streak-counter { font-size: 14px; font-weight: bold; color: #ff4f4f; }
#mission-list { list-style-type: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#mission-list li { font-size: 13px; color: #555; transition: color 0.3s ease, text-decoration 0.3s ease; }
#mission-list li.completed { color: #888; text-decoration: line-through; }
#mission-list li::before { content: '-'; margin-right: 10px; font-weight: bold; color: #ff4f4f; transition: content 0.3s ease; }
#mission-list li.completed::before { content: '*'; color: #4caf50; }
.kaitou-dark-mode #kaitou-mission-panel { background-color: rgba(40, 40, 40, 0.98); border-bottom-color: #333; }
.kaitou-dark-mode #mission-panel-title { color: #e0e0e0; }
.kaitou-dark-mode #mission-reset-countdown { color: #aaa; }
.kaitou-dark-mode #mission-list li { color: #bbb; }
.kaitou-dark-mode #mission-list li.completed { color: #777; }
#kaitou-hub-popup { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 20; display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
#kaitou-hub-box { background: #fff; padding: 0; border-radius: 15px; width: 90%; max-width: 320px; box-shadow: 0 5px 25px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; }
.hub-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; border-bottom: 1px solid #eee; }
.hub-header h3 { margin: 0; font-size: 18px; }
.close-hub-btn { font-size: 28px; font-weight: bold; cursor: pointer; line-height: 1; color: #888; }
.hub-tabs { display: flex; background-color: #f9f9f9; }
.hub-tab-btn { flex: 1; padding: 12px 10px; border: none; background: transparent; cursor: pointer; font-weight: bold; color: #888; border-bottom: 3px solid transparent; transition: all 0.2s; }
.hub-tab-btn.active { color: #FF4F4F; border-bottom-color: #FF4F4F; }
.hub-content-wrapper { padding: 15px; max-height: 300px; overflow-y: auto; }
.hub-content { display: none; }
.hub-content.active { display: block; }
#kaitou-shop-list, #history-list { list-style: none; padding: 0; margin: 0; }
#kaitou-shop-list li, #history-list li { display: flex; align-items: center; padding: 15px 10px; border-bottom: 1px solid #f0f0f0; }
#kaitou-shop-list li:last-child, #history-list li:last-child { border-bottom: none; }
.shop-item-icon { font-size: 24px; margin-right: 15px; }
.item-details { flex-grow: 1; }
.item-name { display: block; font-weight: bold; }
.item-price, .item-timestamp { display: block; font-size: 13px; color: #666; }
.item-code { font-family: monospace; background: #eee; padding: 2px 6px; border-radius: 4px; user-select: all; }
.redeem-btn, .copy-btn { background: #FF4F4F; color: white; padding: 8px 15px; border: none; border-radius: 20px; cursor: pointer; font-weight: bold; transition: all 0.2s; white-space: nowrap; }
.redeem-btn:hover:not(:disabled), .copy-btn:hover { background-color: #333; }
.redeem-btn:disabled { background-color: #ccc; cursor: not-allowed; }
#no-history-msg { text-align: center; padding: 20px; color: #888; }
.kaitou-dark-mode #kaitou-hub-box { background: #2c3e50; }
.kaitou-dark-mode .hub-header { border-bottom-color: #34495e; color: #ecf0f1; }
.kaitou-dark-mode .hub-tabs { background-color: #21303e; }
.kaitou-dark-mode .hub-tab-btn { color: #bdc3c7; }
.kaitou-dark-mode .hub-tab-btn.active { color: #ff8a80; border-bottom-color: #ff8a80; }
.kaitou-dark-mode #kaitou-shop-list li, .kaitou-dark-mode #history-list li { border-bottom-color: #34495e; }
.kaitou-dark-mode .item-name { color: #fff; }
.kaitou-dark-mode .item-price, .kaitou-dark-mode .item-timestamp { color: #bdc3c7; }
.kaitou-dark-mode .item-code { background: #34495e; color: #f1c40f; }
.kaitou-dark-mode #no-history-msg { color: #95a5a6; }
#kaitou-mission-map-container { position: absolute; top: 60px; right: 10px; width: 120px; height: 120px; border: 2px solid #ff4f4f; border-radius: 10px; background-color: #f0f0f0; background-image: url('https://files.catbox.moe/7zs1jh.jpg'); background-size: cover; background-position: center; box-shadow: 0 2px 10px rgba(0,0,0,0.3); z-index: 14; cursor: pointer; overflow: hidden; display: none; }
#kaitou-mission-map-container.visible { display: block; animation: zoomIn 0.3s ease-out; }
@keyframes zoomIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.monster-dot { position: absolute; width: 12px; height: 12px; background-color: red; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 8px rgba(255, 0, 0, 0.8); animation: pulse-dot 1.5s infinite; cursor: pointer; transition: transform 0.2s ease; }
.monster-dot:hover { transform: scale(1.3); }
@keyframes pulse-dot { 0% { box-shadow: 0 0 8px rgba(255, 0, 0, 0.8); } 50% { box-shadow: 0 0 14px rgba(255, 0, 0, 1); } 100% { box-shadow: 0 0 8px rgba(255, 0, 0, 0.8); } }
#mission-map-alert { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; background-color: #ff4f4f; color: white; border-radius: 50%; display: none; justify-content: center; align-items: center; font-size: 14px; font-weight: bold; animation: shake-alert 3s infinite; }
#mission-map-alert.visible { display: flex; }
@keyframes shake-alert { 0%, 100% { transform: rotate(0); } 10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); } 20%, 40%, 60%, 80% { transform: rotate(10deg); } }
#kaitou-battle-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 50; display: none; justify-content: center; align-items: center; color: white; }
#battle-box.shake-hard { animation: shake-hard-anim 0.4s 1; }
@keyframes shake-hard-anim { 10%, 90% { transform: translate3d(-2px, 0, 0); } 20%, 80% { transform: translate3d(3px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-5px, 0, 0); } 40%, 60% { transform: translate3d(5px, 0, 0); } }
#battle-monster-img.flash-red { animation: flash-red-anim 0.3s 1; }
@keyframes flash-red-anim { 0%, 100% { filter: none; } 50% { filter: brightness(1.5) drop-shadow(0 0 10px red); } }
#kaitou-battle-viewer { width: 100px; height: 100px; --poster-color: transparent; }
#battle-box { padding: 15px; background: #2c3e50; border-radius: 15px; border: 3px solid #ff4f4f; box-shadow: 0 0 25px rgba(255, 79, 79, 0.5); text-align: center; width: 90%; max-width: 320px; position: relative; }
#battle-arena { display: flex; justify-content: space-between; align-items: flex-end; height: 120px; }
#player-side, #enemy-side { width: 48%; display: flex; flex-direction: column; align-items: center; }
#battle-monster-img { width: 100px; height: 100px; margin-bottom: 0; }
.battle-name { font-weight: bold; margin-bottom: 5px; text-shadow: 1px 1px 2px #000; }
.hp-bar-container { width: 100%; height: 15px; background-color: #1a2531; border: 2px solid #fff; border-radius: 10px; overflow: hidden; }
.hp-bar { height: 100%; transition: width 0.3s ease-out; }
#player-hp-bar { background: linear-gradient(to right, #2ecc71, #28a745); }
#enemy-hp-bar { background: linear-gradient(to right, #e74c3c, #c0392b); }
.hp-text { font-size: 13px; font-weight: bold; margin-top: 3px; }
#battle-log-area { height: 60px; background: rgba(0, 0, 0, 0.3); border-radius: 5px; padding: 8px; margin: 10px 0; overflow-y: auto; text-align: left; font-size: 12px; border: 1px solid rgba(255,255,255,0.2); }
#battle-log-area p { margin: 0 0 4px; padding: 0; color: #fff; font-family: monospace; }
#battle-ui-bottom { margin-top: 10px; }
#special-meter-container { width: 100%; height: 20px; background-color: #1a2531; border: 2px solid #f1c40f; border-radius: 10px; margin-bottom: 15px; position: relative; overflow: hidden; }
#special-meter-bar { width: 0%; height: 100%; background: linear-gradient(to right, #f1c40f, #f39c12); transition: width 0.3s ease; }
#special-meter-text { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 12px; color: white; text-shadow: 1px 1px 2px #000; }
#battle-action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-btn { background-color: #3498db; color: white; border: 2px solid #2980b9; padding: 10px; font-size: 14px; font-weight: bold; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.action-btn:hover:not(:disabled) { background-color: #2980b9; transform: translateY(-2px); }
.action-btn:disabled { background-color: #95a5a6; border-color: #7f8c8d; cursor: not-allowed; }
#special-move-btn { grid-column: 1 / -1; background-color: #e67e22; border-color: #d35400; }
#special-move-btn:disabled { background-color: #95a5a6; border-color: #7f8c8d; }
#battle-result-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: none; justify-content: center; align-items: center; z-index: 55; border-radius: 15px; }
#battle-result-text { font-size: 48px; font-weight: bold; text-transform: uppercase; transform: scale(0); animation: zoom-in-result 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards; }
#battle-result-text.win-text { color: #f1c40f; text-shadow: 0 0 15px #f1c40f, 0 0 5px #fff; }
#battle-result-text.lose-text { color: #c0392b; text-shadow: 0 0 15px #c0392b, 0 0 5px #000; }
@keyframes zoom-in-result { to { transform: scale(1); } }
#kaitou-username-popup { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 10001; display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
#kaitou-username-box { background: #fff; padding: 25px; border-radius: 15px; width: 90%; max-width: 300px; box-shadow: 0 5px 25px rgba(0,0,0,0.2); text-align: center; font-family: 'Arial', sans-serif; }
#kaitou-username-box h3 { margin-top: 0; margin-bottom: 15px; }
#kaitou-username-box p { font-size: 14px; color: #666; margin-bottom: 20px; line-height: 1.4; }
#kaitou-username-input { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #ddd; font-size: 16px; margin-bottom: 20px; box-sizing: border-box; text-align: center; }
#kaitou-save-username-btn { background: #ff4f4f; color: white; padding: 12px 20px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; width: 100%; font-size: 16px; transition: background-color 0.2s; }
#kaitou-save-username-btn:hover { background-color: #e04343; }
.kaitou-dark-mode #kaitou-username-box { background: #2c3e50; color: #ecf0f1; }
.kaitou-dark-mode #kaitou-username-box p { color: #bdc3c7; }
.kaitou-dark-mode #kaitou-username-input { background-color: #34495e; color: #ecf0f1; border-color: #4a6278; }
.kaitou-dark-mode #kaitou-username-input::placeholder { color: #8a9ba8; }

/* === CSS UNTUK TAMPILAN PERINGKAT BARU & POPUP LEADERBOARD === */
#kaitou-rank-display {
    position: absolute;
    top: 60px; /* Di bawah header */
    left: 15px;
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    z-index: 16;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.9);
    visibility: hidden;
}
#kaitou-rank-display.visible {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}
#kaitou-rank-display:hover { transform: scale(1.1); }
/* GANTI BLOK CSS LAMA ANDA DENGAN YANG INI */
#kaitou-leaderboard-popup {
    position: absolute; /* Diubah dari fixed ke absolute */
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10002;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.leaderboard-box {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    width: 95%; /* Dibuat sedikit lebih lebar untuk padding */
    max-width: 340px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    position: relative; /* Dihapus: absolute, top, left, transform */
    max-height: 450px; /* Diubah dari 80vh agar pas di jendela 500px */
    display: flex;
    flex-direction: column;
}
.leaderboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.leaderboard-header h3 { margin: 0; font-size: 20px; color: #333; }
.close-leaderboard-btn { font-size: 28px; font-weight: bold; cursor: pointer; line-height: 1; color: #aaa; }
.leaderboard-type-selector { display: flex; gap: 10px; margin-bottom: 15px; }
.leaderboard-type-btn { flex: 1; padding: 8px; border: 1px solid #ddd; background-color: #f0f0f0; border-radius: 8px; cursor: pointer; font-weight: bold; transition: all 0.2s; }
.leaderboard-type-btn.active { background-color: #FF4F4F; color: white; border-color: #FF4F4F; }
#leaderboard-list-container { overflow-y: auto; padding-right: 5px; }
#full-leaderboard-list { padding: 0; margin: 0; list-style: none; counter-reset: leaderboard-counter; }
#full-leaderboard-list li { display: flex; align-items: center; padding: 12px 5px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
#full-leaderboard-list li:last-child { border-bottom: none; }
#full-leaderboard-list li::before { content: counter(leaderboard-counter); counter-increment: leaderboard-counter; font-weight: bold; font-size: 16px; min-width: 30px; text-align: center; color: #FF4F4F; }
.leaderboard-name { flex-grow: 1; font-weight: bold; padding-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-score { font-weight: bold; color: #333; }
.leaderboard-score .score-icon { margin-left: 5px; }
#leaderboard-message { text-align: center; color: #888; padding: 20px; }
.kaitou-dark-mode .leaderboard-box { background: #2c3e50; }
.kaitou-dark-mode .leaderboard-header h3 { color: #ecf0f1; }
.kaitou-dark-mode .close-leaderboard-btn { color: #7f8c8d; }
.kaitou-dark-mode .leaderboard-type-btn { background-color: #3a3a3a; border-color: #555; color: #e0e0e0; }
.kaitou-dark-mode .leaderboard-type-btn.active { background-color: #ff8a80; color: #2c3e50; border-color: #ff8a80; }
.kaitou-dark-mode #full-leaderboard-list li { border-bottom-color: #34495e; }
.kaitou-dark-mode .leaderboard-name, .kaitou-dark-mode .leaderboard-score { color: #fff; }
.kaitou-dark-mode #leaderboard-message { color: #95a5a6; }
/* TAMBAHKAN BLOK CSS BARU INI DI AKHIR */
#kaitou-chat-window:fullscreen #kaitou-leaderboard-popup {
    position: fixed; /* Kembalikan ke fixed saat fullscreen */
}

#kaitou-chat-window:fullscreen .leaderboard-box {
    max-height: 80vh; /* Kembalikan ke tinggi semula saat fullscreen */
}
</style>
