/* GeoCraft - Corporate Cyberpunk Glassmorphism Design */
:root {
    --bg-primary: #0a0b10;
    --bg-glass: rgba(16, 20, 32, 0.75);
    --accent-cyan: #00f0ff;
    --accent-violet: #7000ff;
    --accent-pink: #d63384;
    --accent-gold: #ffd700;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --border-glass: rgba(0, 240, 255, 0.25);
    --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
}

#game-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: 1;
}

/* Crosshair */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}
#crosshair::before, #crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.8);
}
#crosshair::before {
    top: 7px;
    left: 0;
    width: 16px;
    height: 2px;
}
#crosshair::after {
    top: 0;
    left: 7px;
    width: 2px;
    height: 16px;
}

/* UI Overlay */
.hud-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    pointer-events: auto;
}

.brand-badge {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--glow-cyan);
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 10px 16px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    display: flex;
    gap: 16px;
}

/* Real Encounter Banner */
#encounter-banner {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(214, 51, 132, 0.9), rgba(112, 0, 255, 0.9));
    border: 2px solid var(--accent-pink);
    box-shadow: 0 0 30px rgba(214, 51, 132, 0.8);
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.04); }
    100% { transform: translateX(-50%) scale(1); }
}

/* Hotbar */
.hotbar-container {
    align-self: center;
    margin-bottom: 24px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hotbar {
    display: flex;
    background: rgba(10, 11, 16, 0.85);
    border: 2px solid var(--border-glass);
    border-radius: 12px;
    padding: 6px;
    gap: 6px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.hotbar-slot {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.hotbar-slot:hover {
    background: rgba(0, 240, 255, 0.15);
}

.hotbar-slot.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.25);
    box-shadow: 0 0 12px var(--accent-cyan);
    transform: translateY(-4px);
}

.slot-num {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.65rem;
    font-family: monospace;
    color: var(--text-muted);
}

.slot-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.active-block-name {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 600;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
}

/* Modals & Panels */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
}

/* Chat Box */
.chat-container {
    position: fixed;
    bottom: 96px;
    left: 20px;
    width: 340px;
    max-height: 260px;
    pointer-events: auto;
    z-index: 30;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    overflow-y: auto;
    max-height: 180px;
    padding: 10px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-input-box {
    display: flex;
    padding: 8px;
    border-top: 1px solid var(--border-glass);
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--accent-cyan);
}

/* Action Buttons */
.btn-geo {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(112, 0, 255, 0.3));
    border: 1px solid var(--accent-cyan);
    color: #fff;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-geo:hover {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    box-shadow: var(--glow-cyan);
}

/* Teleport & Player List Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 150;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.modal-content {
    width: 480px;
    max-width: 90vw;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* Welcome / Start Overlay */
#start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(16, 20, 32, 0.95), rgba(10, 11, 16, 0.98));
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.start-box {
    width: 440px;
    max-width: 90vw;
    padding: 32px;
    text-align: center;
}

.start-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
    outline: none;
}

.start-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Minimap Radar HUD */
#minimap-container {
    position: fixed;
    top: 76px;
    right: 20px;
    width: 204px;
    padding: 10px 12px;
    border-radius: 16px;
    pointer-events: auto;
    z-index: 25;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.2);
    border: 1px solid var(--border-glass);
}

.minimap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.minimap-zoom-btns {
    display: flex;
    gap: 4px;
}

.minimap-zoom-btns button {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid var(--border-glass);
    color: #fff;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.minimap-zoom-btns button:hover {
    background: var(--accent-cyan);
    color: #000;
}

.minimap-canvas-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 240, 255, 0.45);
    box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.25), 0 0 10px rgba(0, 240, 255, 0.25);
    background: rgba(8, 12, 22, 0.9);
}

#minimap-canvas {
    display: block;
    width: 180px;
    height: 180px;
}

/* Navi Info Bar */
#navi-info-bar {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.navi-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

#navi-info-target {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.btn-cancel-navi {
    background: none;
    border: none;
    color: #ff5566;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 4px;
}

.btn-cancel-navi:hover {
    color: #ff8899;
    transform: scale(1.1);
}

.navi-info-metrics {
    font-size: 0.78rem;
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Search results in Navi Modal */
.navi-search-item {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.navi-search-item:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
}
