/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    height: 100vh;
    overflow: hidden;
}

/* 连接状态遮罩 */
.connection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    font-size: 1.2rem;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部工具栏 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.header-left h1 {
    font-size: 1.5rem;
    color: #4f46e5;
    font-weight: 700;
    margin: 0;
}

.version-info {
    font-size: 0.8rem;
    color: #6b7280;
    margin-left: 1rem;
}

.header-center {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.header-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* 通知开关样式 */
.notification-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4f46e5;
}

.notification-toggle-label:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-1px);
}

.notification-toggle-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.notification-toggle-text {
    white-space: nowrap;
}

/* 按钮样式 */
.action-btn, .toggle-btn, .admin-btn, .primary-btn, .secondary-btn, .danger-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.action-btn {
    background: #4f46e5;
    color: white;
}

.action-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.toggle-btn {
    background: #f59e0b;
    color: white;
}

.toggle-btn:hover {
    background: #d97706;
}

.admin-btn {
    background: #dc2626;
    color: white;
}

.admin-btn:hover {
    background: #b91c1c;
}

.primary-btn {
    background: #10b981;
    color: white;
}

.primary-btn:hover {
    background: #059669;
}

.secondary-btn {
    background: #6b7280;
    color: white;
}

.secondary-btn:hover {
    background: #4b5563;
}

.danger-btn {
    background: #ef4444;
    color: white;
}

.danger-btn:hover {
    background: #dc2626;
}

.nickname-display {
    font-size: 0.9rem;
    color: #4f46e5;
    font-weight: 500;
}

/* 筛选控件样式 */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-right: 4px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    position: relative;
    padding-left: 20px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 14px;
    width: 14px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    border: 1px solid rgba(127,127,1277,0.8);
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.3);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #10b981;
    border-color: #10b981;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-reset-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 4px;
}

.filter-reset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(180deg);
}

/* 筛选弹窗样式 */
.filter-panel-content {
    padding: 1rem;
}

.filter-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.filter-section h4 {
    margin: 0 0 1rem 0;
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
}

.monster-type-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.monster-type-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s;
}

.monster-type-filter:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.monster-type-filter.disabled {
    opacity: 0.5;
    background: #f9fafb;
}

.monster-type-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    margin: 0 -1rem -1rem -1rem;
    border-radius: 0 0 12px 12px;
}

.filter-actions button {
    flex: 1;
    max-width: 120px;
}

/* 主内容区域 */
.main-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 地图区域 */
.map-section {
    flex: 1;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    min-height: 0; /* 确保flex子项能够收缩 */
}

/* 聊天区域 */
.chat-section {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
}

.chat-section.open {
    width: 400px;
}

.map-container {
    position: relative;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameMap {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 等比缩放并完整显示 */
    object-position: center; /* 居中显示 */
    display: block;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 怪物标记 */
.monster-marker {
    position: absolute;
    width: 32px;
    height: 32px;
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.3s;
    z-index: 10;
}

.monster-marker.no-kills {
    z-index: 15; /* 没有击杀确认的怪物层级更高 */
}

.monster-marker.has-kills {
    z-index: 8; /* 有击杀确认的怪物层级较低 */
}

.monster-marker:hover {
    transform: scale(1.2);
}

.monster-marker img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.monster-marker.dead img {
    opacity: 0.5;
    filter: grayscale(1);
}

.monster-marker .count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 线路号标签 */
.monster-marker .line-badge {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(79, 70, 229, 0.9);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.monster-marker.selected-animation {
    animation: selectedPulse 4s ease-in-out;
    z-index: 20;
}

@keyframes selectedPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.9);
        border: 3px solid rgba(245, 158, 11, 0.9);
    }
    10% {
        transform: scale(1.5);
        box-shadow: 0 0 0 20px rgba(245, 158, 11, 0.6);
        border: 3px solid rgba(245, 158, 11, 1);
    }
    20% {
        transform: scale(1.2);
        box-shadow: 0 0 0 25px rgba(245, 158, 11, 0.4);
        border: 3px solid rgba(245, 158, 11, 0.8);
    }
    30% {
        transform: scale(1.4);
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0.5);
        border: 3px solid rgba(245, 158, 11, 1);
    }
    40% {
        transform: scale(1.1);
        box-shadow: 0 0 0 30px rgba(245, 158, 11, 0.3);
        border: 3px solid rgba(245, 158, 11, 0.7);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 0 20px rgba(245, 158, 11, 0.5);
        border: 3px solid rgba(245, 158, 11, 1);
    }
    60% {
        transform: scale(1.1);
        box-shadow: 0 0 0 25px rgba(245, 158, 11, 0.4);
        border: 3px solid rgba(245, 158, 11, 0.8);
    }
    70% {
        transform: scale(1.25);
        box-shadow: 0 0 0 18px rgba(245, 158, 11, 0.6);
        border: 3px solid rgba(245, 158, 11, 1);
    }
    80% {
        transform: scale(1.05);
        box-shadow: 0 0 0 22px rgba(245, 158, 11, 0.3);
        border: 3px solid rgba(245, 158, 11, 0.6);
    }
    90% {
        transform: scale(1.15);
        box-shadow: 0 0 0 12px rgba(245, 158, 11, 0.4);
        border: 3px solid rgba(245, 158, 11, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
        border: 3px solid rgba(245, 158, 11, 0);
    }
}

