@font-face {
    font-family: 'TechFont';
    src: url('./刘欢卡通手书.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-color: #0a0a0f; /* 深黑背景 */
    --panel-bg: rgba(15, 20, 35, 0.92);
    --border-color: #00f0ff;
    --border-width: 1px;
    
    /* 科技渐变 */
    --tech-gradient: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0f1a 100%);
    --neon-gradient: linear-gradient(90deg, #00f0ff, #0080ff, #00f0ff);
    --glow-gradient: linear-gradient(45deg, #00f0ff, #00ff88, #0080ff);
    
    /* 科技色 */
    --neon-cyan: #00f0ff;
    --neon-blue: #0080ff;
    --neon-green: #00ff88;
    --neon-purple: #bf00ff;
    --neon-red: #ff0040;
    --neon-orange: #ff6b00;
    
    --text-color: #e0e0e0;
    --font-tech: 'Rajdhani', 'Orbitron', 'Microsoft YaHei', 'PingFang SC', sans-serif;

    /* --- Dynamic Scaling Variables --- */
    --player-scale: 1;
    --ai-scale: 1;
    --item-scale: 1;
    --box-scale: 1;
    
    --text-scale-player: 1;
    --text-scale-ai: 1;
    --text-scale-box: 1;
    --text-scale-item: 1;
    
    /* 发光效果 */
    --glow-sm: 0 0 5px var(--neon-cyan), 0 0 10px rgba(0, 240, 255, 0.3);
    --glow-md: 0 0 10px var(--neon-cyan), 0 0 20px rgba(0, 240, 255, 0.4), 0 0 30px rgba(0, 240, 255, 0.2);
    --glow-lg: 0 0 15px var(--neon-cyan), 0 0 30px rgba(0, 240, 255, 0.5), 0 0 45px rgba(0, 240, 255, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    color: var(--text-color);
    font-family: var(--font-tech);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* --- LOADING SCREEN --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--neon-cyan);
    box-shadow: inset 0 0 100px rgba(0, 240, 255, 0.05);
}

#loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 30px 30px, 30px 30px; }
}

.radar-spinner {
    width: 160px;
    height: 160px;
    border: 2px solid var(--neon-cyan);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    position: relative;
    box-shadow: var(--glow-md), inset 0 0 30px rgba(0, 240, 255, 0.1);
    margin-bottom: 40px;
    overflow: hidden;
}

.radar-sweep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 60%, rgba(0, 240, 255, 0.6) 100%);
    animation: radar-spin 1.5s linear infinite;
}

.radar-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--neon-cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--neon-cyan), 0 0 30px var(--neon-cyan);
}

/* 雷达同心圆 */
.radar-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    width: 350px;
    background: var(--panel-bg);
    padding: 25px;
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    box-shadow: var(--glow-sm);
    backdrop-filter: blur(10px);
}

.glitch {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(0, 240, 255, 0.5);
    animation: text-flicker 3s infinite;
}

@keyframes text-flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    95% { opacity: 0.9; }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--neon-gradient);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.status-log {
    text-align: left;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    height: 70px;
    font-weight: 500;
    overflow: hidden;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.status-log p {
    opacity: 0.8;
    margin-bottom: 2px;
}

.status-log p::before {
    content: '> ';
    color: var(--neon-green);
}

/* --- MAIN DASHBOARD --- */
#main-dashboard {
    height: 100vh;
    width: 100vw;
    position: relative;
    padding: 0;
    overflow: hidden;
}

/* Floating UI Container */
.floating-ui-container {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1100;
    pointer-events: none;
}

.floating-btn, .floating-status {
    pointer-events: auto;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: var(--panel-bg);
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--glow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--neon-cyan);
    backdrop-filter: blur(10px);
}

.floating-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: var(--glow-md);
    transform: scale(1.05);
}

.floating-btn:active {
    transform: scale(0.95);
}

.system-status {
    background: var(--panel-bg);
    padding: 10px 18px;
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--glow-sm);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
}

.status-indicator.online {
    background-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green); }
    50% { box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green), 0 0 30px var(--neon-green); }
}

.status-text {
    color: var(--neon-green);
}

.ping-text {
    color: var(--neon-cyan);
    font-family: 'Consolas', monospace;
}

.content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sidebar {
    position: absolute;
    top: 90px;
    left: 20px;
    width: 280px;
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--glow-sm), inset 0 0 30px rgba(0, 240, 255, 0.03);
    z-index: 90;
    pointer-events: auto;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: top left;
}

