* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

#app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

#map-container {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    cursor: grab;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#map:active {
    cursor: grabbing;
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    z-index: 2000;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transition: transform 0.2s ease;
    width: 40px !important;
    height: 40px !important;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 3000;
}

.marker-image {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
}

.marker-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 2001;
    min-width: 60px;
    text-align: center;
}

.player-marker {
    position: absolute;
    width: 40px !important;
    height: 40px !important;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    border: 3px solid white;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    z-index: 1500;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.player-marker.afk {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    border-color: #FFD700;
}

.player-marker.highlight {
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.8);
    animation: pulse 2s infinite;
}

.player-name-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(50, 50, 50, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    border: 1px solid rgba(200, 200, 200, 0.3);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1501;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.player-name-label.afk {
    background: rgba(255, 165, 0, 0.9);
    color: #000;
    border-color: rgba(255, 140, 0, 0.5);
}

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

#sidebar {
    width: 400px;
    background: rgba(10, 10, 10, 0.95);
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid #333;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

h1 {
    color: #4CAF50;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 1px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
    font-size: 24px;
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.tab-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tab-btn.active {
    background: #2196F3;
    color: white;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.player-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.player-item {
    padding: 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-item.afk {
    border-left-color: #FFA500;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.player-avatar.afk {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 3px;
}

.afk-badge {
    background: #FFA500;
    color: #000;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 5px;
}

.player-coords {
    font-size: 12px;
    color: #aaa;
}

.player-stats {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.action-btn {
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

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

.action-btn.active {
    background: #2196F3;
    border-color: #2196F3;
}

.action-btn.small {
    padding: 6px 12px;
    font-size: 12px;
    margin-left: 8px;
}

.coordinates {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 18px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.zoom-level {
    position: absolute;
    bottom: 90px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 18px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zoom-btn {
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #2196F3;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

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

.chat-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    word-wrap: break-word;
}

.chat-message.system {
    background: rgba(0, 100, 255, 0.1);
    border-left: 3px solid #2196F3;
}

.chat-message.web {
    background: rgba(0, 200, 0, 0.1);
    border-left: 3px solid #4CAF50;
}

.chat-message.minecraft {
    background: rgba(255, 165, 0, 0.1);
    border-left: 3px solid #FF9800;
}

.chat-message.self {
    background: rgba(33, 150, 243, 0.2);
    border-left: 3px solid #2196F3;
}

.timestamp {
    font-size: 10px;
    color: #888;
    float: right;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#chat-input {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
}

.chat-send-btn {
    padding: 12px 24px;
    background: #4CAF50;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.chat-send-btn:hover {
    background: #45a049;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #333;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.connected {
    background: #4CAF50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

#world-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
}

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

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

.notification.info {
    border-left-color: #2196F3;
}

.notification.success {
    border-left-color: #4CAF50;
}

.loading-tile {
    background: linear-gradient(45deg, #2a2a2a 25%, #333 25%, #333 50%, #2a2a2a 50%, #2a2a2a 75%, #333 75%, #333);
    background-size: 20px 20px;
    animation: loading 1s linear infinite;
}

@keyframes loading {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

.settings-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-group h3 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 16px;
}

.setting {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.setting label {
    flex: 1;
    color: #aaa;
    font-size: 14px;
}

.setting input[type="text"],
.setting input[type="number"],
.setting select {
    flex: 2;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 6px;
    color: white;
    font-size: 14px;
}

.setting input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.settings-actions .action-btn {
    flex: 1;
}

.settings-actions .action-btn.primary {
    background: #2196F3;
    border-color: #2196F3;
}

.settings-actions .action-btn.primary:hover {
    background: #1976D2;
}

.zoom-slider-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.zoom-slider {
    width: 150px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    border-radius: 3px;
    outline: none;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: 2px solid white;
}

.zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: 2px solid white;
}
}