/* 弹窗通用样式 */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* 筛选弹窗特殊样式 */
#filterPanel .popup-content {
    max-width: 750px;
    width: 95%;
    max-height: 90vh;
}

.popup-header {
    background: #4f46e5;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.popup-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 报点弹窗 */
.report-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-group select, .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

/* 线路输入框样式 */
.line-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.line-input-container input[type="number"] {
    width: 100%;
    padding-right: 40px;
    margin: 0;
}

.line-input-container input[type="number"].invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.line-input-container input[type="number"]:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.line-input-suffix {
    position: absolute;
    right: 12px;
    color: #6b7280;
    font-size: 0.9rem;
    pointer-events: none;
}



.monster-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.monster-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.monster-option:hover {
    border-color: #4f46e5;
    background: #f8fafc;
    transform: translateY(-2px);
}

.monster-option.selected {
    border-color: #4f46e5;
    background: #eef2ff;
}

.monster-option img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.monster-option span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 怪物信息弹窗 */
.monster-info-detail {
    padding: 1.5rem;
}

.monster-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.monster-detail-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
}

.monster-detail-info h4 {
    margin: 0 0 0.5rem 0;
    color: #4f46e5;
    font-size: 1.3rem;
}

.monster-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-item {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.meta-item .label {
    font-size: 0.8rem;
    color: #6b7280;
    display: block;
}

.meta-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

/* 聊天面板 */
.chat-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* 浮动聊天按钮 */
.floating-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* 聊天面板打开时，浮动按钮向右移动适配新布局 */
.floating-chat-btn.moved-up {
    right: 420px;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.6);
}

.chat-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.chat-panel.open .floating-chat-btn .chat-icon {
    transform: rotate(180deg);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.channel-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.3s;
}

.tab-btn:hover {
    border-color: #4f46e5;
}

.tab-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f9fafb;
    position: relative;
}

/* 返回底部按钮 */
.scroll-to-bottom-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 100;
}

.scroll-to-bottom-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.scroll-to-bottom-btn:active {
    transform: translateY(0);
}

.new-message-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    gap: 0.5rem;
}