/* 自定义滚动条 */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 240, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 2px;
}

/* Sidebar hidden state */
.sidebar.hidden-side {
    transform: translateX(-150%);
    opacity: 0;
    pointer-events: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.logo-small {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 2px;
}

.logo-small .highlight {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.panel {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 15px;
    border-radius: 4px;
    position: relative;
}

.panel h3 {
    font-size: 0.75rem;
    color: var(--neon-cyan);
    margin: -25px 0 15px 0;
    background: var(--panel-bg);
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--neon-cyan);
    border-radius: 2px;
    transform: none;
    box-shadow: var(--glow-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.toggle-control {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 500;
    background: rgba(0, 240, 255, 0.05);
    padding: 8px 10px;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: var(--text-color);
}

.toggle-control:hover {
    border-color: rgba(0, 240, 255, 0.5);
    background: rgba(0, 240, 255, 0.1);
}

.toggle-control input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    margin-right: 10px;
    width: 18px;
    height: 18px;
    border: 1px solid var(--neon-cyan);
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.toggle-control input[type="checkbox"]:checked {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.toggle-control input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: #000;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.slider-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(0, 240, 255, 0.05);
    padding: 10px;
    border-radius: 3px;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.slider-control .label {
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 500;
}

/* 文字调节slider - 紫色区分 */
.slider-control.text-slider {
    background: rgba(191, 0, 255, 0.08);
    border-color: rgba(191, 0, 255, 0.3);
}

.slider-control.text-slider input[type="range"]::-webkit-slider-thumb {
    background: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple);
}

.slider-control.text-slider input[type="range"]::-moz-range-thumb {
    background: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple);
}

.slider-control input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 240, 255, 0.2);
    outline: none;
}

.slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon-cyan);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: all 0.2s ease;
}

.slider-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--neon-cyan), 0 0 25px var(--neon-cyan);
}

.slider-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon-cyan);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.reset-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: transparent;
    border: 1px solid var(--neon-red);
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
    color: var(--neon-red);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.reset-btn:hover {
    background: var(--neon-red);
    color: #fff;
    box-shadow: 0 0 15px var(--neon-red), 0 0 30px rgba(255, 0, 64, 0.3);
}

.reset-btn:active {
    transform: scale(0.98);
}

.info-panel {
    background: rgba(0, 255, 136, 0.05);
    border-color: rgba(0, 255, 136, 0.3);
}

.info-panel .data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--neon-green);
}

.radar-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0f;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    pointer-events: auto;
}

.radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.radar-center::before, .radar-center::after {
    content: '';
    position: absolute;
    background: var(--neon-cyan);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radar-center::before {
    width: 200vw;
    height: 1px;
    opacity: 0.2;
}
.radar-center::after {
    height: 200vh;
    width: 1px;
    opacity: 0.2;
}

.hidden {
    display: none !important;
}

/* 装饰元素 - 科技风格隐藏 */
.decor-star {
    display: none;
}

/* --- PLAYER ENTITY STYLES (RING STATUS MODE) --- */

.player-entity {
    position: absolute;
    width: 0;
    height: 0;
    --zoom-scale: 1;
    transform: translate(-50%, -50%) scale(calc(var(--player-scale) * var(--zoom-scale)));
    z-index: 10;
}

/* AI Scale Override */
.player-entity.bot {
    transform: translate(-50%, -50%) scale(calc(var(--ai-scale) * var(--zoom-scale)));
}

/* Container for the avatar - STATIC */
.avatar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* Wrapper for Directional Elements - ROTATES */
.direction-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 10; /* Bring to front to ensure arrow sits on top/outside properly */
}

/* The Avatar Image - Circular */
.player-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 1px var(--neon-cyan), 0 0 8px rgba(0, 240, 255, 0.4);
}

/* Specific Avatar Borders by Team/Self */
.player-entity.team .player-avatar {
    box-shadow: 0 0 0 2px var(--neon-blue), 0 0 10px var(--neon-blue);
}

.player-entity.self .player-avatar {
    box-shadow: 0 0 0 2px var(--neon-green), 0 0 12px var(--neon-green);
}

/* --- STATUS RINGS (SVG) --- */
.ring-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; 
    height: 40px;
    z-index: 1;
    pointer-events: none;
}

.ring-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(0deg);
    filter: drop-shadow(0 0 3px currentColor);
}

/* Base style for all ring arcs */
.ring-arc {
    fill: none;
    stroke-linecap: round;
}

