@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700;900&family=Fira+Code:wght@400;700&display=swap');

body, html { margin: 0; padding: 0; width: 100%; height: 100%; background: #0f1015; font-family: 'Inter', sans-serif; color: #fff; overflow: hidden; }

.btn-home { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); color: white; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; cursor: pointer; z-index: 50; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); transition: 0.3s; }
.btn-home:hover { background: rgba(255,255,255,0.2); }
#game-screen .btn-home { position: absolute; bottom: 120px; left: 15px; }

#login-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; background: radial-gradient(circle at center, #2a2d3e 0%, #0f1015 100%); }
.ps5-title { font-weight: 300; letter-spacing: 2px; margin-bottom: 5px; font-size: 28px; }
.ps5-subtitle { color: #8890b5; margin-bottom: 40px; font-size: 14px; }
.profiles { display: flex; gap: 30px; margin-bottom: 30px; }
.profile { text-align: center; cursor: pointer; transition: transform 0.2s; }
.profile:hover { transform: scale(1.1); }
.circle { width: 90px; height: 90px; border-radius: 50%; background-color: #1f2335; background-repeat: no-repeat; border: 3px solid transparent; box-shadow: 0 10px 20px rgba(0,0,0,0.5); transition: border 0.3s; }
.profile:hover .circle { border: 3px solid #fff; }
.profile p { margin-top: 10px; font-weight: 700; color: #c0c5de; }
#pin-section { display: flex; flex-direction: column; gap: 10px; width: 250px; }
#pin-input { padding: 12px; border-radius: 8px; border: none; background: rgba(255,255,255,0.1); color: white; text-align: center; font-size: 16px; outline: none; }
.ps5-btn { background: #fff; color: #000; padding: 12px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
.btn-admin-root { margin-top: 40px; background: transparent; color: #5c6380; border: none; cursor: pointer; font-size: 12px; }

#map { position: absolute; inset: 0; z-index: 1; }
#status-overlay { position: absolute; inset: 0; z-index: 10; pointer-events: none; display: flex; align-items: center; justify-content: center; transition: background 1s; }
#status-overlay.muito-quente { background: rgba(255, 0, 0, 0.4); box-shadow: inset 0 0 100px red; }
#status-overlay.quente { background: rgba(255, 165, 0, 0.3); }
#status-overlay.morno { background: rgba(255, 255, 0, 0.2); }
#status-overlay.frio { background: rgba(0, 150, 255, 0.2); }
#status-text { color: white; font-size: 40px; font-weight: 900; letter-spacing: 5px; text-shadow: 0 4px 20px rgba(0,0,0,0.8); margin-bottom:20vh; text-align: center; }

/* PROGRESS BAR INDIVIDUAL DO JOGADOR */
.top-permanent-score-wrap { position: absolute; top: 20px; left: 20px; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); padding: 10px 15px; border-radius: 15px; z-index: 30; border: 1px solid gold; box-shadow: 0 5px 15px rgba(0,0,0,0.5); width: 120px; }
#top-my-score-text { font-size: 18px; font-weight: 900; color: gold; text-align: center; margin-bottom: 5px; }
.my-progress-track { width: 100%; height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden; }
.my-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ff8a00, #f1c40f); transition: width 1s ease-in-out; }

#fab-leaderboard, #fab-center { position: absolute; right: 15px; z-index: 30; width: 50px; height: 50px; border-radius: 25px; border: none; font-size: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.4); cursor:pointer; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); color: white; border: 1px solid rgba(255,255,255,0.2); transition: 0.3s; }
#fab-leaderboard { top: 20px; }
#fab-center { bottom: 120px; }

#top-leaderboard { position: absolute; top: 80px; right: 15px; width: 300px; background: rgba(15, 16, 21, 0.9); backdrop-filter: blur(15px); border-radius: 15px; padding: 15px; z-index: 40; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
#leaderboard { display: flex; flex-wrap: wrap; gap: 10px; }
.custom-bar-wrap { width: 100%; margin-bottom: 5px; }
.custom-bar-wrap.half-size { width: calc(50% - 5px); }
.bar-header { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 5px; font-weight: bold; }
.bar-track { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #ff8a00, #e52e71); border-radius: 4px; transition: width 1s ease-in-out; }

.guess-container { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 92%; max-width: 500px; z-index: 20; display: flex; flex-direction: column; align-items: center; }
#player-attempts-display { background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); padding: 5px 15px; border-radius: 20px 20px 0 0; font-size: 12px; font-weight: bold; color: #00b894; border: 1px solid rgba(255,255,255,0.1); border-bottom: none; margin-bottom: -1px; z-index: 25; }
.ia-bubble { background: rgba(30, 32, 41, 0.95); backdrop-filter: blur(10px); padding: 15px; border-radius: 12px; margin-bottom: 10px; font-size: 14px; text-align: center; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.5); width: 100%; box-sizing: border-box; }
.ia-bubble button { margin: 5px; padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-sim { background: #4caf50; color: white; } .btn-nao { background: #f44336; color: white; }
.guess-box { display: flex; width: 100%; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); transition: all 0.3s; z-index: 26; }
#guess-input { flex: 1; border: none; padding: 18px; outline: none; background: rgba(30, 32, 41, 0.9); color: white; font-size: 14px; }
.guess-box button { background: #fff; color: #000; border: none; padding: 0 25px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.guess-box.frozen { filter: grayscale(1) brightness(0.7); pointer-events: none; border: 1px solid #a3c2c2; box-shadow: 0 0 15px rgba(163, 194, 194, 0.5); }

/* BÚSSOLA CORRIGIDA */
.player-marker-wrap { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
.player-marker-cone { width: 20px; height: 20px; border-radius: 50%; background: #3388ff; border: 2px solid white; box-shadow: 0 0 10px rgba(0,0,0,0.5); position: relative; transition: transform 0.2s linear; }
.player-marker-cone::after { content: ''; position: absolute; top: -12px; left: 4px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 12px solid #3388ff; }

.point-toast { position: fixed; top: -100px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); border: 1px solid gold; padding: 15px 30px; border-radius: 30px; z-index: 9999; font-weight: 900; font-size: 18px; color: white; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.point-toast.show { top: 40px; }
.point-toast span { display: block; font-size: 12px; color: gold; font-weight: 400; margin-top: 5px; }

.fullscreen-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.modal-box { background: #1a1c23; border: 1px solid rgba(255,255,255,0.1); padding: 30px; border-radius: 15px; text-align: center; max-width: 80%; }
.modal-box h2 { color: #ff4d4d; margin-top: 0; }
.modal-box p { font-size: 16px; line-height: 1.5; color: #c0c5de; margin-bottom: 25px; }
.modal-box button { background: #fff; color: #000; padding: 10px 30px; border-radius: 8px; font-weight: bold; border: none; cursor: pointer; }

#admin-screen { display: flex; flex-direction: column; height: 100vh; background: #0f1015; }
.admin-header { padding: 15px; background: #1a1c23; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); position: relative;}
.admin-header h2 { margin: 0; font-size: 16px; letter-spacing: 2px; color: #fff; }
.btn-reset-db { position: absolute; right: 15px; top: 12px; background: #f44336; color: white; border: none; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 12px; font-weight: bold;}

/* NOVA ZONA DE PIN NO ADMIN */
.admin-pin-section { background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center;}

.admin-grid { flex: 1; overflow-y: auto; padding: 15px; display: grid; gap: 15px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-content: start; padding-bottom: 40px;}
.admin-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 15px; display: flex; flex-direction: column;}
.admin-card h3 { margin: 0 0 10px 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.mini-map { height: 150px; width: 100%; border-radius: 8px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.1); background: #1a1c23;}
.stat-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 8px; color: #a0a6c2; }
.stat-row strong { color: #fff; text-align: right; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.badge { padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: bold; text-transform: uppercase; }
.badge.on { background: rgba(76, 175, 80, 0.2); color: #4caf50; } .badge.off { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.target-input { display: flex; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); margin-top: 10px; }
.target-input input { flex:1; padding: 10px; border: none; background: rgba(0,0,0,0.5); color: white; outline: none; }
.target-input button { padding: 10px 15px; background: #00b894; color: #fff; border: none; font-weight: bold; cursor: pointer; transition: 0.2s;}

.admin-attempts-ctrl { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.admin-attempts-ctrl select { background: #1a1c23; color: white; border: 1px solid rgba(255,255,255,0.2); border-radius: 5px; padding: 5px; }
.admin-attempts-ctrl button { background: #3388ff; color: white; border: none; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 12px; font-weight: bold; }
.guess-history { background: #000; border-radius: 8px; padding: 10px; margin-top: 10px; height: 120px; overflow-y: auto; font-family: 'Fira Code', monospace; font-size: 11px; border: 1px solid rgba(255,255,255,0.1); }
.guess-line { margin-bottom: 4px; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 2px;}
.txt-muito-quente { color: #ff4d4d; } .txt-quente { color: #ffaa00; } .txt-morno { color: #ffff66; } .txt-frio { color: #4da6ff; }