.channel-tag {
    background: #4f46e5;
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* 管理员标识 */
.admin-badge {
    background: linear-gradient(45deg, #dc2626, #ef4444);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

/* 日志页面特殊样式 */
.chat-messages.logs-view {
    background: #f8fafc;
}

.chat-messages.logs-view .message {
    background: white;
    border-left: 4px solid transparent;
}

.chat-messages.logs-view .message[data-log-type="report"] {
    border-left-color: #3b82f6;
}

.chat-messages.logs-view .message[data-log-type="kill"] {
    border-left-color: #ef4444;
}

.chat-messages.logs-view .message[data-log-type="delete"] {
    border-left-color: #6b7280;
}

.chat-messages.logs-view .message[data-log-type="expire"] {
    border-left-color: #f59e0b;
}

.message-content {
    color: #374151;
    line-height: 1.5;
}

.delete-message {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    display: none;
}

.message:hover .delete-message {
    display: block;
}

/* 管理员信息显示 */
.admin-info-display {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
    font-size: 0.75rem;
}

.admin-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.admin-info-item:last-child {
    margin-bottom: 0;
}

.admin-info-label {
    color: #dc2626;
    font-weight: 600;
    min-width: 60px;
}

.admin-info-value {
    color: #374151;
    font-family: monospace;
    background: white;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    border: 1px solid #e5e7eb;
    flex: 1;
}

.quick-ban-btn {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 0.125rem 0.25rem;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 0.25rem;
}

.quick-ban-btn:hover {
    background: #b91c1c;
}

/* 怪物信息中的管理员信息 */
.monster-admin-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

.monster-admin-info h5 {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.admin-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 日志中的管理员信息 */
.log-admin-info {
    color: #dc2626;
    font-size: 0.7rem;
    font-family: monospace;
    background: rgba(220, 38, 38, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    margin-left: 0.25rem;
}

.log-ban-btn {
    font-size: 0.6rem;
    padding: 0.1rem 0.2rem;
    margin-left: 0.25rem;
}

/* 查询按钮样式 */
.query-info-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 0.5rem;
    margin-top: 0.25rem;
}

.query-info-btn:hover {
    background: #2563eb;
}

.log-query-btn {
    font-size: 0.7rem;
    padding: 0.1rem 0.2rem;
    margin-left: 0.25rem;
}

/* 怪物管理员控制区域 */
.monster-admin-controls {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* 日志管理员信息显示 */
.log-admin-info-display {
    display: inline;
    color: #dc2626;
    font-size: 0.7rem;
    font-family: monospace;
    background: rgba(220, 38, 38, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    margin-left: 0.25rem;
}

.log-admin-info-display.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: white;
}

/* 聊天控件区域 */
.chat-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.chat-input select {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* 管理员标识选项 */
.admin-badge-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
}

.admin-badge-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #dc2626;
}

.admin-label {
    user-select: none;
}

.admin-badge-option:hover .admin-label {
    color: #dc2626;
}

.input-area {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: flex-end;
}

/* 聊天 (+) 按钮 */
.chat-plus-btn {
    width: 32px;
    height: 32px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-plus-btn:hover {
    background: #3730a3;
    transform: scale(1.05);
}

.input-area textarea {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    resize: none;
    height: 60px;
    font-family: inherit;
    font-size: 0.9rem;
}

.input-area button {
    padding: 0.75rem 1rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.input-area button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.message-status {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
}

#cooldown {
    color: #ef4444;
    font-weight: bold;
}

/* 管理员面板 */
.admin-form {
    padding: 1.5rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-controls {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1rem;
}

.admin-controls h4 {
    color: #15803d;
    margin: 0 0 0.5rem 0;
}

.admin-controls p {
    color: #166534;
    margin: 0 0 0.5rem 0;
}

.admin-controls ul {
    color: #166534;
    margin: 0;
    padding-left: 1.5rem;
}

/* 封禁管理样式 */
.ban-management {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.ban-management h5 {
    color: #dc2626;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.ban-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ban-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ban-input-group input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #fecaca;
    border-radius: 6px;
    font-size: 0.9rem;
}

.ban-input-group button {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* 通知系统 */
.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.notification {
    background: white;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #4f46e5;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.success {
    border-left-color: #10b981;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-center {
        order: 2;
    }
    
    .header-right {
        order: 1;
    }
    
    .chat-section.open {
        width: 100%;
    }
    
    /* 移动端浮动聊天按钮 */
    .floating-chat-btn {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    
    /* 移动端聊天面板打开时的浮动按钮位置调整 */
    .floating-chat-btn.moved-up {
        right: 15px;
        bottom: 100px;
        opacity: 0.7;
    }
    
    .chat-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .monster-grid {
        grid-template-columns: 1fr;
    }
    
    .popup-content {
        width: 95%;
        margin: 1rem;
    }
    
    /* 移动端筛选弹窗优化 */
    #filterPanel .popup-content {
        width: 98%;
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .filter-section {
        margin-bottom: 0.8rem;
        padding: 0.8rem;
    }
    
    .monster-type-filters {
        grid-template-columns: 1fr;
    }
    
    .header-center {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 移动端主容器改为垂直布局 */
    .main-container {
        flex-direction: column;
        height: calc(100vh - 120px); /* 减去头部高度 */
    }
    
    .map-section {
        flex: 1;
        min-height: 0;
        padding: 0.5rem;
    }
    
    .chat-section {
        width: 100%;
        height: 0;
        transition: height 0.3s ease;
        flex-shrink: 0;
    }
    
    .chat-section.open {
        height: 50vh;
        width: 100%;
    }
    
    /* 移动端地图容器优化 */
    .map-container {
        width: 100%;
        height: 100%;
        min-height: 200px; /* 设置最小高度 */
    }
}

/* 聊天插入菜单 */
.chat-menu {
    position: fixed;
    display: none;
    z-index: 1001;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.chat-menu-content {
    padding: 0.5rem 0;
}

.chat-menu-item {
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.chat-menu-item:hover {
    background: #f3f4f6;
}

.menu-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.menu-text {
    color: #374151;
    font-weight: 500;
}

/* 怪物日志面板 */
.monster-log-content {
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.log-filters {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.log-filters select {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
}

.log-entries {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    max-height: 50vh;
}

.log-entry {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.log-entry-content {
    flex: 1;
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.log-entry-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.9rem;
}

.log-entry-time {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.log-entry-details {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.4;
}

.log-entry-user {
    color: #4f46e5;
    font-weight: 500;
}

/* 消息中的怪物链接 */
.monster-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.monster-link:hover {
    background: rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

.monster-link-icon {
    font-size: 0.9rem;
}

/* 地图选择模式 */
.map-selecting-monster {
    cursor: crosshair;
}

.map-selecting-monster .monster-marker {
    cursor: pointer;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 怪物出现动画 */
.monster-marker.appear-animation {
    animation: monsterAppear 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes monsterAppear {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(90deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 初始化时隐藏状态 */
.monster-marker.pre-animate {
    transform: scale(0);
    opacity: 0;
} 

/* 怪物列表弹窗样式 */
.monster-list-content {
    max-height: 400px;
    overflow-y: auto;
}

.location-info {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e1;
}

.location-info h4 {
    color: #1e293b;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.location-info p {
    color: #64748b;
    font-size: 0.9rem;
}

.monster-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.monster-list-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.monster-list-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #94a3b8;
}

.monster-list-item.dead {
    opacity: 0.7;
    background: #f8fafc;
}

.monster-item-icon {
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
}

.monster-item-icon img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
}

.status-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-indicator.alive {
    background: #10b981;
}

.status-indicator.dead {
    background: #ef4444;
}

.monster-item-info {
    flex: 1;
    min-width: 0;
}

.monster-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 1rem;
}

.monster-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.monster-meta span {
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.monster-meta .line-info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
}

.monster-stats {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
}

.monster-stats span {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.report-count {
    background: #dbeafe;
    color: #1d4ed8;
}

.kill-count {
    background: #fef3c7;
    color: #d97706;
}

.status.alive {
    background: #dcfce7;
    color: #16a34a;
}

.status.dead {
    background: #fee2e2;
    color: #dc2626;
}

.monster-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.view-detail-btn,
.quick-kill-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-detail-btn {
    background: #f1f5f9;
    color: #475569;
}

.view-detail-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.quick-kill-btn {
    background: #fee2e2;
    color: #dc2626;
}

.quick-kill-btn:hover {
    background: #fecaca;
    color: #b91c1c;
}

/* 位置汇报按钮样式 */
.monster-location-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.location-report-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.location-report-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.location-report-btn:active {
    transform: translateY(0);
}

/* 滚动条美化 */
.monster-list-content::-webkit-scrollbar {
    width: 6px;
}

.monster-list-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.monster-list-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.monster-list-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
} 