/* The border/background layer */
.ring-bg {
    stroke: rgba(0, 240, 255, 0.2);
    stroke-width: 4px;
}

/* The colored foreground layer */
.ring-fill {
    stroke-width: 3px;
}

/* Gear Colors - Sci-Fi Style */
.stroke-lvl-0 { stroke: #555; }
.stroke-lvl-1 { stroke: #888; }
.stroke-lvl-2 { stroke: var(--neon-green); }
.stroke-lvl-3 { stroke: var(--neon-blue); }
.stroke-lvl-4 { stroke: var(--neon-purple); }
.stroke-lvl-5 { stroke: var(--neon-orange); }
.stroke-lvl-6 { stroke: var(--neon-red); }

/* HP Bar Specifics */
.hp-track {
    stroke: rgba(255, 255, 255, 0.1);
}

.hp-fill {
    stroke: var(--neon-green);
    transition: stroke-dasharray 0.3s ease;
    filter: drop-shadow(0 0 4px currentColor);
}

/* Dynamic HP Colors */
.player-entity.team .hp-fill { stroke: var(--neon-blue); }
.player-entity.enemy .hp-fill { stroke: var(--neon-red); }
.player-entity.low-hp .hp-fill { stroke: #ff0000; animation: blink-stroke 0.5s infinite; }

@keyframes blink-stroke {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* --- INFO NAME & META (Top) --- */
.info-name-top {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%) scale(var(--text-scale-player));
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 20;
    width: max-content; /* Ensure container expands */
    transform-origin: bottom center; /* Scale from bottom to keep attached to head */
}

/* AI Text Scale Override */
.player-entity.bot .info-name-top {
    transform: translateX(-50%) scale(var(--text-scale-ai));
}

/* Independent height adjustment for Self */
.player-entity.self .info-name-top {
    top: -35px; /* Adjust this value to change height */
}

.info-stats-bottom {
    position: absolute;
    top: 24px; /* Position below the avatar (approx 15px radius + gap) */
    left: 50%;
    transform: translateX(-50%) scale(var(--text-scale-player));
    transform-origin: top center;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 20; /* Ensure on top of avatar (z-5) */
    width: max-content;
}

/* AI Text Scale Override for Bottom Info */
.player-entity.bot .info-stats-bottom {
    transform: translateX(-50%) scale(var(--text-scale-ai));
}

.weapon-tag {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--neon-orange);
    white-space: nowrap;
    margin-bottom: 1px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px var(--neon-orange);
}

.player-name-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    line-height: 1.2;
    order: 2;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.meta-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    order: 1;
    margin-bottom: 2px;
    white-space: nowrap;
    font-family: 'Consolas', monospace;
}

.dist-val {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.height-val.up { color: var(--neon-green); text-shadow: 0 0 5px var(--neon-green); }
.height-val.down { color: var(--neon-purple); text-shadow: 0 0 5px var(--neon-purple); }
.height-val.same { color: #888; }

/* --- STYLISH POINTER --- */
.direction-arrow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--neon-red);
    clip-path: polygon(50% 0%, 0% 100%, 50% 75%, 100% 100%);
    z-index: 100;
    filter: drop-shadow(0 0 6px currentColor);
    box-shadow: 0 0 10px var(--neon-red);
}

.player-entity.team .direction-arrow { background: var(--neon-blue); box-shadow: 0 0 10px var(--neon-blue); }
.player-entity.self .direction-arrow { background: var(--neon-green); box-shadow: 0 0 10px var(--neon-green); }
.player-entity.bot .direction-arrow { background: #666; box-shadow: 0 0 5px #666; }

/* AI Bot Specific Styling */
.player-entity.bot .player-avatar {
    box-shadow: 0 0 0 1px #555, 0 0 5px rgba(100, 100, 100, 0.5);
    filter: grayscale(0.5);
}

/* Hide AI Tag */
.player-entity.bot .avatar-container::after {
    display: none;
}

/* Hide Status Rings for Team, Self, AND Bots */
.player-entity.team .ring-container,
.player-entity.self .ring-container,
.player-entity.bot .ring-container {
    display: none;
}

/* Hide Name/Dist/Height for Bots */
.player-entity.bot .info-name-top {
    display: none;
}

/* Hide Direction Arrow for Bots */
.player-entity.bot .direction-wrapper {
    display: none;
}

/* Clean up old stuff */
.cat-ear, .hp-smile-simple, .info-top, .hp-smile-track, .info-bottom-text {
    display: none;
}



/* --- ITEM ENTITIES --- */

/* Quality Colors - Sci-Fi Neon */
.q-1 { color: #888888; --item-color: #888888; } /* Grey */
.q-2 { color: var(--neon-green); --item-color: var(--neon-green); } /* Green */
.q-3 { color: var(--neon-blue); --item-color: var(--neon-blue); } /* Blue */
.q-4 { color: var(--neon-purple); --item-color: var(--neon-purple); } /* Purple */
.q-5 { color: var(--neon-orange); --item-color: var(--neon-orange); } /* Orange */
.q-6 { color: var(--neon-red); --item-color: var(--neon-red); } /* Red */

.item-entity {
    position: absolute;
    --zoom-scale: 1;
    transform: translate(-50%, -50%) scale(calc(var(--item-scale) * var(--zoom-scale)));
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* Text shouldn't block map clicks if overlapping heavily */
}

/* The Icon (Gem/Orb Shape) */
.item-icon {
    width: 10px;
    height: 10px;
    background: var(--item-color);
    border: none;
    border-radius: 2px;
    box-shadow: 0 0 8px var(--item-color), 0 0 15px var(--item-color);
    margin-bottom: 4px;
    z-index: 6;
    transform: rotate(45deg);
}

/* Info Container */
.item-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.item-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--item-color);
    white-space: nowrap;
    line-height: 1.1;
    text-shadow: 0 0 8px var(--item-color);
    letter-spacing: 0.5px;
}

.item-meta {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    gap: 3px;
    font-weight: 500;
    white-space: nowrap;
    font-family: 'Consolas', monospace;
}

/* Height Indicators */
.h-up { color: var(--neon-green); text-shadow: 0 0 5px var(--neon-green); }
.h-down { color: var(--neon-purple); text-shadow: 0 0 5px var(--neon-purple); }

/* --- DEATH BOX ENTITY --- */
.death-box-entity {
    position: absolute;
    --zoom-scale: 1;
    transform: translate(-50%, -50%) scale(calc(var(--box-scale) * var(--zoom-scale)));
    z-index: 4; /* Below players, above map */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Box Text Scale */
.death-box-entity .item-info {
    transform: scale(var(--text-scale-box));
    transform-origin: top center;
}

/* Hide specifically "Courier" boxes (AI/System drops) */
.death-box-entity.courier {
    display: none !important;
}

/* Hide Name for Death Boxes */
.death-box-entity .item-name {
    display: none;
}

.coffin-box {
    width: 20px;
    height: 28px;
    background: rgba(20, 20, 30, 0.9);
    border: 1px solid var(--item-color);
    clip-path: polygon(20% 0, 80% 0, 100% 25%, 85% 100%, 15% 100%, 0 25%);
    position: relative;
    filter: drop-shadow(0 0 6px var(--item-color));
    transition: transform 0.2s ease;
    margin-bottom: 2px;
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.1);
}

/* Cross on coffin - Sci-Fi style */
.coffin-box::before, .coffin-box::after {
    content: '';
    position: absolute;
    background: var(--item-color);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px var(--item-color);
}

.coffin-box::before { width: 3px; height: 12px; }
.coffin-box::after { width: 12px; height: 3px; }

/* Info Container - Death Box Override */
.death-box-entity .item-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(var(--text-scale-item));
    transform-origin: top center;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.death-box-entity .item-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--item-color);
    white-space: nowrap;
    line-height: 1.1;
    text-shadow: 0 0 8px var(--item-color);
}

.death-box-entity .item-meta {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    gap: 3px;
    font-weight: 500;
    white-space: nowrap;
    font-family: 'Consolas', monospace;
}

/* Height Indicators - Death Box */
.death-box-entity .h-up { color: var(--neon-green); text-shadow: 0 0 5px var(--neon-green); }
.death-box-entity .h-down { color: var(--neon-purple); text-shadow: 0 0 5px var(--neon-purple); }

/* --- VISIBILITY TOGGLES --- */
body.hide-enemies .player-entity.enemy {
    display: none !important;
}

body.hide-ai .player-entity.bot {
    display: none !important;
}

body.hide-names .player-name-text {
    display: none !important;
}

/* Item Quality Visibility Toggles - ITEMS ONLY */
body.hide-q-1 .item-entity.q-1 { display: none !important; }
body.hide-q-2 .item-entity.q-2 { display: none !important; }
body.hide-q-3 .item-entity.q-3 { display: none !important; }
body.hide-q-4 .item-entity.q-4 { display: none !important; }
body.hide-q-5 .item-entity.q-5 { display: none !important; }
body.hide-q-6 .item-entity.q-6 { display: none !important; }

/* Quality Grid Layout */
.quality-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.toggle-control.q-check {
    margin-bottom: 0;
    font-size: 0.8rem;
}

/* --- HIGH TIER NOTIFICATION --- */
.notification-panel {
    position: absolute;
    top: 80px;
    right: 20px;
    left: auto;
    transform: none;
    background: var(--panel-bg);
    border: 1px solid var(--neon-red);
    border-radius: 4px;
    padding: 10px 14px;
    z-index: 1050;
    box-shadow: var(--glow-sm), 0 0 20px rgba(255, 0, 64, 0.3);
    text-align: left;
    pointer-events: none;
    animation: pulse-alert 2s infinite;
    min-width: 160px;
    max-width: 240px;
    backdrop-filter: blur(10px);
}

.notification-header {
    color: var(--neon-red);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 6px;
    text-shadow: 0 0 10px var(--neon-red);
    text-align: center;
    border-bottom: 1px solid rgba(255, 0, 64, 0.3);
    padding-bottom: 4px;
    letter-spacing: 2px;
}

.notification-content {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-content div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-content div::before {
    content: '◆';
    color: var(--neon-orange);
    font-size: 0.5rem;
    text-shadow: 0 0 5px var(--neon-orange);
}

@keyframes pulse-alert {
    0% { box-shadow: 0 0 5px var(--neon-cyan), 0 0 10px rgba(255, 0, 64, 0.3); }
    50% { box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(255, 0, 64, 0.5), 0 0 30px rgba(255, 0, 64, 0.2); }
    100% { box-shadow: 0 0 5px var(--neon-cyan), 0 0 10px rgba(255, 0, 64, 0.3); }
}

/* --- MOBILE RESPONSIVENESS --- */

@media (max-width: 768px) {
    /* Adjust Floating UI for Mobile */
    .floating-ui-container {
        top: 15px;
        left: 15px;
        right: 15px;
    }

    .logo-small {
        font-size: 1.2rem;
    }
    
    /* Sidebar becomes off-canvas drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        padding-top: 80px;
        max-height: none;
        width: 85%;
        max-width: 300px;
        background: rgba(10, 10, 15, 0.98);
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--neon-cyan);
        
        transform: translateX(-110%);
        opacity: 1;
        pointer-events: none;
        
        transition: transform 0.3s ease;
        z-index: 1000;
        box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    }

    /* Active state for mobile sidebar */
    .sidebar.active {
        transform: translateX(0);
        pointer-events: auto;
    }
    
    .sidebar.hidden-side {
        transform: translateX(-150%);
    }

    .radar-view {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .system-status {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .floating-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

/* Canvas全屏 */
#radar-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
}

/* 地图缩放控件 */
.map-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel-bg);
    padding: 10px 16px;
    border-radius: 4px;
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--glow-sm);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--neon-cyan);
}

.zoom-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: var(--glow-sm);
}

.zoom-btn:active {
    transform: scale(0.95);
}

#zoom-level {
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    color: var(--neon-cyan);
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
}

/* 移动端隐藏 */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* 视角跟随抽屉 */
.follow-drawer {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    background: var(--panel-bg);
    border: 1px solid var(--neon-cyan);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    box-shadow: var(--glow-sm);
    z-index: 100;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.follow-drawer.collapsed {
    transform: translateX(-50%) translateY(calc(100% - 44px));
}

.follow-drawer-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    cursor: pointer;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 4px 4px 0 0;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
    font-weight: 600;
    color: var(--neon-cyan);
}

.follow-drawer-handle:hover {
    background: rgba(0, 240, 255, 0.2);
}

.handle-icon {
    font-size: 16px;
}

.handle-text {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.follow-drawer-content {
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.follow-toggle {
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.follow-target-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.follow-target-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.follow-target-item:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--neon-cyan);
}

.follow-target-item input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--neon-cyan);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.follow-target-item input[type="radio"]:checked {
    background: transparent;
    box-shadow: 0 0 8px var(--neon-cyan);
}

.follow-target-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px var(--neon-cyan);
}

.follow-target-label {
    flex: 1;
    cursor: pointer;
}

.follow-target-name {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-color);
}

.follow-target-role {
    font-size: 10px;
    color: #888;
}

.follow-target-role.self {
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green);
}

.follow-target-role.team {
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
}

/* 地图信息显示 */
.map-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--panel-bg);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--glow-sm);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.map-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--neon-cyan);
    letter-spacing: 1px;
}
